QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#755400 | #9551. The Emperor | ucup-team133# | AC ✓ | 135ms | 4936kb | C++23 | 19.4kb | 2024-11-16 17:14:11 | 2024-11-16 17:14:11 |
Judging History
answer
#include <bits/stdc++.h>
#ifdef LOCAL
#include <debug.hpp>
#else
#define debug(...) void(0)
#endif
template <class T> std::istream& operator>>(std::istream& is, std::vector<T>& v) {
for (auto& e : v) {
is >> e;
}
return is;
}
template <class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
for (std::string_view sep = ""; const auto& e : v) {
os << std::exchange(sep, " ") << e;
}
return os;
}
template <class T, class U = T> bool chmin(T& x, U&& y) {
return y < x and (x = std::forward<U>(y), true);
}
template <class T, class U = T> bool chmax(T& x, U&& y) {
return x < y and (x = std::forward<U>(y), true);
}
template <class T> void mkuni(std::vector<T>& v) {
std::ranges::sort(v);
auto result = std::ranges::unique(v);
v.erase(result.begin(), result.end());
}
template <class T> int lwb(const std::vector<T>& v, const T& x) {
return std::distance(v.begin(), std::ranges::lower_bound(v, x));
}
#include <type_traits>
#ifdef _MSC_VER
#include <intrin.h>
#endif
#ifdef _MSC_VER
#include <intrin.h>
#endif
namespace atcoder {
namespace internal {
// @param m `1 <= m`
// @return x mod m
constexpr long long safe_mod(long long x, long long m) {
x %= m;
if (x < 0) x += m;
return x;
}
// Fast modular multiplication by barrett reduction
// Reference: https://en.wikipedia.org/wiki/Barrett_reduction
// NOTE: reconsider after Ice Lake
struct barrett {
unsigned int _m;
unsigned long long im;
// @param m `1 <= m < 2^31`
explicit barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {}
// @return m
unsigned int umod() const { return _m; }
// @param a `0 <= a < m`
// @param b `0 <= b < m`
// @return `a * b % m`
unsigned int mul(unsigned int a, unsigned int b) const {
// [1] m = 1
// a = b = im = 0, so okay
// [2] m >= 2
// im = ceil(2^64 / m)
// -> im * m = 2^64 + r (0 <= r < m)
// let z = a*b = c*m + d (0 <= c, d < m)
// a*b * im = (c*m + d) * im = c*(im*m) + d*im = c*2^64 + c*r + d*im
// c*r + d*im < m * m + m * im < m * m + 2^64 + m <= 2^64 + m * (m + 1) < 2^64 * 2
// ((ab * im) >> 64) == c or c + 1
unsigned long long z = a;
z *= b;
#ifdef _MSC_VER
unsigned long long x;
_umul128(z, im, &x);
#else
unsigned long long x =
(unsigned long long)(((unsigned __int128)(z)*im) >> 64);
#endif
unsigned int v = (unsigned int)(z - x * _m);
if (_m <= v) v += _m;
return v;
}
};
// @param n `0 <= n`
// @param m `1 <= m`
// @return `(x ** n) % m`
constexpr long long pow_mod_constexpr(long long x, long long n, int m) {
if (m == 1) return 0;
unsigned int _m = (unsigned int)(m);
unsigned long long r = 1;
unsigned long long y = safe_mod(x, m);
while (n) {
if (n & 1) r = (r * y) % _m;
y = (y * y) % _m;
n >>= 1;
}
return r;
}
// Reference:
// M. Forisek and J. Jancina,
// Fast Primality Testing for Integers That Fit into a Machine Word
// @param n `0 <= n`
constexpr bool is_prime_constexpr(int n) {
if (n <= 1) return false;
if (n == 2 || n == 7 || n == 61) return true;
if (n % 2 == 0) return false;
long long d = n - 1;
while (d % 2 == 0) d /= 2;
constexpr long long bases[3] = {2, 7, 61};
for (long long a : bases) {
long long t = d;
long long y = pow_mod_constexpr(a, t, n);
while (t != n - 1 && y != 1 && y != n - 1) {
y = y * y % n;
t <<= 1;
}
if (y != n - 1 && t % 2 == 0) {
return false;
}
}
return true;
}
template <int n> constexpr bool is_prime = is_prime_constexpr(n);
// @param b `1 <= b`
// @return pair(g, x) s.t. g = gcd(a, b), xa = g (mod b), 0 <= x < b/g
constexpr std::pair<long long, long long> inv_gcd(long long a, long long b) {
a = safe_mod(a, b);
if (a == 0) return {b, 0};
// Contracts:
// [1] s - m0 * a = 0 (mod b)
// [2] t - m1 * a = 0 (mod b)
// [3] s * |m1| + t * |m0| <= b
long long s = b, t = a;
long long m0 = 0, m1 = 1;
while (t) {
long long u = s / t;
s -= t * u;
m0 -= m1 * u; // |m1 * u| <= |m1| * s <= b
// [3]:
// (s - t * u) * |m1| + t * |m0 - m1 * u|
// <= s * |m1| - t * u * |m1| + t * (|m0| + |m1| * u)
// = s * |m1| + t * |m0| <= b
auto tmp = s;
s = t;
t = tmp;
tmp = m0;
m0 = m1;
m1 = tmp;
}
// by [3]: |m0| <= b/g
// by g != b: |m0| < b/g
if (m0 < 0) m0 += b / s;
return {s, m0};
}
// Compile time primitive root
// @param m must be prime
// @return primitive root (and minimum in now)
constexpr int primitive_root_constexpr(int m) {
if (m == 2) return 1;
if (m == 167772161) return 3;
if (m == 469762049) return 3;
if (m == 754974721) return 11;
if (m == 998244353) return 3;
int divs[20] = {};
divs[0] = 2;
int cnt = 1;
int x = (m - 1) / 2;
while (x % 2 == 0) x /= 2;
for (int i = 3; (long long)(i)*i <= x; i += 2) {
if (x % i == 0) {
divs[cnt++] = i;
while (x % i == 0) {
x /= i;
}
}
}
if (x > 1) {
divs[cnt++] = x;
}
for (int g = 2;; g++) {
bool ok = true;
for (int i = 0; i < cnt; i++) {
if (pow_mod_constexpr(g, (m - 1) / divs[i], m) == 1) {
ok = false;
break;
}
}
if (ok) return g;
}
}
template <int m> constexpr int primitive_root = primitive_root_constexpr(m);
// @param n `n < 2^32`
// @param m `1 <= m < 2^32`
// @return sum_{i=0}^{n-1} floor((ai + b) / m) (mod 2^64)
unsigned long long floor_sum_unsigned(unsigned long long n,
unsigned long long m,
unsigned long long a,
unsigned long long b) {
unsigned long long ans = 0;
while (true) {
if (a >= m) {
ans += n * (n - 1) / 2 * (a / m);
a %= m;
}
if (b >= m) {
ans += n * (b / m);
b %= m;
}
unsigned long long y_max = a * n + b;
if (y_max < m) break;
// y_max < m * (n + 1)
// floor(y_max / m) <= n
n = (unsigned long long)(y_max / m);
b = (unsigned long long)(y_max % m);
std::swap(m, a);
}
return ans;
}
} // namespace internal
} // namespace atcoder
namespace atcoder {
namespace internal {
#ifndef _MSC_VER
template <class T>
using is_signed_int128 =
typename std::conditional<std::is_same<T, __int128_t>::value ||
std::is_same<T, __int128>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int128 =
typename std::conditional<std::is_same<T, __uint128_t>::value ||
std::is_same<T, unsigned __int128>::value,
std::true_type,
std::false_type>::type;
template <class T>
using make_unsigned_int128 =
typename std::conditional<std::is_same<T, __int128_t>::value,
__uint128_t,
unsigned __int128>;
template <class T>
using is_integral = typename std::conditional<std::is_integral<T>::value ||
is_signed_int128<T>::value ||
is_unsigned_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_signed_int = typename std::conditional<(is_integral<T>::value &&
std::is_signed<T>::value) ||
is_signed_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int =
typename std::conditional<(is_integral<T>::value &&
std::is_unsigned<T>::value) ||
is_unsigned_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using to_unsigned = typename std::conditional<
is_signed_int128<T>::value,
make_unsigned_int128<T>,
typename std::conditional<std::is_signed<T>::value,
std::make_unsigned<T>,
std::common_type<T>>::type>::type;
#else
template <class T> using is_integral = typename std::is_integral<T>;
template <class T>
using is_signed_int =
typename std::conditional<is_integral<T>::value && std::is_signed<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int =
typename std::conditional<is_integral<T>::value &&
std::is_unsigned<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using to_unsigned = typename std::conditional<is_signed_int<T>::value,
std::make_unsigned<T>,
std::common_type<T>>::type;
#endif
template <class T>
using is_signed_int_t = std::enable_if_t<is_signed_int<T>::value>;
template <class T>
using is_unsigned_int_t = std::enable_if_t<is_unsigned_int<T>::value>;
template <class T> using to_unsigned_t = typename to_unsigned<T>::type;
} // namespace internal
} // namespace atcoder
namespace atcoder {
namespace internal {
struct modint_base {};
struct static_modint_base : modint_base {};
template <class T> using is_modint = std::is_base_of<modint_base, T>;
template <class T> using is_modint_t = std::enable_if_t<is_modint<T>::value>;
} // namespace internal
template <int m, std::enable_if_t<(1 <= m)>* = nullptr>
struct static_modint : internal::static_modint_base {
using mint = static_modint;
public:
static constexpr int mod() { return m; }
static mint raw(int v) {
mint x;
x._v = v;
return x;
}
static_modint() : _v(0) {}
template <class T, internal::is_signed_int_t<T>* = nullptr>
static_modint(T v) {
long long x = (long long)(v % (long long)(umod()));
if (x < 0) x += umod();
_v = (unsigned int)(x);
}
template <class T, internal::is_unsigned_int_t<T>* = nullptr>
static_modint(T v) {
_v = (unsigned int)(v % umod());
}
unsigned int val() const { return _v; }
mint& operator++() {
_v++;
if (_v == umod()) _v = 0;
return *this;
}
mint& operator--() {
if (_v == 0) _v = umod();
_v--;
return *this;
}
mint operator++(int) {
mint result = *this;
++*this;
return result;
}
mint operator--(int) {
mint result = *this;
--*this;
return result;
}
mint& operator+=(const mint& rhs) {
_v += rhs._v;
if (_v >= umod()) _v -= umod();
return *this;
}
mint& operator-=(const mint& rhs) {
_v -= rhs._v;
if (_v >= umod()) _v += umod();
return *this;
}
mint& operator*=(const mint& rhs) {
unsigned long long z = _v;
z *= rhs._v;
_v = (unsigned int)(z % umod());
return *this;
}
mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); }
mint operator+() const { return *this; }
mint operator-() const { return mint() - *this; }
mint pow(long long n) const {
assert(0 <= n);
mint x = *this, r = 1;
while (n) {
if (n & 1) r *= x;
x *= x;
n >>= 1;
}
return r;
}
mint inv() const {
if (prime) {
assert(_v);
return pow(umod() - 2);
} else {
auto eg = internal::inv_gcd(_v, m);
assert(eg.first == 1);
return eg.second;
}
}
friend mint operator+(const mint& lhs, const mint& rhs) {
return mint(lhs) += rhs;
}
friend mint operator-(const mint& lhs, const mint& rhs) {
return mint(lhs) -= rhs;
}
friend mint operator*(const mint& lhs, const mint& rhs) {
return mint(lhs) *= rhs;
}
friend mint operator/(const mint& lhs, const mint& rhs) {
return mint(lhs) /= rhs;
}
friend bool operator==(const mint& lhs, const mint& rhs) {
return lhs._v == rhs._v;
}
friend bool operator!=(const mint& lhs, const mint& rhs) {
return lhs._v != rhs._v;
}
private:
unsigned int _v;
static constexpr unsigned int umod() { return m; }
static constexpr bool prime = internal::is_prime<m>;
};
template <int id> struct dynamic_modint : internal::modint_base {
using mint = dynamic_modint;
public:
static int mod() { return (int)(bt.umod()); }
static void set_mod(int m) {
assert(1 <= m);
bt = internal::barrett(m);
}
static mint raw(int v) {
mint x;
x._v = v;
return x;
}
dynamic_modint() : _v(0) {}
template <class T, internal::is_signed_int_t<T>* = nullptr>
dynamic_modint(T v) {
long long x = (long long)(v % (long long)(mod()));
if (x < 0) x += mod();
_v = (unsigned int)(x);
}
template <class T, internal::is_unsigned_int_t<T>* = nullptr>
dynamic_modint(T v) {
_v = (unsigned int)(v % mod());
}
unsigned int val() const { return _v; }
mint& operator++() {
_v++;
if (_v == umod()) _v = 0;
return *this;
}
mint& operator--() {
if (_v == 0) _v = umod();
_v--;
return *this;
}
mint operator++(int) {
mint result = *this;
++*this;
return result;
}
mint operator--(int) {
mint result = *this;
--*this;
return result;
}
mint& operator+=(const mint& rhs) {
_v += rhs._v;
if (_v >= umod()) _v -= umod();
return *this;
}
mint& operator-=(const mint& rhs) {
_v += mod() - rhs._v;
if (_v >= umod()) _v -= umod();
return *this;
}
mint& operator*=(const mint& rhs) {
_v = bt.mul(_v, rhs._v);
return *this;
}
mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); }
mint operator+() const { return *this; }
mint operator-() const { return mint() - *this; }
mint pow(long long n) const {
assert(0 <= n);
mint x = *this, r = 1;
while (n) {
if (n & 1) r *= x;
x *= x;
n >>= 1;
}
return r;
}
mint inv() const {
auto eg = internal::inv_gcd(_v, mod());
assert(eg.first == 1);
return eg.second;
}
friend mint operator+(const mint& lhs, const mint& rhs) {
return mint(lhs) += rhs;
}
friend mint operator-(const mint& lhs, const mint& rhs) {
return mint(lhs) -= rhs;
}
friend mint operator*(const mint& lhs, const mint& rhs) {
return mint(lhs) *= rhs;
}
friend mint operator/(const mint& lhs, const mint& rhs) {
return mint(lhs) /= rhs;
}
friend bool operator==(const mint& lhs, const mint& rhs) {
return lhs._v == rhs._v;
}
friend bool operator!=(const mint& lhs, const mint& rhs) {
return lhs._v != rhs._v;
}
private:
unsigned int _v;
static internal::barrett bt;
static unsigned int umod() { return bt.umod(); }
};
template <int id> internal::barrett dynamic_modint<id>::bt(998244353);
using modint998244353 = static_modint<998244353>;
using modint1000000007 = static_modint<1000000007>;
using modint = dynamic_modint<-1>;
namespace internal {
template <class T>
using is_static_modint = std::is_base_of<internal::static_modint_base, T>;
template <class T>
using is_static_modint_t = std::enable_if_t<is_static_modint<T>::value>;
template <class> struct is_dynamic_modint : public std::false_type {};
template <int id>
struct is_dynamic_modint<dynamic_modint<id>> : public std::true_type {};
template <class T>
using is_dynamic_modint_t = std::enable_if_t<is_dynamic_modint<T>::value>;
} // namespace internal
} // namespace atcoder
using namespace std;
using ll = long long;
using mint = atcoder::modint998244353;
const int MAX_N = 1024, MAX_LOG = 10;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(15);
int n;
cin >> n;
vector<int> type(n), a(n), b(n), x(n), y(n);
string tmp;
for (int i = 0; i < n; i++) {
cin >> tmp;
if (tmp == "POP") {
type[i] = 0;
cin >> a[i];
cin >> tmp;
assert(tmp == "GOTO");
cin >> tmp;
x[i] = 0;
for (char c : tmp) {
if (c == ';') break;
x[i] = x[i] * 10 + (c - '0');
}
cin >> tmp;
assert(tmp == "PUSH");
cin >> b[i];
cin >> tmp;
assert(tmp == "GOTO");
cin >> y[i];
} else {
type[i] = 1;
assert(tmp == "HALT;");
cin >> tmp;
assert(tmp == "PUSH");
cin >> b[i];
cin >> tmp;
assert(tmp == "GOTO");
cin >> y[i];
}
}
for (int i = 0; i < n; i++) {
if (type[i] == 0) {
a[i]--, b[i]--;
x[i]--, y[i]--;
} else {
b[i]--;
y[i]--;
}
}
vector<mint> w(n, 1);
vector dp(MAX_LOG + 1, vector<bitset<MAX_N>>(n));
vector nxt(MAX_LOG + 1, vector<int>(n));
vector W(MAX_LOG + 1, vector<mint>(n));
while (true) {
for (int i = 0; i < n; i++) {
dp[0][i].reset();
if (type[i] == 0) dp[0][i][a[i]] = 1;
nxt[0][i] = (b[i] == -1 ? y[i] : i);
W[0][i] = w[i];
}
for (int i = 0; i < MAX_LOG; i++) {
for (int j = 0; j < n; j++) {
dp[i + 1][j] = dp[i][j] | dp[i][nxt[i][j]];
nxt[i + 1][j] = nxt[i][nxt[i][j]];
W[i + 1][j] = W[i][j] + W[i][nxt[i][j]];
}
}
int target = -1;
for (int i = 0; i < n; i++) {
if (b[i] == -1) continue;
if (not dp[MAX_LOG][y[i]][b[i]]) continue;
target = i;
break;
}
if (target == -1) break;
int to = y[target];
mint sum = w[target];
for (int i = MAX_LOG; i >= 0; i--) {
if (not dp[i][to][b[target]]) {
sum += W[i][to];
to = nxt[i][to];
}
}
assert(type[to] == 0 and a[to] == b[target]);
b[target] = -1;
y[target] = x[to];
w[target] = sum + 1;
}
mint ans = 1;
vector<bool> seen(n, false);
for (int cur = 0;;) {
if (seen[cur]) {
cout << -1 << "\n";
return 0;
}
seen[cur] = true;
if (type[cur] == 0) {
if (b[cur] == -1) {
ans += w[cur];
cur = y[cur];
} else {
cout << -1 << "\n";
return 0;
}
} else {
cout << ans.val() << "\n";
return 0;
}
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3828kb
input:
1 HALT; PUSH 1 GOTO 1
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
5 POP 1 GOTO 2; PUSH 1 GOTO 2 HALT; PUSH 1 GOTO 3 POP 1 GOTO 4; PUSH 2 GOTO 4 POP 1 GOTO 2; PUSH 2 GOTO 4 HALT; PUSH 99 GOTO 4
output:
5
result:
ok 1 number(s): "5"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
1 POP 1 GOTO 1; PUSH 1 GOTO 1
output:
-1
result:
ok 1 number(s): "-1"
Test #4:
score: 0
Accepted
time: 1ms
memory: 3872kb
input:
61 POP 62 GOTO 61; PUSH 30 GOTO 60 POP 1 GOTO 3; PUSH 62 GOTO 61 POP 2 GOTO 61; PUSH 62 GOTO 61 POP 4 GOTO 7; PUSH 2 GOTO 61 POP 62 GOTO 61; PUSH 3 GOTO 4 POP 62 GOTO 61; PUSH 3 GOTO 5 POP 5 GOTO 10; PUSH 3 GOTO 6 POP 62 GOTO 61; PUSH 4 GOTO 7 POP 62 GOTO 61; PUSH 4 GOTO 8 POP 6 GOTO 12; PUSH 4 GOTO...
output:
150994941
result:
ok 1 number(s): "150994941"
Test #5:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
60 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 51 GOTO 3; PUSH 51 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 52 GOTO 5; PUSH 52 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 53 GOTO 7; PUSH 53 GOTO 6 POP 4 GOTO 8; PUSH 4 GOTO 1 POP 54 GOTO 9; PUSH 54 GOTO 8 POP 5 GOTO 10; PUSH 5 GOTO 1 POP 55 GOTO 11; PUSH 55 GOTO 10 POP ...
output:
150994941
result:
ok 1 number(s): "150994941"
Test #6:
score: 0
Accepted
time: 2ms
memory: 3712kb
input:
119 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 259 GOTO 5; PUSH 259 GOTO 4 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 6 GOTO 8; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 8 GOTO 10; PUSH 8 GOTO 1 POP 264 GOTO 11; PUSH 264 GOTO 10 POP 9...
output:
944833405
result:
ok 1 number(s): "944833405"
Test #7:
score: 0
Accepted
time: 5ms
memory: 3720kb
input:
198 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 257 GOTO 3; PUSH 257 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 258 GOTO 5; PUSH 258 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 259 GOTO 7; PUSH 259 GOTO 6 POP 4 GOTO 8; PUSH 4 GOTO 1 POP 260 GOTO 9; PUSH 260 GOTO 8 POP 5 GOTO 10; PUSH 5 GOTO 1 POP 6 GOTO 11; PUSH 6 GOTO ...
output:
795829251
result:
ok 1 number(s): "795829251"
Test #8:
score: 0
Accepted
time: 30ms
memory: 3880kb
input:
505 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 257 GOTO 3; PUSH 257 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 258 GOTO 5; PUSH 258 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 259 GOTO 7; PUSH 259 GOTO 6 POP 4 GOTO 8; PUSH 4 GOTO 1 POP 260 GOTO 9; PUSH 260 GOTO 8 POP 5 GOTO 10; PUSH 5 GOTO 1 POP 261 GOTO 11; PUSH 261 G...
output:
134514797
result:
ok 1 number(s): "134514797"
Test #9:
score: 0
Accepted
time: 31ms
memory: 3976kb
input:
512 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 257 GOTO 3; PUSH 257 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 258 GOTO 5; PUSH 258 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 259 GOTO 7; PUSH 259 GOTO 6 POP 4 GOTO 8; PUSH 4 GOTO 1 POP 260 GOTO 9; PUSH 260 GOTO 8 POP 5 GOTO 10; PUSH 5 GOTO 1 POP 261 GOTO 11; PUSH 261 G...
output:
339814067
result:
ok 1 number(s): "339814067"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
19 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 51 GOTO 3; PUSH 51 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 52 GOTO 5; PUSH 52 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 4 GOTO 7; PUSH 4 GOTO 1 POP 54 GOTO 8; PUSH 54 GOTO 7 POP 5 GOTO 9; PUSH 5 GOTO 1 POP 55 GOTO 10; PUSH 55 GOTO 9 POP 6 GOTO 11; PUSH 6 GOTO 1 POP 56 ...
output:
1919
result:
ok 1 number(s): "1919"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
21 POP 22 GOTO 21; PUSH 6 GOTO 20 POP 1 GOTO 3; PUSH 22 GOTO 21 POP 2 GOTO 21; PUSH 22 GOTO 21 POP 22 GOTO 21; PUSH 2 GOTO 21 POP 4 GOTO 7; PUSH 2 GOTO 4 POP 22 GOTO 21; PUSH 3 GOTO 5 POP 5 GOTO 10; PUSH 3 GOTO 6 POP 22 GOTO 21; PUSH 4 GOTO 7 POP 22 GOTO 21; PUSH 4 GOTO 8 POP 6 GOTO 14; PUSH 4 GOTO ...
output:
1919
result:
ok 1 number(s): "1919"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
21 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 52 GOTO 4; PUSH 52 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 53 GOTO 6; PUSH 53 GOTO 5 POP 4 GOTO 7; PUSH 4 GOTO 1 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 56 GOTO 10; PUSH 56 GOTO 9 POP 7 GOTO 11; PUSH 7 GOTO 1 POP 8 GOT...
output:
11451
result:
ok 1 number(s): "11451"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
25 POP 26 GOTO 25; PUSH 9 GOTO 24 POP 1 GOTO 3; PUSH 26 GOTO 25 POP 2 GOTO 25; PUSH 26 GOTO 25 POP 26 GOTO 25; PUSH 2 GOTO 25 POP 4 GOTO 7; PUSH 2 GOTO 4 POP 26 GOTO 25; PUSH 3 GOTO 5 POP 5 GOTO 9; PUSH 3 GOTO 6 POP 26 GOTO 25; PUSH 4 GOTO 7 POP 6 GOTO 11; PUSH 4 GOTO 8 POP 26 GOTO 25; PUSH 5 GOTO 9...
output:
11451
result:
ok 1 number(s): "11451"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
30 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 53 GOTO 5; PUSH 53 GOTO 4 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 55 GOTO 8; PUSH 55 GOTO 7 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 56 GOTO 10; PUSH 56 GOTO 9 POP 7 GOTO 11; PUSH 7 GOTO 1 POP 8 GOT...
output:
1234567
result:
ok 1 number(s): "1234567"
Test #15:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
38 POP 39 GOTO 38; PUSH 13 GOTO 37 POP 1 GOTO 3; PUSH 39 GOTO 38 POP 2 GOTO 38; PUSH 39 GOTO 38 POP 4 GOTO 7; PUSH 2 GOTO 38 POP 39 GOTO 38; PUSH 3 GOTO 4 POP 39 GOTO 38; PUSH 3 GOTO 5 POP 5 GOTO 10; PUSH 3 GOTO 6 POP 39 GOTO 38; PUSH 4 GOTO 7 POP 39 GOTO 38; PUSH 4 GOTO 8 POP 6 GOTO 12; PUSH 4 GOTO...
output:
1234567
result:
ok 1 number(s): "1234567"
Test #16:
score: 0
Accepted
time: 1ms
memory: 3680kb
input:
41 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 51 GOTO 3; PUSH 51 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 52 GOTO 5; PUSH 52 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 4 GOTO 7; PUSH 4 GOTO 1 POP 54 GOTO 8; PUSH 54 GOTO 7 POP 5 GOTO 9; PUSH 5 GOTO 1 POP 6 GOTO 10; PUSH 6 GOTO 1 POP 56 GOTO 11; PUSH 56 GOTO 10 POP 7 ...
output:
123456789
result:
ok 1 number(s): "123456789"
Test #17:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
53 POP 54 GOTO 53; PUSH 22 GOTO 52 POP 1 GOTO 3; PUSH 54 GOTO 53 POP 2 GOTO 53; PUSH 54 GOTO 53 POP 54 GOTO 53; PUSH 2 GOTO 53 POP 54 GOTO 53; PUSH 2 GOTO 4 POP 4 GOTO 8; PUSH 2 GOTO 5 POP 54 GOTO 53; PUSH 3 GOTO 6 POP 5 GOTO 11; PUSH 3 GOTO 7 POP 54 GOTO 53; PUSH 4 GOTO 8 POP 54 GOTO 53; PUSH 4 GOT...
output:
123456789
result:
ok 1 number(s): "123456789"
Test #18:
score: 0
Accepted
time: 1ms
memory: 3768kb
input:
59 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 51 GOTO 3; PUSH 51 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 52 GOTO 5; PUSH 52 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 53 GOTO 7; PUSH 53 GOTO 6 POP 4 GOTO 8; PUSH 4 GOTO 1 POP 54 GOTO 9; PUSH 54 GOTO 8 POP 5 GOTO 10; PUSH 5 GOTO 1 POP 55 GOTO 11; PUSH 55 GOTO 10 POP ...
output:
150994939
result:
ok 1 number(s): "150994939"
Test #19:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
61 POP 62 GOTO 61; PUSH 25 GOTO 60 POP 1 GOTO 3; PUSH 62 GOTO 61 POP 2 GOTO 61; PUSH 62 GOTO 61 POP 4 GOTO 8; PUSH 2 GOTO 61 POP 62 GOTO 61; PUSH 3 GOTO 4 POP 62 GOTO 61; PUSH 3 GOTO 5 POP 62 GOTO 61; PUSH 3 GOTO 6 POP 5 GOTO 11; PUSH 3 GOTO 7 POP 62 GOTO 61; PUSH 4 GOTO 8 POP 62 GOTO 61; PUSH 4 GOT...
output:
150994941
result:
ok 1 number(s): "150994941"
Test #20:
score: 0
Accepted
time: 2ms
memory: 3768kb
input:
106 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 515 GOTO 5; PUSH 515 GOTO 4 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 518 GOTO 10; PUSH 518 GOTO 9 POP 7 GOTO 11; PUSH 7 GOTO 1 PO...
output:
547101648
result:
ok 1 number(s): "547101648"
Test #21:
score: 0
Accepted
time: 14ms
memory: 4036kb
input:
339 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 515 GOTO 5; PUSH 515 GOTO 4 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 6 GOTO 8; PUSH 6 GOTO 1 POP 518 GOTO 9; PUSH 518 GOTO 8 POP 7 GOTO 10; PUSH 7 GOTO 1 POP 8 GOTO 11; PUSH 8 GOTO 1 POP 9 ...
output:
761576546
result:
ok 1 number(s): "761576546"
Test #22:
score: 0
Accepted
time: 17ms
memory: 3752kb
input:
381 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 514 GOTO 4; PUSH 514 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 518 GOTO 10; PUSH 518 GOTO 9 POP 7 GOTO 11; PUSH 7 GOTO 1 PO...
output:
722131913
result:
ok 1 number(s): "722131913"
Test #23:
score: 0
Accepted
time: 16ms
memory: 3744kb
input:
381 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 514 GOTO 4; PUSH 514 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 518 GOTO 10; PUSH 518 GOTO 9 POP 7 GOTO 11; PUSH 7 GOTO 1 PO...
output:
722131911
result:
ok 1 number(s): "722131911"
Test #24:
score: 0
Accepted
time: 64ms
memory: 4412kb
input:
765 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 514 GOTO 4; PUSH 514 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 518 GOTO 10; PUSH 518 GOTO 9 POP 7 GOTO 11; PUSH 7 GOTO 1 PO...
output:
685576713
result:
ok 1 number(s): "685576713"
Test #25:
score: 0
Accepted
time: 66ms
memory: 4364kb
input:
765 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 514 GOTO 4; PUSH 514 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 518 GOTO 10; PUSH 518 GOTO 9 POP 7 GOTO 11; PUSH 7 GOTO 1 PO...
output:
685576715
result:
ok 1 number(s): "685576715"
Test #26:
score: 0
Accepted
time: 114ms
memory: 4648kb
input:
969 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 515 GOTO 5; PUSH 515 GOTO 4 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 517 GOTO 9; PUSH 517 GOTO 8 POP 6 GOTO 10; PUSH 6 GOTO 1 POP 7 GOTO 11; PUSH 7 GOTO 1 PO...
output:
921893460
result:
ok 1 number(s): "921893460"
Test #27:
score: 0
Accepted
time: 120ms
memory: 4712kb
input:
994 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 515 GOTO 5; PUSH 515 GOTO 4 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 6 GOTO 9; PUSH 6 GOTO 1 POP 7 GOTO 10; PUSH 7 GOTO 1 POP 8 GOTO 11; PUSH 8 GOTO 1 POP 52...
output:
96242942
result:
ok 1 number(s): "96242942"
Test #28:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
64 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO 1...
output:
932051909
result:
ok 1 number(s): "932051909"
Test #29:
score: 0
Accepted
time: 2ms
memory: 3720kb
input:
128 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO ...
output:
299560063
result:
ok 1 number(s): "299560063"
Test #30:
score: 0
Accepted
time: 8ms
memory: 3784kb
input:
256 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO ...
output:
169907033
result:
ok 1 number(s): "169907033"
Test #31:
score: 0
Accepted
time: 29ms
memory: 3924kb
input:
512 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO ...
output:
60241439
result:
ok 1 number(s): "60241439"
Test #32:
score: 0
Accepted
time: 122ms
memory: 4712kb
input:
1023 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO...
output:
796722581
result:
ok 1 number(s): "796722581"
Test #33:
score: 0
Accepted
time: 121ms
memory: 4772kb
input:
1024 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO...
output:
595200810
result:
ok 1 number(s): "595200810"
Test #34:
score: 0
Accepted
time: 127ms
memory: 4736kb
input:
1024 POP 1 GOTO 1; PUSH 1023 GOTO 2 POP 2 GOTO 3; PUSH 2 GOTO 2 POP 3 GOTO 4; PUSH 3 GOTO 2 POP 4 GOTO 5; PUSH 4 GOTO 2 POP 5 GOTO 6; PUSH 5 GOTO 2 POP 6 GOTO 7; PUSH 6 GOTO 2 POP 7 GOTO 8; PUSH 7 GOTO 2 POP 8 GOTO 9; PUSH 8 GOTO 2 POP 9 GOTO 10; PUSH 9 GOTO 2 POP 10 GOTO 11; PUSH 10 GOTO 2 POP 11 G...
output:
694574278
result:
ok 1 number(s): "694574278"
Test #35:
score: 0
Accepted
time: 127ms
memory: 4768kb
input:
1023 POP 1 GOTO 1; PUSH 1023 GOTO 2 POP 2 GOTO 3; PUSH 2 GOTO 2 POP 3 GOTO 4; PUSH 3 GOTO 2 POP 4 GOTO 5; PUSH 4 GOTO 2 POP 5 GOTO 6; PUSH 5 GOTO 2 POP 6 GOTO 7; PUSH 6 GOTO 2 POP 7 GOTO 8; PUSH 7 GOTO 2 POP 8 GOTO 9; PUSH 8 GOTO 2 POP 9 GOTO 10; PUSH 9 GOTO 2 POP 10 GOTO 11; PUSH 10 GOTO 2 POP 11 G...
output:
91626451
result:
ok 1 number(s): "91626451"
Test #36:
score: 0
Accepted
time: 118ms
memory: 4780kb
input:
1022 POP 1 GOTO 1; PUSH 1023 GOTO 2 POP 2 GOTO 3; PUSH 2 GOTO 2 POP 3 GOTO 4; PUSH 3 GOTO 2 POP 4 GOTO 5; PUSH 4 GOTO 2 POP 5 GOTO 6; PUSH 5 GOTO 2 POP 6 GOTO 7; PUSH 6 GOTO 2 POP 7 GOTO 8; PUSH 7 GOTO 2 POP 8 GOTO 9; PUSH 8 GOTO 2 POP 9 GOTO 10; PUSH 9 GOTO 2 POP 10 GOTO 11; PUSH 10 GOTO 2 POP 11 G...
output:
693013925
result:
ok 1 number(s): "693013925"
Test #37:
score: 0
Accepted
time: 124ms
memory: 4640kb
input:
1022 POP 1 GOTO 1; PUSH 1023 GOTO 2 POP 2 GOTO 3; PUSH 2 GOTO 2 POP 3 GOTO 4; PUSH 3 GOTO 2 POP 4 GOTO 5; PUSH 4 GOTO 2 POP 5 GOTO 6; PUSH 5 GOTO 2 POP 6 GOTO 7; PUSH 6 GOTO 2 POP 7 GOTO 8; PUSH 7 GOTO 2 POP 8 GOTO 9; PUSH 8 GOTO 2 POP 9 GOTO 10; PUSH 9 GOTO 2 POP 10 GOTO 11; PUSH 10 GOTO 2 POP 11 G...
output:
894858942
result:
ok 1 number(s): "894858942"
Test #38:
score: 0
Accepted
time: 127ms
memory: 4848kb
input:
1022 POP 1 GOTO 1; PUSH 1023 GOTO 2 POP 2 GOTO 3; PUSH 2 GOTO 2 POP 3 GOTO 4; PUSH 3 GOTO 2 POP 4 GOTO 5; PUSH 4 GOTO 2 POP 5 GOTO 6; PUSH 5 GOTO 2 POP 6 GOTO 7; PUSH 6 GOTO 2 POP 7 GOTO 8; PUSH 7 GOTO 2 POP 8 GOTO 9; PUSH 8 GOTO 2 POP 9 GOTO 10; PUSH 9 GOTO 2 POP 10 GOTO 11; PUSH 10 GOTO 2 POP 11 G...
output:
327292712
result:
ok 1 number(s): "327292712"
Test #39:
score: 0
Accepted
time: 135ms
memory: 4708kb
input:
1024 POP 1 GOTO 51; PUSH 1 GOTO 558 POP 1 GOTO 782; PUSH 1 GOTO 139 POP 1 GOTO 459; PUSH 1 GOTO 318 HALT; PUSH 1 GOTO 334 POP 1 GOTO 724; PUSH 1 GOTO 937 POP 1 GOTO 176; PUSH 1 GOTO 302 POP 1 GOTO 488; PUSH 1 GOTO 750 POP 1 GOTO 312; PUSH 1 GOTO 701 POP 1 GOTO 66; PUSH 1 GOTO 216 HALT; PUSH 1 GOTO 3...
output:
-1
result:
ok 1 number(s): "-1"
Test #40:
score: 0
Accepted
time: 116ms
memory: 4728kb
input:
1024 POP 2 GOTO 856; PUSH 1 GOTO 307 HALT; PUSH 1 GOTO 2 POP 2 GOTO 351; PUSH 2 GOTO 360 POP 1 GOTO 398; PUSH 1 GOTO 724 POP 1 GOTO 789; PUSH 2 GOTO 606 POP 1 GOTO 253; PUSH 2 GOTO 459 POP 1 GOTO 615; PUSH 1 GOTO 834 POP 2 GOTO 802; PUSH 2 GOTO 120 POP 2 GOTO 836; PUSH 1 GOTO 45 POP 1 GOTO 701; PUSH...
output:
-1
result:
ok 1 number(s): "-1"
Test #41:
score: 0
Accepted
time: 69ms
memory: 4796kb
input:
1024 POP 3 GOTO 638; PUSH 2 GOTO 57 POP 3 GOTO 805; PUSH 1 GOTO 504 POP 3 GOTO 589; PUSH 2 GOTO 100 POP 1 GOTO 312; PUSH 1 GOTO 84 POP 3 GOTO 627; PUSH 1 GOTO 706 HALT; PUSH 2 GOTO 616 POP 3 GOTO 741; PUSH 2 GOTO 917 POP 2 GOTO 268; PUSH 3 GOTO 562 POP 2 GOTO 583; PUSH 3 GOTO 898 POP 2 GOTO 953; PUS...
output:
-1
result:
ok 1 number(s): "-1"
Test #42:
score: 0
Accepted
time: 125ms
memory: 4848kb
input:
1024 POP 2 GOTO 1013; PUSH 1 GOTO 257 HALT; PUSH 1 GOTO 884 POP 1 GOTO 934; PUSH 1 GOTO 813 POP 2 GOTO 198; PUSH 1 GOTO 289 POP 2 GOTO 566; PUSH 1 GOTO 639 HALT; PUSH 1 GOTO 771 POP 1 GOTO 786; PUSH 1 GOTO 470 POP 2 GOTO 654; PUSH 1 GOTO 613 POP 2 GOTO 941; PUSH 1 GOTO 974 POP 1 GOTO 567; PUSH 2 GOT...
output:
-1
result:
ok 1 number(s): "-1"
Test #43:
score: 0
Accepted
time: 65ms
memory: 4744kb
input:
1024 POP 3 GOTO 93; PUSH 3 GOTO 186 POP 3 GOTO 134; PUSH 3 GOTO 465 HALT; PUSH 3 GOTO 296 POP 2 GOTO 34; PUSH 1 GOTO 121 POP 2 GOTO 742; PUSH 2 GOTO 347 POP 1 GOTO 194; PUSH 2 GOTO 686 POP 1 GOTO 925; PUSH 3 GOTO 785 POP 2 GOTO 207; PUSH 3 GOTO 285 POP 3 GOTO 545; PUSH 1 GOTO 246 POP 2 GOTO 60; PUSH...
output:
-1
result:
ok 1 number(s): "-1"
Test #44:
score: 0
Accepted
time: 2ms
memory: 4724kb
input:
1024 POP 444 GOTO 458; PUSH 498 GOTO 347 HALT; PUSH 235 GOTO 270 POP 378 GOTO 912; PUSH 333 GOTO 478 POP 574 GOTO 942; PUSH 618 GOTO 1005 POP 517 GOTO 595; PUSH 656 GOTO 1007 POP 734 GOTO 1024; PUSH 1010 GOTO 212 POP 248 GOTO 4; PUSH 67 GOTO 997 POP 995 GOTO 914; PUSH 236 GOTO 210 POP 540 GOTO 614; ...
output:
-1
result:
ok 1 number(s): "-1"
Test #45:
score: 0
Accepted
time: 3ms
memory: 4936kb
input:
1024 POP 66 GOTO 580; PUSH 64 GOTO 956 POP 52 GOTO 1001; PUSH 97 GOTO 165 HALT; PUSH 15 GOTO 344 POP 69 GOTO 87; PUSH 31 GOTO 85 POP 71 GOTO 970; PUSH 12 GOTO 342 POP 85 GOTO 386; PUSH 4 GOTO 518 POP 83 GOTO 534; PUSH 58 GOTO 259 POP 38 GOTO 621; PUSH 16 GOTO 252 POP 38 GOTO 216; PUSH 87 GOTO 225 PO...
output:
-1
result:
ok 1 number(s): "-1"
Test #46:
score: 0
Accepted
time: 98ms
memory: 4768kb
input:
1024 POP 1 GOTO 1008; PUSH 1 GOTO 51 HALT; PUSH 1 GOTO 163 HALT; PUSH 1 GOTO 139 HALT; PUSH 1 GOTO 974 POP 1 GOTO 803; PUSH 1 GOTO 334 HALT; PUSH 1 GOTO 906 HALT; PUSH 1 GOTO 213 HALT; PUSH 1 GOTO 176 HALT; PUSH 1 GOTO 735 HALT; PUSH 1 GOTO 750 HALT; PUSH 1 GOTO 658 HALT; PUSH 1 GOTO 18 POP 1 GOTO 2...
output:
5
result:
ok 1 number(s): "5"
Test #47:
score: 0
Accepted
time: 48ms
memory: 4808kb
input:
1024 POP 2 GOTO 825; PUSH 2 GOTO 856 POP 2 GOTO 2; PUSH 1 GOTO 794 HALT; PUSH 2 GOTO 351 HALT; PUSH 2 GOTO 209 POP 2 GOTO 118; PUSH 2 GOTO 611 HALT; PUSH 1 GOTO 606 HALT; PUSH 1 GOTO 834 POP 1 GOTO 829; PUSH 1 GOTO 855 POP 2 GOTO 902; PUSH 2 GOTO 570 HALT; PUSH 2 GOTO 311 HALT; PUSH 1 GOTO 836 POP 1...
output:
-1
result:
ok 1 number(s): "-1"
Test #48:
score: 0
Accepted
time: 28ms
memory: 4848kb
input:
1024 POP 3 GOTO 643; PUSH 3 GOTO 638 POP 1 GOTO 118; PUSH 3 GOTO 805 HALT; PUSH 3 GOTO 31 HALT; PUSH 2 GOTO 100 HALT; PUSH 1 GOTO 90 HALT; PUSH 3 GOTO 787 POP 1 GOTO 706; PUSH 2 GOTO 130 HALT; PUSH 3 GOTO 859 POP 2 GOTO 917; PUSH 3 GOTO 872 HALT; PUSH 3 GOTO 268 HALT; PUSH 1 GOTO 283 HALT; PUSH 3 GO...
output:
-1
result:
ok 1 number(s): "-1"
Test #49:
score: 0
Accepted
time: 40ms
memory: 4780kb
input:
1024 POP 1 GOTO 299; PUSH 2 GOTO 1013 POP 2 GOTO 884; PUSH 1 GOTO 317 POP 1 GOTO 813; PUSH 2 GOTO 560 HALT; PUSH 1 GOTO 198 POP 2 GOTO 719; PUSH 2 GOTO 566 POP 2 GOTO 771; PUSH 1 GOTO 197 POP 1 GOTO 470; PUSH 2 GOTO 135 HALT; PUSH 1 GOTO 654 POP 1 GOTO 481; PUSH 2 GOTO 941 HALT; PUSH 1 GOTO 851 HALT...
output:
3
result:
ok 1 number(s): "3"
Test #50:
score: 0
Accepted
time: 25ms
memory: 4844kb
input:
1024 POP 2 GOTO 1022; PUSH 3 GOTO 93 HALT; PUSH 3 GOTO 823 POP 1 GOTO 140; PUSH 1 GOTO 218 HALT; PUSH 3 GOTO 922 POP 2 GOTO 999; PUSH 2 GOTO 24 HALT; PUSH 3 GOTO 347 HALT; PUSH 1 GOTO 301 HALT; PUSH 1 GOTO 338 POP 3 GOTO 785; PUSH 1 GOTO 312 HALT; PUSH 3 GOTO 207 POP 3 GOTO 101; PUSH 3 GOTO 545 HALT...
output:
-1
result:
ok 1 number(s): "-1"
Test #51:
score: 0
Accepted
time: 1ms
memory: 4852kb
input:
1024 POP 953 GOTO 498; PUSH 444 GOTO 458 POP 758 GOTO 270; PUSH 235 GOTO 190 HALT; PUSH 333 GOTO 912 HALT; PUSH 551 GOTO 574 HALT; PUSH 942 GOTO 1005 HALT; PUSH 517 GOTO 656 POP 1007 GOTO 734; PUSH 162 GOTO 1010 HALT; PUSH 212 GOTO 869 HALT; PUSH 67 GOTO 4 POP 422 GOTO 236; PUSH 995 GOTO 914 HALT; P...
output:
-1
result:
ok 1 number(s): "-1"
Test #52:
score: 0
Accepted
time: 2ms
memory: 4928kb
input:
1024 POP 93 GOTO 684; PUSH 66 GOTO 580 HALT; PUSH 31 GOTO 328 POP 41 GOTO 62; PUSH 13 GOTO 243 HALT; PUSH 4 GOTO 345 POP 43 GOTO 389; PUSH 41 GOTO 443 HALT; PUSH 42 GOTO 342 POP 85 GOTO 386; PUSH 4 GOTO 518 HALT; PUSH 83 GOTO 866 HALT; PUSH 23 GOTO 822 HALT; PUSH 16 GOTO 621 HALT; PUSH 90 GOTO 374 P...
output:
-1
result:
ok 1 number(s): "-1"
Test #53:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
3 POP 1 GOTO 3; PUSH 1 GOTO 1 HALT; PUSH 2 GOTO 2 POP 1 GOTO 2; PUSH 1 GOTO 1
output:
-1
result:
ok 1 number(s): "-1"
Test #54:
score: 0
Accepted
time: 117ms
memory: 4764kb
input:
1024 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 29 GOTO 3; PUSH 29 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 30 GOTO 5; PUSH 30 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 4 GOTO 7; PUSH 4 GOTO 1 POP 31 GOTO 8; PUSH 31 GOTO 7 POP 5 GOTO 9; PUSH 5 GOTO 1 POP 32 GOTO 10; PUSH 32 GOTO 9 POP 6 GOTO 11; PUSH 6 GOTO 1 POP 7...
output:
421359732
result:
ok 1 number(s): "421359732"
Test #55:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
35 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 513 GOTO 3; PUSH 513 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 514 GOTO 5; PUSH 514 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 4 GOTO 7; PUSH 4 GOTO 1 POP 516 GOTO 8; PUSH 516 GOTO 7 POP 5 GOTO 9; PUSH 5 GOTO 1 POP 517 GOTO 10; PUSH 517 GOTO 9 POP 6 GOTO 11; PUSH 6 GOTO 1...
output:
0
result:
ok 1 number(s): "0"
Test #56:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
36 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 513 GOTO 3; PUSH 513 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 514 GOTO 5; PUSH 514 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 1 POP 4 GOTO 7; PUSH 4 GOTO 1 POP 516 GOTO 8; PUSH 516 GOTO 7 POP 5 GOTO 9; PUSH 5 GOTO 1 POP 517 GOTO 10; PUSH 517 GOTO 9 POP 6 GOTO 11; PUSH 6 GOTO 1...
output:
998244352
result:
ok 1 number(s): "998244352"
Test #57:
score: 0
Accepted
time: 116ms
memory: 4616kb
input:
997 POP 1024 GOTO 1; PUSH 1 GOTO 2 POP 2 GOTO 3; PUSH 2 GOTO 2 POP 31 GOTO 4; PUSH 31 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 2 POP 32 GOTO 6; PUSH 32 GOTO 5 POP 4 GOTO 7; PUSH 4 GOTO 2 POP 5 GOTO 8; PUSH 5 GOTO 2 POP 33 GOTO 9; PUSH 33 GOTO 8 POP 6 GOTO 10; PUSH 6 GOTO 2 POP 34 GOTO 11; PUSH 34 GOTO 10 PO...
output:
0
result:
ok 1 number(s): "0"
Test #58:
score: 0
Accepted
time: 127ms
memory: 4776kb
input:
1023 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 2 POP 3 GOTO 4; PUSH 3 GOTO 2 POP 4 GOTO 5; PUSH 4 GOTO 3 POP 5 GOTO 6; PUSH 5 GOTO 2 POP 6 GOTO 7; PUSH 6 GOTO 4 POP 7 GOTO 8; PUSH 7 GOTO 7 POP 8 GOTO 9; PUSH 8 GOTO 6 POP 9 GOTO 10; PUSH 9 GOTO 8 POP 10 GOTO 11; PUSH 10 GOTO 10 POP 11 GOT...
output:
446955861
result:
ok 1 number(s): "446955861"
Test #59:
score: 0
Accepted
time: 69ms
memory: 4628kb
input:
988 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 3 POP 4 GOTO 5; PUSH 4 GOTO 4 POP 5 GOTO 6; PUSH 5 GOTO 4 POP 1019 GOTO 7; PUSH 1019 GOTO 6 POP 6 GOTO 8; PUSH 6 GOTO 2 POP 7 GOTO 9; PUSH 7 GOTO 8 POP 8 GOTO 10; PUSH 8 GOTO 6 POP 9 GOTO 11; PUSH 9 GOTO 2 POP 10 G...
output:
-1
result:
ok 1 number(s): "-1"
Test #60:
score: 0
Accepted
time: 59ms
memory: 4296kb
input:
751 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 1022 GOTO 4; PUSH 1022 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 2 POP 1020 GOTO 6; PUSH 1020 GOTO 5 POP 4 GOTO 7; PUSH 4 GOTO 2 POP 5 GOTO 8; PUSH 5 GOTO 3 POP 6 GOTO 9; PUSH 6 GOTO 3 POP 7 GOTO 10; PUSH 7 GOTO 5 POP 1015 GOTO 11; PUSH 1015 GOT...
output:
-1
result:
ok 1 number(s): "-1"
Test #61:
score: 0
Accepted
time: 119ms
memory: 4624kb
input:
1023 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO...
output:
398361292
result:
ok 1 number(s): "398361292"
Test #62:
score: 0
Accepted
time: 120ms
memory: 4896kb
input:
1024 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 4 GOTO 5; PUSH 4 GOTO 1 POP 5 GOTO 6; PUSH 5 GOTO 1 POP 6 GOTO 7; PUSH 6 GOTO 1 POP 7 GOTO 8; PUSH 7 GOTO 1 POP 8 GOTO 9; PUSH 8 GOTO 1 POP 9 GOTO 10; PUSH 9 GOTO 1 POP 10 GOTO 11; PUSH 10 GOTO 1 POP 11 GOTO...
output:
796722583
result:
ok 1 number(s): "796722583"
Test #63:
score: 0
Accepted
time: 1ms
memory: 3672kb
input:
73 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 513 GOTO 3; PUSH 513 GOTO 2 POP 2 GOTO 4; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 515 GOTO 6; PUSH 515 GOTO 5 POP 4 GOTO 7; PUSH 4 GOTO 1 POP 516 GOTO 8; PUSH 516 GOTO 7 POP 5 GOTO 9; PUSH 5 GOTO 1 POP 517 GOTO 10; PUSH 517 GOTO 9 POP 6 GOTO 11; PUSH 6 GOTO 1...
output:
0
result:
ok 1 number(s): "0"
Test #64:
score: 0
Accepted
time: 48ms
memory: 4144kb
input:
686 POP 1 GOTO 2; PUSH 1 GOTO 1 POP 2 GOTO 3; PUSH 2 GOTO 1 POP 3 GOTO 4; PUSH 3 GOTO 1 POP 515 GOTO 5; PUSH 515 GOTO 4 POP 4 GOTO 6; PUSH 4 GOTO 1 POP 516 GOTO 7; PUSH 516 GOTO 6 POP 5 GOTO 8; PUSH 5 GOTO 1 POP 517 GOTO 9; PUSH 517 GOTO 8 POP 6 GOTO 10; PUSH 6 GOTO 1 POP 518 GOTO 11; PUSH 518 GOTO ...
output:
0
result:
ok 1 number(s): "0"
Extra Test:
score: 0
Extra Test Passed