QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#755179 | #9550. The Empress | ucup-team055# | AC ✓ | 1ms | 3848kb | C++20 | 3.2kb | 2024-11-16 16:38:23 | 2024-11-16 16:38:25 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
const ll ILL=2167167167167167167;
const int INF=2100000000;
#define rep(i,a,b) for (int i=(int)(a);i<(int)(b);i++)
#define all(p) p.begin(),p.end()
template<class T> using _pq = priority_queue<T, vector<T>, greater<T>>;
template<class T> ll LB(vector<T> &v,T a){return lower_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> ll UB(vector<T> &v,T a){return upper_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> bool chmin(T &a,T b){if(a>b){a=b;return 1;}else return 0;}
template<class T> bool chmax(T &a,T b){if(a<b){a=b;return 1;}else return 0;}
template<class T> void So(vector<T> &v) {sort(v.begin(),v.end());}
template<class T> void Sore(vector<T> &v) {sort(v.begin(),v.end(),[](T x,T y){return x>y;});}
bool yneos(bool a,bool upp=0){if(a){cout<<(upp?"YES\n":"Yes\n");}else{cout<<(upp?"NO\n":"No\n");}return a;}
template<class T> void vec_out(vector<T> &p,int ty=0){
if(ty==2){cout<<'{';for(int i=0;i<(int)p.size();i++){if(i){cout<<",";}cout<<'"'<<p[i]<<'"';}cout<<"}\n";}
else{if(ty==1){cout<<p.size()<<"\n";}for(int i=0;i<(int)(p.size());i++){if(i) cout<<" ";cout<<p[i];}cout<<"\n";}}
template<class T> T vec_min(vector<T> &a){assert(!a.empty());T ans=a[0];for(auto &x:a) chmin(ans,x);return ans;}
template<class T> T vec_max(vector<T> &a){assert(!a.empty());T ans=a[0];for(auto &x:a) chmax(ans,x);return ans;}
template<class T> T vec_sum(vector<T> &a){T ans=T(0);for(auto &x:a) ans+=x;return ans;}
int pop_count(long long a){int res=0;while(a){res+=(a&1),a>>=1;}return res;}
void solve();
// CYAN / FREDERIC
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1;
// cin >> t;
rep(i, 0, t) solve();
}
void solve(){
ll K;
cin >> K;
K /= 2;
K++;
vector<int> op;
while (K != 1){
if (K & 1){
K--;
op.push_back(0);
}
else{
K /= 2;
op.push_back(1);
}
}
reverse(all(op));
vector<pair<pair<int, int>, pair<int, int>>> ans;
ans.push_back({{-1, -1}, {-1, -1}});
int H = 0;
int st = 0;
int num = 1;
for (auto v : op){
num++;
if (v == 0){
ans[H] = {{num, ans.size()}, {num, st}};
st = H;
H = ans.size();
ans.push_back({{-1, -1}, {-1, -1}});
}
else{
ans[H] = {{num, ans.size()}, {num, st}};
H = ans.size();
ans.push_back({{-1, -1}, {-1, -1}});
}
}
auto f = [&](int a) -> int {
if (a == -1) return -1;
a = (a + ans.size() - st) % ans.size();
return a + 1;
};
cout << ans.size() << "\n";
rep(i, 0, ans.size()){
int ind = (i + st) % ans.size();
if (ans[ind].first.first == -1){
cout << "HALT; PUSH 1 GOTO 1\n";
}
else{
cout << "POP " << ans[ind].first.first << " ";
cout << "GOTO " << f(ans[ind].first.second) << "; ";
cout << "PUSH " << ans[ind].second.first << " ";
cout << "GOTO " << f(ans[ind].second.second) << "\n";
}
}
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3624kb
input:
1
output:
1 HALT; PUSH 1 GOTO 1
result:
ok x=1
Test #2:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
5
output:
3 POP 3 GOTO 2; PUSH 3 GOTO 3 HALT; PUSH 1 GOTO 1 POP 2 GOTO 1; PUSH 2 GOTO 3
result:
ok x=5
Test #3:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
17
output:
5 POP 5 GOTO 2; PUSH 5 GOTO 3 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 1; PUSH 4 GOTO 3
result:
ok x=17
Test #4:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
19260817
output:
35 POP 35 GOTO 2; PUSH 35 GOTO 32 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 3 POP 5 GOTO 7; PUSH 5 GOTO 3 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 6 POP 9 GOTO 11; PUSH 9 GOTO 6 POP 10 GOTO 12; PUSH...
result:
ok x=19260817
Test #5:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
1145141919
output:
40 POP 36 GOTO 2; PUSH 36 GOTO 38 POP 37 GOTO 3; PUSH 37 GOTO 1 POP 38 GOTO 4; PUSH 38 GOTO 1 POP 39 GOTO 5; PUSH 39 GOTO 1 POP 40 GOTO 6; PUSH 40 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 8; PUSH 2 GOTO 7 POP 3 GOTO 9; PUSH 3 GOTO 7 POP 4 GOTO 10; PUSH 4 GOTO 7 POP 5 GOTO 11; PUSH 5 GOTO 7 POP 6 GOTO 1...
result:
ok x=1145141919
Test #6:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
2147483647
output:
31 POP 2 GOTO 2; PUSH 2 GOTO 1 POP 3 GOTO 3; PUSH 3 GOTO 1 POP 4 GOTO 4; PUSH 4 GOTO 1 POP 5 GOTO 5; PUSH 5 GOTO 1 POP 6 GOTO 6; PUSH 6 GOTO 1 POP 7 GOTO 7; PUSH 7 GOTO 1 POP 8 GOTO 8; PUSH 8 GOTO 1 POP 9 GOTO 9; PUSH 9 GOTO 1 POP 10 GOTO 10; PUSH 10 GOTO 1 POP 11 GOTO 11; PUSH 11 GOTO 1 POP 12 GOTO...
result:
ok x=2147483647
Test #7:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
1868665701
output:
46 POP 46 GOTO 2; PUSH 46 GOTO 45 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 4 POP 7 GOTO 9; PUSH 7 GOTO 7 POP 8 GOTO 10; PUSH 8 GOTO 7 POP 9 GOTO 11; PUSH 9 GOTO 9 POP 10 GOTO 12; PUSH...
result:
ok x=1868665701
Test #8:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
2102547599
output:
43 POP 40 GOTO 2; PUSH 40 GOTO 40 POP 41 GOTO 3; PUSH 41 GOTO 1 POP 42 GOTO 4; PUSH 42 GOTO 1 POP 43 GOTO 5; PUSH 43 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 7; PUSH 2 GOTO 6 POP 3 GOTO 8; PUSH 3 GOTO 6 POP 4 GOTO 9; PUSH 4 GOTO 7 POP 5 GOTO 10; PUSH 5 GOTO 7 POP 6 GOTO 11; PUSH 6 GOTO 9 POP 7 GOTO 12;...
result:
ok x=2102547599
Test #9:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
2054530275
output:
46 POP 45 GOTO 2; PUSH 45 GOTO 43 POP 46 GOTO 3; PUSH 46 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 5 POP 5 GOTO 8; PUSH 5 GOTO 5 POP 6 GOTO 9; PUSH 6 GOTO 7 POP 7 GOTO 10; PUSH 7 GOTO 7 POP 8 GOTO 11; PUSH 8 GOTO 9 POP 9 GOTO 12; PUS...
result:
ok x=2054530275
Test #10:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
1953685475
output:
48 POP 47 GOTO 2; PUSH 47 GOTO 45 POP 48 GOTO 3; PUSH 48 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 5 POP 5 GOTO 8; PUSH 5 GOTO 5 POP 6 GOTO 9; PUSH 6 GOTO 7 POP 7 GOTO 10; PUSH 7 GOTO 7 POP 8 GOTO 11; PUSH 8 GOTO 7 POP 9 GOTO 12; PUS...
result:
ok x=1953685475
Test #11:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
2119017059
output:
45 POP 44 GOTO 2; PUSH 44 GOTO 42 POP 45 GOTO 3; PUSH 45 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 5 POP 5 GOTO 8; PUSH 5 GOTO 5 POP 6 GOTO 9; PUSH 6 GOTO 7 POP 7 GOTO 10; PUSH 7 GOTO 7 POP 8 GOTO 11; PUSH 8 GOTO 9 POP 9 GOTO 12; PUS...
result:
ok x=2119017059
Test #12:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
1911337379
output:
45 POP 44 GOTO 2; PUSH 44 GOTO 42 POP 45 GOTO 3; PUSH 45 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 5 POP 5 GOTO 8; PUSH 5 GOTO 5 POP 6 GOTO 9; PUSH 6 GOTO 7 POP 7 GOTO 10; PUSH 7 GOTO 7 POP 8 GOTO 11; PUSH 8 GOTO 7 POP 9 GOTO 12; PUS...
result:
ok x=1911337379
Test #13:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
887618459
output:
48 POP 47 GOTO 2; PUSH 47 GOTO 47 POP 48 GOTO 3; PUSH 48 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 5 POP 5 GOTO 8; PUSH 5 GOTO 5 POP 6 GOTO 9; PUSH 6 GOTO 5 POP 7 GOTO 10; PUSH 7 GOTO 8 POP 8 GOTO 11; PUSH 8 GOTO 8 POP 9 GOTO 12; PUS...
result:
ok x=887618459
Test #14:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
831117597
output:
43 POP 43 GOTO 2; PUSH 43 GOTO 42 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 4 POP 7 GOTO 9; PUSH 7 GOTO 4 POP 8 GOTO 10; PUSH 8 GOTO 4 POP 9 GOTO 11; PUSH 9 GOTO 9 POP 10 GOTO 12; PUSH...
result:
ok x=831117597
Test #15:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
1820253559
output:
49 POP 47 GOTO 2; PUSH 47 GOTO 48 POP 48 GOTO 3; PUSH 48 GOTO 1 POP 49 GOTO 4; PUSH 49 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 6; PUSH 2 GOTO 5 POP 3 GOTO 7; PUSH 3 GOTO 5 POP 4 GOTO 8; PUSH 4 GOTO 6 POP 5 GOTO 9; PUSH 5 GOTO 6 POP 6 GOTO 10; PUSH 6 GOTO 6 POP 7 GOTO 11; PUSH 7 GOTO 9 POP 8 GOTO 12; P...
result:
ok x=1820253559
Test #16:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
1563399651
output:
47 POP 46 GOTO 2; PUSH 46 GOTO 44 POP 47 GOTO 3; PUSH 47 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 4 POP 5 GOTO 8; PUSH 5 GOTO 6 POP 6 GOTO 9; PUSH 6 GOTO 6 POP 7 GOTO 10; PUSH 7 GOTO 8 POP 8 GOTO 11; PUSH 8 GOTO 8 POP 9 GOTO 12; PUS...
result:
ok x=1563399651
Test #17:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
1631350977
output:
42 POP 42 GOTO 2; PUSH 42 GOTO 37 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 4 POP 7 GOTO 9; PUSH 7 GOTO 4 POP 8 GOTO 10; PUSH 8 GOTO 4 POP 9 GOTO 11; PUSH 9 GOTO 4 POP 10 GOTO 12; PUSH...
result:
ok x=1631350977
Test #18:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
1897574279
output:
44 POP 42 GOTO 2; PUSH 42 GOTO 40 POP 43 GOTO 3; PUSH 43 GOTO 1 POP 44 GOTO 4; PUSH 44 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 6; PUSH 2 GOTO 5 POP 3 GOTO 7; PUSH 3 GOTO 5 POP 4 GOTO 8; PUSH 4 GOTO 6 POP 5 GOTO 9; PUSH 5 GOTO 6 POP 6 GOTO 10; PUSH 6 GOTO 8 POP 7 GOTO 11; PUSH 7 GOTO 8 POP 8 GOTO 12; P...
result:
ok x=1897574279
Test #19:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
450973351
output:
41 POP 39 GOTO 2; PUSH 39 GOTO 39 POP 40 GOTO 3; PUSH 40 GOTO 1 POP 41 GOTO 4; PUSH 41 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 6; PUSH 2 GOTO 5 POP 3 GOTO 7; PUSH 3 GOTO 5 POP 4 GOTO 8; PUSH 4 GOTO 6 POP 5 GOTO 9; PUSH 5 GOTO 6 POP 6 GOTO 10; PUSH 6 GOTO 6 POP 7 GOTO 11; PUSH 7 GOTO 9 POP 8 GOTO 12; P...
result:
ok x=450973351
Test #20:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
1212949423
output:
40 POP 37 GOTO 2; PUSH 37 GOTO 39 POP 38 GOTO 3; PUSH 38 GOTO 1 POP 39 GOTO 4; PUSH 39 GOTO 1 POP 40 GOTO 5; PUSH 40 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 7; PUSH 2 GOTO 6 POP 3 GOTO 8; PUSH 3 GOTO 6 POP 4 GOTO 9; PUSH 4 GOTO 6 POP 5 GOTO 10; PUSH 5 GOTO 6 POP 6 GOTO 11; PUSH 6 GOTO 9 POP 7 GOTO 12;...
result:
ok x=1212949423
Test #21:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
1800664165
output:
47 POP 47 GOTO 2; PUSH 47 GOTO 46 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 4 POP 7 GOTO 9; PUSH 7 GOTO 7 POP 8 GOTO 10; PUSH 8 GOTO 7 POP 9 GOTO 11; PUSH 9 GOTO 7 POP 10 GOTO 12; PUSH...
result:
ok x=1800664165
Test #22:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
2083340735
output:
42 POP 37 GOTO 2; PUSH 37 GOTO 41 POP 38 GOTO 3; PUSH 38 GOTO 1 POP 39 GOTO 4; PUSH 39 GOTO 1 POP 40 GOTO 5; PUSH 40 GOTO 1 POP 41 GOTO 6; PUSH 41 GOTO 1 POP 42 GOTO 7; PUSH 42 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 9; PUSH 2 GOTO 8 POP 3 GOTO 10; PUSH 3 GOTO 8 POP 4 GOTO 11; PUSH 4 GOTO 9 POP 5 GOTO...
result:
ok x=2083340735
Test #23:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
1989353363
output:
46 POP 45 GOTO 2; PUSH 45 GOTO 44 POP 46 GOTO 3; PUSH 46 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 5 POP 5 GOTO 8; PUSH 5 GOTO 5 POP 6 GOTO 9; PUSH 6 GOTO 7 POP 7 GOTO 10; PUSH 7 GOTO 7 POP 8 GOTO 11; PUSH 8 GOTO 7 POP 9 GOTO 12; PUS...
result:
ok x=1989353363
Test #24:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
1686030751
output:
44 POP 40 GOTO 2; PUSH 40 GOTO 42 POP 41 GOTO 3; PUSH 41 GOTO 1 POP 42 GOTO 4; PUSH 42 GOTO 1 POP 43 GOTO 5; PUSH 43 GOTO 1 POP 44 GOTO 6; PUSH 44 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 8; PUSH 2 GOTO 7 POP 3 GOTO 9; PUSH 3 GOTO 7 POP 4 GOTO 10; PUSH 4 GOTO 8 POP 5 GOTO 11; PUSH 5 GOTO 8 POP 6 GOTO 1...
result:
ok x=1686030751
Test #25:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
483234157
output:
43 POP 43 GOTO 2; PUSH 43 GOTO 42 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 6 POP 9 GOTO 11; PUSH 9 GOTO 6 POP 10 GOTO 12; PUSH...
result:
ok x=483234157
Test #26:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
1784967647
output:
43 POP 39 GOTO 2; PUSH 39 GOTO 42 POP 40 GOTO 3; PUSH 40 GOTO 1 POP 41 GOTO 4; PUSH 41 GOTO 1 POP 42 GOTO 5; PUSH 42 GOTO 1 POP 43 GOTO 6; PUSH 43 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 8; PUSH 2 GOTO 7 POP 3 GOTO 9; PUSH 3 GOTO 7 POP 4 GOTO 10; PUSH 4 GOTO 8 POP 5 GOTO 11; PUSH 5 GOTO 8 POP 6 GOTO 1...
result:
ok x=1784967647
Test #27:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
1052131125
output:
48 POP 48 GOTO 2; PUSH 48 GOTO 47 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 8 POP 9 GOTO 11; PUSH 9 GOTO 8 POP 10 GOTO 12; PUSH...
result:
ok x=1052131125
Test #28:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
673034421
output:
42 POP 42 GOTO 2; PUSH 42 GOTO 41 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 3 POP 5 GOTO 7; PUSH 5 GOTO 5 POP 6 GOTO 8; PUSH 6 GOTO 5 POP 7 GOTO 9; PUSH 7 GOTO 5 POP 8 GOTO 10; PUSH 8 GOTO 5 POP 9 GOTO 11; PUSH 9 GOTO 5 POP 10 GOTO 12; PUSH...
result:
ok x=673034421
Test #29:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
1136250939
output:
44 POP 43 GOTO 2; PUSH 43 GOTO 43 POP 44 GOTO 3; PUSH 44 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 4 POP 5 GOTO 8; PUSH 5 GOTO 4 POP 6 GOTO 9; PUSH 6 GOTO 4 POP 7 GOTO 10; PUSH 7 GOTO 4 POP 8 GOTO 11; PUSH 8 GOTO 9 POP 9 GOTO 12; PUS...
result:
ok x=1136250939
Test #30:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1434678339
output:
42 POP 41 GOTO 2; PUSH 41 GOTO 38 POP 42 GOTO 3; PUSH 42 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 4 POP 5 GOTO 8; PUSH 5 GOTO 6 POP 6 GOTO 9; PUSH 6 GOTO 6 POP 7 GOTO 10; PUSH 7 GOTO 6 POP 8 GOTO 11; PUSH 8 GOTO 9 POP 9 GOTO 12; PUS...
result:
ok x=1434678339
Test #31:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
174274079
output:
37 POP 33 GOTO 2; PUSH 33 GOTO 33 POP 34 GOTO 3; PUSH 34 GOTO 1 POP 35 GOTO 4; PUSH 35 GOTO 1 POP 36 GOTO 5; PUSH 36 GOTO 1 POP 37 GOTO 6; PUSH 37 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 8; PUSH 2 GOTO 7 POP 3 GOTO 9; PUSH 3 GOTO 7 POP 4 GOTO 10; PUSH 4 GOTO 7 POP 5 GOTO 11; PUSH 5 GOTO 9 POP 6 GOTO 1...
result:
ok x=174274079
Test #32:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1911998229
output:
47 POP 47 GOTO 2; PUSH 47 GOTO 46 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 6 POP 9 GOTO 11; PUSH 9 GOTO 6 POP 10 GOTO 12; PUSH...
result:
ok x=1911998229
Test #33:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
441665295
output:
39 POP 36 GOTO 2; PUSH 36 GOTO 35 POP 37 GOTO 3; PUSH 37 GOTO 1 POP 38 GOTO 4; PUSH 38 GOTO 1 POP 39 GOTO 5; PUSH 39 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 7; PUSH 2 GOTO 6 POP 3 GOTO 8; PUSH 3 GOTO 6 POP 4 GOTO 9; PUSH 4 GOTO 7 POP 5 GOTO 10; PUSH 5 GOTO 7 POP 6 GOTO 11; PUSH 6 GOTO 7 POP 7 GOTO 12;...
result:
ok x=441665295
Test #34:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1325107907
output:
46 POP 45 GOTO 2; PUSH 45 GOTO 42 POP 46 GOTO 3; PUSH 46 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 4 POP 5 GOTO 8; PUSH 5 GOTO 4 POP 6 GOTO 9; PUSH 6 GOTO 7 POP 7 GOTO 10; PUSH 7 GOTO 7 POP 8 GOTO 11; PUSH 8 GOTO 9 POP 9 GOTO 12; PUS...
result:
ok x=1325107907
Test #35:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
264691101
output:
45 POP 45 GOTO 2; PUSH 45 GOTO 44 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 8 POP 9 GOTO 11; PUSH 9 GOTO 8 POP 10 GOTO 12; PUSH...
result:
ok x=264691101
Test #36:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
1655988757
output:
42 POP 42 GOTO 2; PUSH 42 GOTO 41 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 4 POP 7 GOTO 9; PUSH 7 GOTO 4 POP 8 GOTO 10; PUSH 8 GOTO 4 POP 9 GOTO 11; PUSH 9 GOTO 9 POP 10 GOTO 12; PUSH...
result:
ok x=1655988757
Test #37:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
1912613857
output:
41 POP 41 GOTO 2; PUSH 41 GOTO 37 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 6 POP 9 GOTO 11; PUSH 9 GOTO 6 POP 10 GOTO 12; PUSH...
result:
ok x=1912613857
Test #38:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
471758205
output:
45 POP 45 GOTO 2; PUSH 45 GOTO 44 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 6 POP 9 GOTO 11; PUSH 9 GOTO 6 POP 10 GOTO 12; PUSH...
result:
ok x=471758205
Test #39:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
1295394655
output:
43 POP 39 GOTO 2; PUSH 39 GOTO 42 POP 40 GOTO 3; PUSH 40 GOTO 1 POP 41 GOTO 4; PUSH 41 GOTO 1 POP 42 GOTO 5; PUSH 42 GOTO 1 POP 43 GOTO 6; PUSH 43 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 8; PUSH 2 GOTO 7 POP 3 GOTO 9; PUSH 3 GOTO 7 POP 4 GOTO 10; PUSH 4 GOTO 7 POP 5 GOTO 11; PUSH 5 GOTO 7 POP 6 GOTO 1...
result:
ok x=1295394655
Test #40:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
1734993785
output:
49 POP 49 GOTO 2; PUSH 49 GOTO 47 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 4 POP 7 GOTO 9; PUSH 7 GOTO 4 POP 8 GOTO 10; PUSH 8 GOTO 8 POP 9 GOTO 11; PUSH 9 GOTO 8 POP 10 GOTO 12; PUSH...
result:
ok x=1734993785
Test #41:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
986893495
output:
44 POP 42 GOTO 2; PUSH 42 GOTO 43 POP 43 GOTO 3; PUSH 43 GOTO 1 POP 44 GOTO 4; PUSH 44 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 6; PUSH 2 GOTO 5 POP 3 GOTO 7; PUSH 3 GOTO 5 POP 4 GOTO 8; PUSH 4 GOTO 6 POP 5 GOTO 9; PUSH 5 GOTO 6 POP 6 GOTO 10; PUSH 6 GOTO 8 POP 7 GOTO 11; PUSH 7 GOTO 8 POP 8 GOTO 12; P...
result:
ok x=986893495
Test #42:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
105826293
output:
42 POP 42 GOTO 2; PUSH 42 GOTO 41 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 4 POP 7 GOTO 9; PUSH 7 GOTO 4 POP 8 GOTO 10; PUSH 8 GOTO 8 POP 9 GOTO 11; PUSH 9 GOTO 8 POP 10 GOTO 12; PUSH...
result:
ok x=105826293
Test #43:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
3
output:
2 POP 2 GOTO 2; PUSH 2 GOTO 1 HALT; PUSH 1 GOTO 1
result:
ok x=3
Test #44:
score: 0
Accepted
time: 1ms
memory: 3480kb
input:
7
output:
3 POP 2 GOTO 2; PUSH 2 GOTO 1 POP 3 GOTO 3; PUSH 3 GOTO 1 HALT; PUSH 1 GOTO 1
result:
ok x=7
Test #45:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
9
output:
4 POP 4 GOTO 2; PUSH 4 GOTO 3 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 1; PUSH 3 GOTO 3
result:
ok x=9
Test #46:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
11
output:
4 POP 3 GOTO 2; PUSH 3 GOTO 4 POP 4 GOTO 3; PUSH 4 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 1; PUSH 2 GOTO 4
result:
ok x=11
Test #47:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
13
output:
5 POP 5 GOTO 2; PUSH 5 GOTO 4 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 1; PUSH 4 GOTO 4
result:
ok x=13
Test #48:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
15
output:
4 POP 2 GOTO 2; PUSH 2 GOTO 1 POP 3 GOTO 3; PUSH 3 GOTO 1 POP 4 GOTO 4; PUSH 4 GOTO 1 HALT; PUSH 1 GOTO 1
result:
ok x=15
Test #49:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
2147483643
output:
58 POP 57 GOTO 2; PUSH 57 GOTO 57 POP 58 GOTO 3; PUSH 58 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 5 POP 5 GOTO 8; PUSH 5 GOTO 5 POP 6 GOTO 9; PUSH 6 GOTO 7 POP 7 GOTO 10; PUSH 7 GOTO 7 POP 8 GOTO 11; PUSH 8 GOTO 9 POP 9 GOTO 12; PUS...
result:
ok x=2147483643
Test #50:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
2147483645
output:
59 POP 59 GOTO 2; PUSH 59 GOTO 58 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 4 POP 5 GOTO 7; PUSH 5 GOTO 4 POP 6 GOTO 8; PUSH 6 GOTO 6 POP 7 GOTO 9; PUSH 7 GOTO 6 POP 8 GOTO 10; PUSH 8 GOTO 8 POP 9 GOTO 11; PUSH 9 GOTO 8 POP 10 GOTO 12; PUSH...
result:
ok x=2147483645
Test #51:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
1073741827
output:
31 POP 30 GOTO 2; PUSH 30 GOTO 4 POP 31 GOTO 3; PUSH 31 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 5; PUSH 2 GOTO 4 POP 3 GOTO 6; PUSH 3 GOTO 4 POP 4 GOTO 7; PUSH 4 GOTO 4 POP 5 GOTO 8; PUSH 5 GOTO 4 POP 6 GOTO 9; PUSH 6 GOTO 4 POP 7 GOTO 10; PUSH 7 GOTO 4 POP 8 GOTO 11; PUSH 8 GOTO 4 POP 9 GOTO 12; PUSH...
result:
ok x=1073741827
Test #52:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
1073741825
output:
31 POP 31 GOTO 2; PUSH 31 GOTO 3 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 3 POP 5 GOTO 7; PUSH 5 GOTO 3 POP 6 GOTO 8; PUSH 6 GOTO 3 POP 7 GOTO 9; PUSH 7 GOTO 3 POP 8 GOTO 10; PUSH 8 GOTO 3 POP 9 GOTO 11; PUSH 9 GOTO 3 POP 10 GOTO 12; PUSH ...
result:
ok x=1073741825
Test #53:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
1073741823
output:
30 POP 2 GOTO 2; PUSH 2 GOTO 1 POP 3 GOTO 3; PUSH 3 GOTO 1 POP 4 GOTO 4; PUSH 4 GOTO 1 POP 5 GOTO 5; PUSH 5 GOTO 1 POP 6 GOTO 6; PUSH 6 GOTO 1 POP 7 GOTO 7; PUSH 7 GOTO 1 POP 8 GOTO 8; PUSH 8 GOTO 1 POP 9 GOTO 9; PUSH 9 GOTO 1 POP 10 GOTO 10; PUSH 10 GOTO 1 POP 11 GOTO 11; PUSH 11 GOTO 1 POP 12 GOTO...
result:
ok x=1073741823
Test #54:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
536870967
output:
32 POP 30 GOTO 2; PUSH 30 GOTO 31 POP 31 GOTO 3; PUSH 31 GOTO 1 POP 32 GOTO 4; PUSH 32 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 6; PUSH 2 GOTO 5 POP 3 GOTO 7; PUSH 3 GOTO 5 POP 4 GOTO 8; PUSH 4 GOTO 5 POP 5 GOTO 9; PUSH 5 GOTO 5 POP 6 GOTO 10; PUSH 6 GOTO 5 POP 7 GOTO 11; PUSH 7 GOTO 5 POP 8 GOTO 12; P...
result:
ok x=536870967
Test #55:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
536870965
output:
33 POP 33 GOTO 2; PUSH 33 GOTO 32 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 3 POP 5 GOTO 7; PUSH 5 GOTO 3 POP 6 GOTO 8; PUSH 6 GOTO 3 POP 7 GOTO 9; PUSH 7 GOTO 3 POP 8 GOTO 10; PUSH 8 GOTO 3 POP 9 GOTO 11; PUSH 9 GOTO 3 POP 10 GOTO 12; PUSH...
result:
ok x=536870965
Test #56:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
1073741881
output:
34 POP 34 GOTO 2; PUSH 34 GOTO 32 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 3 POP 5 GOTO 7; PUSH 5 GOTO 3 POP 6 GOTO 8; PUSH 6 GOTO 3 POP 7 GOTO 9; PUSH 7 GOTO 3 POP 8 GOTO 10; PUSH 8 GOTO 3 POP 9 GOTO 11; PUSH 9 GOTO 3 POP 10 GOTO 12; PUSH...
result:
ok x=1073741881
Test #57:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
1073741879
output:
33 POP 31 GOTO 2; PUSH 31 GOTO 32 POP 32 GOTO 3; PUSH 32 GOTO 1 POP 33 GOTO 4; PUSH 33 GOTO 1 HALT; PUSH 1 GOTO 1 POP 2 GOTO 6; PUSH 2 GOTO 5 POP 3 GOTO 7; PUSH 3 GOTO 5 POP 4 GOTO 8; PUSH 4 GOTO 5 POP 5 GOTO 9; PUSH 5 GOTO 5 POP 6 GOTO 10; PUSH 6 GOTO 5 POP 7 GOTO 11; PUSH 7 GOTO 5 POP 8 GOTO 12; P...
result:
ok x=1073741879
Test #58:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
1073741877
output:
34 POP 34 GOTO 2; PUSH 34 GOTO 33 HALT; PUSH 1 GOTO 1 POP 2 GOTO 4; PUSH 2 GOTO 3 POP 3 GOTO 5; PUSH 3 GOTO 3 POP 4 GOTO 6; PUSH 4 GOTO 3 POP 5 GOTO 7; PUSH 5 GOTO 3 POP 6 GOTO 8; PUSH 6 GOTO 3 POP 7 GOTO 9; PUSH 7 GOTO 3 POP 8 GOTO 10; PUSH 8 GOTO 3 POP 9 GOTO 11; PUSH 9 GOTO 3 POP 10 GOTO 12; PUSH...
result:
ok x=1073741877
Extra Test:
score: 0
Extra Test Passed