QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#754696 | #9550. The Empress | ucup-team159# | AC ✓ | 0ms | 4104kb | C++20 | 5.2kb | 2024-11-16 15:35:24 | 2024-11-16 15:35:25 |
Judging History
answer
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep1(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < (t); ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define em emplace
#define pob pop_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define newline puts("")
#define vc vector
using namespace std;
template<class T> using vv = vc<vc<T>>;
template<class T> using PQ = priority_queue<T,vc<T>,greater<T>>;
using uint = unsigned; using ull = unsigned long long;
using vi = vc<int>; using vvi = vv<int>; using vvvi = vv<vi>;
using ll = long long; using vl = vc<ll>; using vvl = vv<ll>; using vvvl = vv<vl>;
using P = pair<int,int>; using vp = vc<P>; using vvp = vv<P>; using LP = pair<ll,ll>;
int geti(){int x;scanf("%d",&x);return x;}
vi pm(int n, int s=0) { vi a(n); iota(rng(a),s); return a;}
template<class T1,class T2>istream& operator>>(istream&i,pair<T1,T2>&v){return i>>v.fi>>v.se;}
template<class T1,class T2>ostream& operator<<(ostream&o,const pair<T1,T2>&v){return o<<v.fi<<","<<v.se;}
template<class T>istream& operator>>(istream&i,vc<T>&v){rep(j,sz(v))i>>v[j];return i;}
template<class T>string join(const T&v,const string&d=""){stringstream s;rep(i,sz(v))(i?s<<d:s)<<v[i];return s.str();}
template<class T>ostream& operator<<(ostream&o,const vc<T>&v){if(sz(v))o<<join(v," ");return o;}
template<class T>void vin(vc<T>&a){int n;cin>>n;a=vc<T>(n);cin>>a;}
template<class T>void vin(vv<T>&a){int n,m;cin>>n>>m;a=vv<T>(n,vc<T>(m));cin>>a;}
template<class T1,class T2>void operator--(pair<T1,T2>&a,int){a.fi--;a.se--;}
template<class T1,class T2>void operator++(pair<T1,T2>&a,int){a.fi++;a.se++;}
template<class T>void operator--(vc<T>&a,int){for(T&x:a)x--;}
template<class T>void operator++(vc<T>&a,int){for(T&x:a)x++;}
template<class T1,class T2>void operator+=(vc<T1>&a,T2 b){for(T1&x:a)x+=b;}
template<class T1,class T2>void operator-=(vc<T1>&a,T2 b){for(T1&x:a)x-=b;}
template<class T1,class T2>void operator*=(vc<T1>&a,T2 b){for(T1&x:a)x*=b;}
template<class T1,class T2>void operator/=(vc<T1>&a,T2 b){for(T1&x:a)x/=b;}
template<class T>void operator+=(vc<T>&a,const vc<T>&b){a.insert(a.end(),rng(b));}
template<class T1,class T2>pair<T1,T2>operator+(const pair<T1,T2>&a,const pair<T1,T2>&b){return {a.fi+b.fi,a.se+b.se};}
template<class T1,class T2>pair<T1,T2>operator-(const pair<T1,T2>&a,const pair<T1,T2>&b){return {a.fi-b.fi,a.se-b.se};}
template<class T>pair<T,T>operator*(const pair<T,T>&a,T b){return {a.fi*b,a.se*b};}
template<class T1,class T2>bool mins(T1& x,const T2&y){if(y<x){x=y;return true;}else return false;}
template<class T1,class T2>bool maxs(T1& x,const T2&y){if(x<y){x=y;return true;}else return false;}
template<class T>T min(const vc<T>&a){return *min_element(rng(a));}
template<class T>T max(const vc<T>&a){return *max_element(rng(a));}
template<class Tx,class Ty>Tx dup(Tx x, Ty y){return (x+y-1)/y;}
template<class T>ll suma(const vc<T>&a){ll s=0;for(auto&&x:a)s+=x;return s;}
template<class T>ll suma(const vv<T>&a){ll s=0;for(auto&&x:a)s+=suma(x);return s;}
template<class T>void uni(T&a){sort(rng(a));a.erase(unique(rng(a)),a.end());}
template<class T>void prepend(vc<T>&a,const T&x){a.insert(a.begin(),x);}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return;}
#define yes { puts("Yes"); return;}
#define no { puts("No"); return;}
#define rtn(x) { cout<<(x)<<'\n'; return;} // flush!
#define yn {puts("Yes");}else{puts("No");}
#define bn(x) ((1ll<<(x))-1)
struct Solver {
void solve() {
int k;
cin>>k;
k--; k /= 2;
if (k == 0) {
puts("1");
printf("HALT; PUSH %d GOTO %d\n", 1, 1);
return;
}
int n = 0;
while (bn(n+1) <= k) n++;
k -= bn(n);
int m = n*2+2;
vp po(m,P(99,0)), pu(m,P(99,0));
rep(i,n) {
int a = i*2, b = a+1, c = b+2;
if (k>>(n-i-1)&1) {
po[a] = P(b,c); pu[a] = P(a,b);
po[c] = P(a,a+2); pu[b] = P(b,0);
} else {
po[a] = P(a,a+2); pu[a] = P(a,0);
}
// int a = i*2+1, b = a+1;
// if (k<<1>>i&1) {
// if (i == n-1) ent = b;
// printf("POP %d GOTO %d; PUSH %d GOTO %d\n", a, last, a, b);
// printf("POP %d GOTO %d; PUSH %d GOTO %d\n", b, a, b, ent);
// last = b;
// } else {
// printf("POP %d GOTO %d; PUSH %d GOTO %d\n", a, last, a, ent);
// printf("POP %d GOTO %d; PUSH %d GOTO %d\n", b, b, b, b);
// last = a;
// }
}
printf("%d\n",m);
rep(i,m) {
auto [a,b] = po[i];
auto [c,d] = pu[i];
a++; c++;
b++; d++;
if (i == m-2) printf("HALT; PUSH %d GOTO %d\n", 1, 1);
else printf("POP %d GOTO %d; PUSH %d GOTO %d\n", a, b, c, d);
}
}
};
int main() {
// cin.tie(nullptr); ios::sync_with_stdio(false);
int ts = 1;
// scanf("%d",&ts);
rep1(ti,ts) {
Solver solver;
solver.solve();
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3744kb
input:
1
output:
1 HALT; PUSH 1 GOTO 1
result:
ok x=1
Test #2:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
5
output:
4 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 HALT; PUSH 1 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1
result:
ok x=5
Test #3:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
17
output:
8 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 HALT; PUSH 1 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1
result:
ok x=17
Test #4:
score: 0
Accepted
time: 0ms
memory: 4028kb
input:
19260817
output:
48 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 ...
result:
ok x=19260817
Test #5:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
1145141919
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1...
result:
ok x=1145141919
Test #6:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
2147483647
output:
62 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=2147483647
Test #7:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
1868665701
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 POP 12...
result:
ok x=1868665701
Test #8:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
2102547599
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP 12 GOTO...
result:
ok x=2102547599
Test #9:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
2054530275
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1 POP 11 ...
result:
ok x=2054530275
Test #10:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
1953685475
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP 11 ...
result:
ok x=1953685475
Test #11:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
2119017059
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 POP 11 GOT...
result:
ok x=2119017059
Test #12:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
1911337379
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP ...
result:
ok x=1911337379
Test #13:
score: 0
Accepted
time: 0ms
memory: 4028kb
input:
887618459
output:
58 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP ...
result:
ok x=887618459
Test #14:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
831117597
output:
58 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1...
result:
ok x=831117597
Test #15:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
1820253559
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP 11 ...
result:
ok x=1820253559
Test #16:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
1563399651
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 100 GOTO 1; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP 12 ...
result:
ok x=1563399651
Test #17:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
1631350977
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 ...
result:
ok x=1631350977
Test #18:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
1897574279
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP ...
result:
ok x=1897574279
Test #19:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
450973351
output:
56 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1 POP...
result:
ok x=450973351
Test #20:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
1212949423
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 ...
result:
ok x=1212949423
Test #21:
score: 0
Accepted
time: 0ms
memory: 3992kb
input:
1800664165
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1 POP...
result:
ok x=1800664165
Test #22:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
2083340735
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP 11 GOTO...
result:
ok x=2083340735
Test #23:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
1989353363
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 POP 11...
result:
ok x=1989353363
Test #24:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
1686030751
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP...
result:
ok x=1686030751
Test #25:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
483234157
output:
56 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1 POP...
result:
ok x=483234157
Test #26:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
1784967647
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1 POP...
result:
ok x=1784967647
Test #27:
score: 0
Accepted
time: 0ms
memory: 4024kb
input:
1052131125
output:
58 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP 12 GOTO...
result:
ok x=1052131125
Test #28:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
673034421
output:
58 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 100 GOTO 1; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 ...
result:
ok x=673034421
Test #29:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
1136250939
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GO...
result:
ok x=1136250939
Test #30:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
1434678339
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 100 GOTO 1; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP...
result:
ok x=1434678339
Test #31:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
174274079
output:
54 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 100 GOTO 1; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1...
result:
ok x=174274079
Test #32:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
1911998229
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP ...
result:
ok x=1911998229
Test #33:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
441665295
output:
56 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 5 GOTO 7; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP ...
result:
ok x=441665295
Test #34:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
1325107907
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 PO...
result:
ok x=1325107907
Test #35:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
264691101
output:
54 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 POP 11 GOT...
result:
ok x=264691101
Test #36:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
1655988757
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1...
result:
ok x=1655988757
Test #37:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
1912613857
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 100 GOTO 1; PUSH 10 GOTO 1 POP...
result:
ok x=1912613857
Test #38:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
471758205
output:
56 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP ...
result:
ok x=471758205
Test #39:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
1295394655
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 100 GOTO 1; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP...
result:
ok x=1295394655
Test #40:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
1734993785
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 PO...
result:
ok x=1734993785
Test #41:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
986893495
output:
58 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP 12 ...
result:
ok x=986893495
Test #42:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
105826293
output:
52 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 100 GOTO 1; PUSH 8 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 7 GOTO 9; PUSH 100 GOTO 1 POP...
result:
ok x=105826293
Test #43:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
3
output:
4 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 HALT; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1
result:
ok x=3
Test #44:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
7
output:
6 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 HALT; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1
result:
ok x=7
Test #45:
score: 0
Accepted
time: 0ms
memory: 4024kb
input:
9
output:
6 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 100 GOTO 1; PUSH 4 GOTO 1 HALT; PUSH 1 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1
result:
ok x=9
Test #46:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
11
output:
6 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 1 GOTO 3; PUSH 100 GOTO 1 HALT; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1
result:
ok x=11
Test #47:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
13
output:
6 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 HALT; PUSH 1 GOTO 1 POP 3 GOTO 5; PUSH 100 GOTO 1
result:
ok x=13
Test #48:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
15
output:
8 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 HALT; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1
result:
ok x=15
Test #49:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
2147483643
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 POP 12 GOT...
result:
ok x=2147483643
Test #50:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
2147483645
output:
60 POP 2 GOTO 4; PUSH 1 GOTO 2 POP 100 GOTO 1; PUSH 2 GOTO 1 POP 4 GOTO 6; PUSH 3 GOTO 4 POP 1 GOTO 3; PUSH 4 GOTO 1 POP 6 GOTO 8; PUSH 5 GOTO 6 POP 3 GOTO 5; PUSH 6 GOTO 1 POP 8 GOTO 10; PUSH 7 GOTO 8 POP 5 GOTO 7; PUSH 8 GOTO 1 POP 10 GOTO 12; PUSH 9 GOTO 10 POP 7 GOTO 9; PUSH 10 GOTO 1 POP 12 GOT...
result:
ok x=2147483645
Test #51:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
1073741827
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=1073741827
Test #52:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
1073741825
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=1073741825
Test #53:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
1073741823
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=1073741823
Test #54:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
536870967
output:
58 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=536870967
Test #55:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
536870965
output:
58 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=536870965
Test #56:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
1073741881
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=1073741881
Test #57:
score: 0
Accepted
time: 0ms
memory: 4028kb
input:
1073741879
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=1073741879
Test #58:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
1073741877
output:
60 POP 1 GOTO 3; PUSH 1 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 3 GOTO 5; PUSH 3 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 5 GOTO 7; PUSH 5 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 7 GOTO 9; PUSH 7 GOTO 1 POP 100 GOTO 1; PUSH 100 GOTO 1 POP 9 GOTO 11; PUSH 9 GOTO 1 POP 100 GOTO 1; PUSH 100 GOT...
result:
ok x=1073741877
Extra Test:
score: 0
Extra Test Passed