QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#757187#9550. The Empressucup-team1134#AC ✓1ms3876kbC++232.9kb2024-11-17 01:54:422024-11-17 01:54:44

Judging History

你现在查看的是最新测评结果

  • [2024-11-17 01:54:44]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3876kb
  • [2024-11-17 01:54:42]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pair<int,int>>
#define vll vector<pair<ll,ll>>
#define vvi vector<vector<int>>
#define vvl vector<vector<ll>>
#define vvii vector<vector<pair<int,int>>>
#define vvll vector<vector<pair<ll,ll>>>
#define vst vector<string>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mkunique(x) sort(all(x));(x).erase(unique(all(x)),(x).end())
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=15<<26;

vi solve(ll N){
    for(ll t=1;t<=40;t++){
        if(N==((1LL<<t)-1)){
            return {};
        }
    }
    for(ll t=40;t>=0;t--){
        if(N&(1LL<<t)){
            auto z=solve(N-((1LL<<t)-1));
            z.insert(z.begin(),t-1);
            return z;
        }
    }
    return {};
}

ll wh(ll N){
    for(ll t=1;t<=40;t++){
        if(N==((1LL<<t)-1)){
            return t-1;
        }
    }
    for(ll t=40;t>=0;t--){
        if(N&(1LL<<t)){
            return wh(N-((1LL<<t)-1));
        }
    }
    return -1;
}

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    vector<array<int,4>> ans;
    for(int q=0;q<30;q++){
        ans.pb({q,q+1,q,0});
    }
    ans.pb({-1,-1,0,0});
    ll L=2,R=((1LL<<31)-1)+1;
    ll K;cin>>K;
    
    if(K==1){
        cout<<1<<"\n";
        cout<<"HALT; PUSH 1 GOTO 1\n";
        return 0;
    }
    
    while(R-L>1){
        ll M=(L+R)/2;
        auto dat=solve(M);
        ll dis=si(dat)+(1LL<<31)-1-M+1;
        //cout<<M<<" "<<dis<<endl;
        if(dis>=K) L=M;
        else R=M;
    }
    
    int po=wh(L);
    auto dat=solve(L);
    
    for(int i=0;i<si(dat);i++){
        if(i==si(dat)-1){
            ans.pb({100,0,dat[i],po});
        }else{
            ans.pb({100,0,dat[i],32+i});
        }
    }
    
    rotate(ans.begin(),ans.begin()+31,ans.end());
    
    cout<<si(ans)<<"\n";
    int t=1;
    for(auto [a,b,c,d]:ans){
        //cout<<t++<<" : ";
        if(a==-1){
            cout<<"HALT; ";
            cout<<"PUSH ";
            cout<<c+1<<" ";
            cout<<"GOTO ";
            cout<<(d-31+si(ans))%si(ans)+1<<"\n";
        }else{
            cout<<"POP ";
            cout<<a+1<<" ";
            cout<<"GOTO ";
            cout<<(b-31+si(ans))%si(ans)+1<<"; ";
            cout<<"PUSH ";
            cout<<c+1<<" ";
            cout<<"GOTO ";
            cout<<(d-31+si(ans))%si(ans)+1<<"\n";
        }
    }
}


这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3560kb

input:

1

output:

1
HALT; PUSH 1 GOTO 1

result:

ok x=1

Test #2:

score: 0
Accepted
time: 0ms
memory: 3480kb

input:

5

output:

33
POP 101 GOTO 3; PUSH 30 GOTO 2
POP 101 GOTO 3; PUSH 29 GOTO 31
POP 1 GOTO 4; PUSH 1 GOTO 3
POP 2 GOTO 5; PUSH 2 GOTO 3
POP 3 GOTO 6; PUSH 3 GOTO 3
POP 4 GOTO 7; PUSH 4 GOTO 3
POP 5 GOTO 8; PUSH 5 GOTO 3
POP 6 GOTO 9; PUSH 6 GOTO 3
POP 7 GOTO 10; PUSH 7 GOTO 3
POP 8 GOTO 11; PUSH 8 GOTO 3
POP 9 GO...

result:

ok x=5

Test #3:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

17

output:

39
POP 101 GOTO 9; PUSH 30 GOTO 2
POP 101 GOTO 9; PUSH 29 GOTO 3
POP 101 GOTO 9; PUSH 28 GOTO 4
POP 101 GOTO 9; PUSH 27 GOTO 5
POP 101 GOTO 9; PUSH 26 GOTO 6
POP 101 GOTO 9; PUSH 25 GOTO 7
POP 101 GOTO 9; PUSH 24 GOTO 8
POP 101 GOTO 9; PUSH 23 GOTO 31
POP 1 GOTO 10; PUSH 1 GOTO 9
POP 2 GOTO 11; PUSH...

result:

ok x=17

Test #4:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

19260817

output:

47
POP 101 GOTO 17; PUSH 30 GOTO 2
POP 101 GOTO 17; PUSH 29 GOTO 3
POP 101 GOTO 17; PUSH 28 GOTO 4
POP 101 GOTO 17; PUSH 27 GOTO 5
POP 101 GOTO 17; PUSH 26 GOTO 6
POP 101 GOTO 17; PUSH 25 GOTO 7
POP 101 GOTO 17; PUSH 23 GOTO 8
POP 101 GOTO 17; PUSH 22 GOTO 9
POP 101 GOTO 17; PUSH 20 GOTO 10
POP 101 ...

result:

ok x=19260817

Test #5:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

1145141919

output:

46
POP 101 GOTO 16; PUSH 29 GOTO 2
POP 101 GOTO 16; PUSH 28 GOTO 3
POP 101 GOTO 16; PUSH 27 GOTO 4
POP 101 GOTO 16; PUSH 25 GOTO 5
POP 101 GOTO 16; PUSH 24 GOTO 6
POP 101 GOTO 16; PUSH 23 GOTO 7
POP 101 GOTO 16; PUSH 21 GOTO 8
POP 101 GOTO 16; PUSH 20 GOTO 9
POP 101 GOTO 16; PUSH 19 GOTO 10
POP 101 ...

result:

ok x=1145141919

Test #6:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

2147483647

output:

32
POP 101 GOTO 2; PUSH 1 GOTO 2
POP 1 GOTO 3; PUSH 1 GOTO 2
POP 2 GOTO 4; PUSH 2 GOTO 2
POP 3 GOTO 5; PUSH 3 GOTO 2
POP 4 GOTO 6; PUSH 4 GOTO 2
POP 5 GOTO 7; PUSH 5 GOTO 2
POP 6 GOTO 8; PUSH 6 GOTO 2
POP 7 GOTO 9; PUSH 7 GOTO 2
POP 8 GOTO 10; PUSH 8 GOTO 2
POP 9 GOTO 11; PUSH 9 GOTO 2
POP 10 GOTO 1...

result:

ok x=2147483647

Test #7:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

1868665701

output:

45
POP 101 GOTO 15; PUSH 28 GOTO 2
POP 101 GOTO 15; PUSH 23 GOTO 3
POP 101 GOTO 15; PUSH 20 GOTO 4
POP 101 GOTO 15; PUSH 19 GOTO 5
POP 101 GOTO 15; PUSH 18 GOTO 6
POP 101 GOTO 15; PUSH 17 GOTO 7
POP 101 GOTO 15; PUSH 14 GOTO 8
POP 101 GOTO 15; PUSH 13 GOTO 9
POP 101 GOTO 15; PUSH 11 GOTO 10
POP 101 ...

result:

ok x=1868665701

Test #8:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

2102547599

output:

46
POP 101 GOTO 16; PUSH 25 GOTO 2
POP 101 GOTO 16; PUSH 23 GOTO 3
POP 101 GOTO 16; PUSH 21 GOTO 4
POP 101 GOTO 16; PUSH 19 GOTO 5
POP 101 GOTO 16; PUSH 18 GOTO 6
POP 101 GOTO 16; PUSH 16 GOTO 7
POP 101 GOTO 16; PUSH 15 GOTO 8
POP 101 GOTO 16; PUSH 13 GOTO 9
POP 101 GOTO 16; PUSH 11 GOTO 10
POP 101 ...

result:

ok x=2102547599

Test #9:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

2054530275

output:

44
POP 101 GOTO 14; PUSH 26 GOTO 2
POP 101 GOTO 14; PUSH 24 GOTO 3
POP 101 GOTO 14; PUSH 23 GOTO 4
POP 101 GOTO 14; PUSH 19 GOTO 5
POP 101 GOTO 14; PUSH 17 GOTO 6
POP 101 GOTO 14; PUSH 14 GOTO 7
POP 101 GOTO 14; PUSH 12 GOTO 8
POP 101 GOTO 14; PUSH 11 GOTO 9
POP 101 GOTO 14; PUSH 9 GOTO 10
POP 101 G...

result:

ok x=2054530275

Test #10:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

1953685475

output:

42
POP 101 GOTO 12; PUSH 27 GOTO 2
POP 101 GOTO 12; PUSH 25 GOTO 3
POP 101 GOTO 12; PUSH 24 GOTO 4
POP 101 GOTO 12; PUSH 23 GOTO 5
POP 101 GOTO 12; PUSH 19 GOTO 6
POP 101 GOTO 12; PUSH 18 GOTO 7
POP 101 GOTO 12; PUSH 16 GOTO 8
POP 101 GOTO 12; PUSH 13 GOTO 9
POP 101 GOTO 12; PUSH 5 GOTO 10
POP 101 G...

result:

ok x=1953685475

Test #11:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2119017059

output:

46
POP 101 GOTO 16; PUSH 24 GOTO 2
POP 101 GOTO 16; PUSH 23 GOTO 3
POP 101 GOTO 16; PUSH 21 GOTO 4
POP 101 GOTO 16; PUSH 20 GOTO 5
POP 101 GOTO 16; PUSH 17 GOTO 6
POP 101 GOTO 16; PUSH 14 GOTO 7
POP 101 GOTO 16; PUSH 12 GOTO 8
POP 101 GOTO 16; PUSH 11 GOTO 9
POP 101 GOTO 16; PUSH 10 GOTO 10
POP 101 ...

result:

ok x=2119017059

Test #12:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

1911337379

output:

46
POP 101 GOTO 16; PUSH 27 GOTO 2
POP 101 GOTO 16; PUSH 26 GOTO 3
POP 101 GOTO 16; PUSH 25 GOTO 4
POP 101 GOTO 16; PUSH 20 GOTO 5
POP 101 GOTO 16; PUSH 17 GOTO 6
POP 101 GOTO 16; PUSH 16 GOTO 7
POP 101 GOTO 16; PUSH 14 GOTO 8
POP 101 GOTO 16; PUSH 11 GOTO 9
POP 101 GOTO 16; PUSH 10 GOTO 10
POP 101 ...

result:

ok x=1911337379

Test #13:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

887618459

output:

44
POP 101 GOTO 14; PUSH 30 GOTO 2
POP 101 GOTO 14; PUSH 27 GOTO 3
POP 101 GOTO 14; PUSH 25 GOTO 4
POP 101 GOTO 14; PUSH 24 GOTO 5
POP 101 GOTO 14; PUSH 20 GOTO 6
POP 101 GOTO 14; PUSH 19 GOTO 7
POP 101 GOTO 14; PUSH 10 GOTO 8
POP 101 GOTO 14; PUSH 6 GOTO 9
POP 101 GOTO 14; PUSH 5 GOTO 10
POP 101 GO...

result:

ok x=887618459

Test #14:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

831117597

output:

45
POP 101 GOTO 15; PUSH 30 GOTO 2
POP 101 GOTO 15; PUSH 27 GOTO 3
POP 101 GOTO 15; PUSH 26 GOTO 4
POP 101 GOTO 15; PUSH 25 GOTO 5
POP 101 GOTO 15; PUSH 22 GOTO 6
POP 101 GOTO 15; PUSH 21 GOTO 7
POP 101 GOTO 15; PUSH 20 GOTO 8
POP 101 GOTO 15; PUSH 18 GOTO 9
POP 101 GOTO 15; PUSH 17 GOTO 10
POP 101 ...

result:

ok x=831117597

Test #15:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

1820253559

output:

42
POP 101 GOTO 12; PUSH 28 GOTO 2
POP 101 GOTO 12; PUSH 25 GOTO 3
POP 101 GOTO 12; PUSH 24 GOTO 4
POP 101 GOTO 12; PUSH 23 GOTO 5
POP 101 GOTO 12; PUSH 16 GOTO 6
POP 101 GOTO 12; PUSH 13 GOTO 7
POP 101 GOTO 12; PUSH 9 GOTO 8
POP 101 GOTO 12; PUSH 7 GOTO 9
POP 101 GOTO 12; PUSH 4 GOTO 10
POP 101 GOT...

result:

ok x=1820253559

Test #16:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

1563399651

output:

44
POP 101 GOTO 14; PUSH 29 GOTO 2
POP 101 GOTO 14; PUSH 25 GOTO 3
POP 101 GOTO 14; PUSH 23 GOTO 4
POP 101 GOTO 14; PUSH 22 GOTO 5
POP 101 GOTO 14; PUSH 20 GOTO 6
POP 101 GOTO 14; PUSH 14 GOTO 7
POP 101 GOTO 14; PUSH 13 GOTO 8
POP 101 GOTO 14; PUSH 11 GOTO 9
POP 101 GOTO 14; PUSH 9 GOTO 10
POP 101 G...

result:

ok x=1563399651

Test #17:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

1631350977

output:

47
POP 101 GOTO 17; PUSH 28 GOTO 2
POP 101 GOTO 17; PUSH 27 GOTO 3
POP 101 GOTO 17; PUSH 26 GOTO 4
POP 101 GOTO 17; PUSH 25 GOTO 5
POP 101 GOTO 17; PUSH 23 GOTO 6
POP 101 GOTO 17; PUSH 22 GOTO 7
POP 101 GOTO 17; PUSH 17 GOTO 8
POP 101 GOTO 17; PUSH 16 GOTO 9
POP 101 GOTO 17; PUSH 15 GOTO 10
POP 101 ...

result:

ok x=1631350977

Test #18:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

1897574279

output:

44
POP 101 GOTO 14; PUSH 27 GOTO 2
POP 101 GOTO 14; PUSH 26 GOTO 3
POP 101 GOTO 14; PUSH 25 GOTO 4
POP 101 GOTO 14; PUSH 23 GOTO 5
POP 101 GOTO 14; PUSH 22 GOTO 6
POP 101 GOTO 14; PUSH 21 GOTO 7
POP 101 GOTO 14; PUSH 18 GOTO 8
POP 101 GOTO 14; PUSH 16 GOTO 9
POP 101 GOTO 14; PUSH 14 GOTO 10
POP 101 ...

result:

ok x=1897574279

Test #19:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

450973351

output:

48
POP 101 GOTO 18; PUSH 30 GOTO 2
POP 101 GOTO 18; PUSH 29 GOTO 3
POP 101 GOTO 18; PUSH 26 GOTO 4
POP 101 GOTO 18; PUSH 24 GOTO 5
POP 101 GOTO 18; PUSH 20 GOTO 6
POP 101 GOTO 18; PUSH 19 GOTO 7
POP 101 GOTO 18; PUSH 18 GOTO 8
POP 101 GOTO 18; PUSH 17 GOTO 9
POP 101 GOTO 18; PUSH 15 GOTO 10
POP 101 ...

result:

ok x=450973351

Test #20:

score: 0
Accepted
time: 1ms
memory: 3564kb

input:

1212949423

output:

50
POP 101 GOTO 20; PUSH 29 GOTO 2
POP 101 GOTO 20; PUSH 28 GOTO 3
POP 101 GOTO 20; PUSH 26 GOTO 4
POP 101 GOTO 20; PUSH 25 GOTO 5
POP 101 GOTO 20; PUSH 24 GOTO 6
POP 101 GOTO 20; PUSH 23 GOTO 7
POP 101 GOTO 20; PUSH 21 GOTO 8
POP 101 GOTO 20; PUSH 20 GOTO 9
POP 101 GOTO 20; PUSH 17 GOTO 10
POP 101 ...

result:

ok x=1212949423

Test #21:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

1800664165

output:

45
POP 101 GOTO 15; PUSH 28 GOTO 2
POP 101 GOTO 15; PUSH 26 GOTO 3
POP 101 GOTO 15; PUSH 23 GOTO 4
POP 101 GOTO 15; PUSH 21 GOTO 5
POP 101 GOTO 15; PUSH 19 GOTO 6
POP 101 GOTO 15; PUSH 18 GOTO 7
POP 101 GOTO 15; PUSH 11 GOTO 8
POP 101 GOTO 15; PUSH 9 GOTO 9
POP 101 GOTO 15; PUSH 8 GOTO 10
POP 101 GO...

result:

ok x=1800664165

Test #22:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

2083340735

output:

46
POP 101 GOTO 16; PUSH 25 GOTO 2
POP 101 GOTO 16; PUSH 24 GOTO 3
POP 101 GOTO 16; PUSH 23 GOTO 4
POP 101 GOTO 16; PUSH 22 GOTO 5
POP 101 GOTO 16; PUSH 20 GOTO 6
POP 101 GOTO 16; PUSH 17 GOTO 7
POP 101 GOTO 16; PUSH 15 GOTO 8
POP 101 GOTO 16; PUSH 13 GOTO 9
POP 101 GOTO 16; PUSH 12 GOTO 10
POP 101 ...

result:

ok x=2083340735

Test #23:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

1989353363

output:

42
POP 101 GOTO 12; PUSH 27 GOTO 2
POP 101 GOTO 12; PUSH 24 GOTO 3
POP 101 GOTO 12; PUSH 22 GOTO 4
POP 101 GOTO 12; PUSH 21 GOTO 5
POP 101 GOTO 12; PUSH 19 GOTO 6
POP 101 GOTO 12; PUSH 18 GOTO 7
POP 101 GOTO 12; PUSH 15 GOTO 8
POP 101 GOTO 12; PUSH 14 GOTO 9
POP 101 GOTO 12; PUSH 13 GOTO 10
POP 101 ...

result:

ok x=1989353363

Test #24:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

1686030751

output:

46
POP 101 GOTO 16; PUSH 28 GOTO 2
POP 101 GOTO 16; PUSH 27 GOTO 3
POP 101 GOTO 16; PUSH 25 GOTO 4
POP 101 GOTO 16; PUSH 24 GOTO 5
POP 101 GOTO 16; PUSH 23 GOTO 6
POP 101 GOTO 16; PUSH 16 GOTO 7
POP 101 GOTO 16; PUSH 13 GOTO 8
POP 101 GOTO 16; PUSH 12 GOTO 9
POP 101 GOTO 16; PUSH 10 GOTO 10
POP 101 ...

result:

ok x=1686030751

Test #25:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

483234157

output:

47
POP 101 GOTO 17; PUSH 30 GOTO 2
POP 101 GOTO 17; PUSH 29 GOTO 3
POP 101 GOTO 17; PUSH 25 GOTO 4
POP 101 GOTO 17; PUSH 24 GOTO 5
POP 101 GOTO 17; PUSH 21 GOTO 6
POP 101 GOTO 17; PUSH 20 GOTO 7
POP 101 GOTO 17; PUSH 17 GOTO 8
POP 101 GOTO 17; PUSH 14 GOTO 9
POP 101 GOTO 17; PUSH 13 GOTO 10
POP 101 ...

result:

ok x=483234157

Test #26:

score: 0
Accepted
time: 0ms
memory: 3876kb

input:

1784967647

output:

46
POP 101 GOTO 16; PUSH 28 GOTO 2
POP 101 GOTO 16; PUSH 26 GOTO 3
POP 101 GOTO 16; PUSH 24 GOTO 4
POP 101 GOTO 16; PUSH 23 GOTO 5
POP 101 GOTO 16; PUSH 20 GOTO 6
POP 101 GOTO 16; PUSH 19 GOTO 7
POP 101 GOTO 16; PUSH 17 GOTO 8
POP 101 GOTO 16; PUSH 16 GOTO 9
POP 101 GOTO 16; PUSH 15 GOTO 10
POP 101 ...

result:

ok x=1784967647

Test #27:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

1052131125

output:

41
POP 101 GOTO 11; PUSH 30 GOTO 2
POP 101 GOTO 11; PUSH 24 GOTO 3
POP 101 GOTO 11; PUSH 22 GOTO 4
POP 101 GOTO 11; PUSH 19 GOTO 5
POP 101 GOTO 11; PUSH 16 GOTO 6
POP 101 GOTO 11; PUSH 15 GOTO 7
POP 101 GOTO 11; PUSH 14 GOTO 8
POP 101 GOTO 11; PUSH 7 GOTO 9
POP 101 GOTO 11; PUSH 6 GOTO 10
POP 101 GO...

result:

ok x=1052131125

Test #28:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

673034421

output:

49
POP 101 GOTO 19; PUSH 30 GOTO 2
POP 101 GOTO 19; PUSH 28 GOTO 3
POP 101 GOTO 19; PUSH 26 GOTO 4
POP 101 GOTO 19; PUSH 25 GOTO 5
POP 101 GOTO 19; PUSH 24 GOTO 6
POP 101 GOTO 19; PUSH 23 GOTO 7
POP 101 GOTO 19; PUSH 22 GOTO 8
POP 101 GOTO 19; PUSH 21 GOTO 9
POP 101 GOTO 19; PUSH 17 GOTO 10
POP 101 ...

result:

ok x=673034421

Test #29:

score: 0
Accepted
time: 1ms
memory: 3856kb

input:

1136250939

output:

48
POP 101 GOTO 18; PUSH 29 GOTO 2
POP 101 GOTO 18; PUSH 28 GOTO 3
POP 101 GOTO 18; PUSH 27 GOTO 4
POP 101 GOTO 18; PUSH 26 GOTO 5
POP 101 GOTO 18; PUSH 22 GOTO 6
POP 101 GOTO 18; PUSH 18 GOTO 7
POP 101 GOTO 18; PUSH 17 GOTO 8
POP 101 GOTO 18; PUSH 13 GOTO 9
POP 101 GOTO 18; PUSH 11 GOTO 10
POP 101 ...

result:

ok x=1136250939

Test #30:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

1434678339

output:

48
POP 101 GOTO 18; PUSH 29 GOTO 2
POP 101 GOTO 18; PUSH 27 GOTO 3
POP 101 GOTO 18; PUSH 25 GOTO 4
POP 101 GOTO 18; PUSH 22 GOTO 5
POP 101 GOTO 18; PUSH 21 GOTO 6
POP 101 GOTO 18; PUSH 20 GOTO 7
POP 101 GOTO 18; PUSH 19 GOTO 8
POP 101 GOTO 18; PUSH 18 GOTO 9
POP 101 GOTO 18; PUSH 15 GOTO 10
POP 101 ...

result:

ok x=1434678339

Test #31:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

174274079

output:

46
POP 101 GOTO 16; PUSH 30 GOTO 2
POP 101 GOTO 16; PUSH 29 GOTO 3
POP 101 GOTO 16; PUSH 28 GOTO 4
POP 101 GOTO 16; PUSH 26 GOTO 5
POP 101 GOTO 16; PUSH 24 GOTO 6
POP 101 GOTO 16; PUSH 23 GOTO 7
POP 101 GOTO 16; PUSH 20 GOTO 8
POP 101 GOTO 16; PUSH 19 GOTO 9
POP 101 GOTO 16; PUSH 18 GOTO 10
POP 101 ...

result:

ok x=174274079

Test #32:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

1911998229

output:

41
POP 101 GOTO 11; PUSH 27 GOTO 2
POP 101 GOTO 11; PUSH 26 GOTO 3
POP 101 GOTO 11; PUSH 25 GOTO 4
POP 101 GOTO 11; PUSH 19 GOTO 5
POP 101 GOTO 11; PUSH 16 GOTO 6
POP 101 GOTO 11; PUSH 13 GOTO 7
POP 101 GOTO 11; PUSH 12 GOTO 8
POP 101 GOTO 11; PUSH 11 GOTO 9
POP 101 GOTO 11; PUSH 7 GOTO 10
POP 101 G...

result:

ok x=1911998229

Test #33:

score: 0
Accepted
time: 0ms
memory: 3848kb

input:

441665295

output:

46
POP 101 GOTO 16; PUSH 30 GOTO 2
POP 101 GOTO 16; PUSH 29 GOTO 3
POP 101 GOTO 16; PUSH 26 GOTO 4
POP 101 GOTO 16; PUSH 24 GOTO 5
POP 101 GOTO 16; PUSH 23 GOTO 6
POP 101 GOTO 16; PUSH 21 GOTO 7
POP 101 GOTO 16; PUSH 19 GOTO 8
POP 101 GOTO 16; PUSH 18 GOTO 9
POP 101 GOTO 16; PUSH 15 GOTO 10
POP 101 ...

result:

ok x=441665295

Test #34:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

1325107907

output:

44
POP 101 GOTO 14; PUSH 29 GOTO 2
POP 101 GOTO 14; PUSH 28 GOTO 3
POP 101 GOTO 14; PUSH 24 GOTO 4
POP 101 GOTO 14; PUSH 18 GOTO 5
POP 101 GOTO 14; PUSH 14 GOTO 6
POP 101 GOTO 14; PUSH 13 GOTO 7
POP 101 GOTO 14; PUSH 12 GOTO 8
POP 101 GOTO 14; PUSH 10 GOTO 9
POP 101 GOTO 14; PUSH 8 GOTO 10
POP 101 G...

result:

ok x=1325107907

Test #35:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

264691101

output:

45
POP 101 GOTO 15; PUSH 30 GOTO 2
POP 101 GOTO 15; PUSH 29 GOTO 3
POP 101 GOTO 15; PUSH 28 GOTO 4
POP 101 GOTO 15; PUSH 21 GOTO 5
POP 101 GOTO 15; PUSH 20 GOTO 6
POP 101 GOTO 15; PUSH 19 GOTO 7
POP 101 GOTO 15; PUSH 16 GOTO 8
POP 101 GOTO 15; PUSH 13 GOTO 9
POP 101 GOTO 15; PUSH 9 GOTO 10
POP 101 G...

result:

ok x=264691101

Test #36:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

1655988757

output:

45
POP 101 GOTO 15; PUSH 28 GOTO 2
POP 101 GOTO 15; PUSH 27 GOTO 3
POP 101 GOTO 15; PUSH 26 GOTO 4
POP 101 GOTO 15; PUSH 24 GOTO 5
POP 101 GOTO 15; PUSH 22 GOTO 6
POP 101 GOTO 15; PUSH 19 GOTO 7
POP 101 GOTO 15; PUSH 17 GOTO 8
POP 101 GOTO 15; PUSH 16 GOTO 9
POP 101 GOTO 15; PUSH 15 GOTO 10
POP 101 ...

result:

ok x=1655988757

Test #37:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

1912613857

output:

47
POP 101 GOTO 17; PUSH 27 GOTO 2
POP 101 GOTO 17; PUSH 26 GOTO 3
POP 101 GOTO 17; PUSH 24 GOTO 4
POP 101 GOTO 17; PUSH 23 GOTO 5
POP 101 GOTO 17; PUSH 22 GOTO 6
POP 101 GOTO 17; PUSH 21 GOTO 7
POP 101 GOTO 17; PUSH 20 GOTO 8
POP 101 GOTO 17; PUSH 19 GOTO 9
POP 101 GOTO 17; PUSH 18 GOTO 10
POP 101 ...

result:

ok x=1912613857

Test #38:

score: 0
Accepted
time: 1ms
memory: 3876kb

input:

471758205

output:

45
POP 101 GOTO 15; PUSH 30 GOTO 2
POP 101 GOTO 15; PUSH 29 GOTO 3
POP 101 GOTO 15; PUSH 25 GOTO 4
POP 101 GOTO 15; PUSH 24 GOTO 5
POP 101 GOTO 15; PUSH 23 GOTO 6
POP 101 GOTO 15; PUSH 22 GOTO 7
POP 101 GOTO 15; PUSH 21 GOTO 8
POP 101 GOTO 15; PUSH 16 GOTO 9
POP 101 GOTO 15; PUSH 15 GOTO 10
POP 101 ...

result:

ok x=471758205

Test #39:

score: 0
Accepted
time: 1ms
memory: 3580kb

input:

1295394655

output:

46
POP 101 GOTO 16; PUSH 29 GOTO 2
POP 101 GOTO 16; PUSH 28 GOTO 3
POP 101 GOTO 16; PUSH 25 GOTO 4
POP 101 GOTO 16; PUSH 23 GOTO 5
POP 101 GOTO 16; PUSH 22 GOTO 6
POP 101 GOTO 16; PUSH 19 GOTO 7
POP 101 GOTO 16; PUSH 16 GOTO 8
POP 101 GOTO 16; PUSH 15 GOTO 9
POP 101 GOTO 16; PUSH 14 GOTO 10
POP 101 ...

result:

ok x=1295394655

Test #40:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

1734993785

output:

43
POP 101 GOTO 13; PUSH 28 GOTO 2
POP 101 GOTO 13; PUSH 27 GOTO 3
POP 101 GOTO 13; PUSH 23 GOTO 4
POP 101 GOTO 13; PUSH 20 GOTO 5
POP 101 GOTO 13; PUSH 18 GOTO 6
POP 101 GOTO 13; PUSH 17 GOTO 7
POP 101 GOTO 13; PUSH 12 GOTO 8
POP 101 GOTO 13; PUSH 11 GOTO 9
POP 101 GOTO 13; PUSH 7 GOTO 10
POP 101 G...

result:

ok x=1734993785

Test #41:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

986893495

output:

46
POP 101 GOTO 16; PUSH 30 GOTO 2
POP 101 GOTO 16; PUSH 26 GOTO 3
POP 101 GOTO 16; PUSH 24 GOTO 4
POP 101 GOTO 16; PUSH 21 GOTO 5
POP 101 GOTO 16; PUSH 19 GOTO 6
POP 101 GOTO 16; PUSH 18 GOTO 7
POP 101 GOTO 16; PUSH 16 GOTO 8
POP 101 GOTO 16; PUSH 13 GOTO 9
POP 101 GOTO 16; PUSH 12 GOTO 10
POP 101 ...

result:

ok x=986893495

Test #42:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

105826293

output:

45
POP 101 GOTO 15; PUSH 30 GOTO 2
POP 101 GOTO 15; PUSH 29 GOTO 3
POP 101 GOTO 15; PUSH 28 GOTO 4
POP 101 GOTO 15; PUSH 27 GOTO 5
POP 101 GOTO 15; PUSH 24 GOTO 6
POP 101 GOTO 15; PUSH 23 GOTO 7
POP 101 GOTO 15; PUSH 21 GOTO 8
POP 101 GOTO 15; PUSH 20 GOTO 9
POP 101 GOTO 15; PUSH 16 GOTO 10
POP 101 ...

result:

ok x=105826293

Test #43:

score: 0
Accepted
time: 1ms
memory: 3788kb

input:

3

output:

32
POP 101 GOTO 2; PUSH 30 GOTO 31
POP 1 GOTO 3; PUSH 1 GOTO 2
POP 2 GOTO 4; PUSH 2 GOTO 2
POP 3 GOTO 5; PUSH 3 GOTO 2
POP 4 GOTO 6; PUSH 4 GOTO 2
POP 5 GOTO 7; PUSH 5 GOTO 2
POP 6 GOTO 8; PUSH 6 GOTO 2
POP 7 GOTO 9; PUSH 7 GOTO 2
POP 8 GOTO 10; PUSH 8 GOTO 2
POP 9 GOTO 11; PUSH 9 GOTO 2
POP 10 GOTO...

result:

ok x=3

Test #44:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

7

output:

34
POP 101 GOTO 4; PUSH 30 GOTO 2
POP 101 GOTO 4; PUSH 29 GOTO 3
POP 101 GOTO 4; PUSH 28 GOTO 31
POP 1 GOTO 5; PUSH 1 GOTO 4
POP 2 GOTO 6; PUSH 2 GOTO 4
POP 3 GOTO 7; PUSH 3 GOTO 4
POP 4 GOTO 8; PUSH 4 GOTO 4
POP 5 GOTO 9; PUSH 5 GOTO 4
POP 6 GOTO 10; PUSH 6 GOTO 4
POP 7 GOTO 11; PUSH 7 GOTO 4
POP 8...

result:

ok x=7

Test #45:

score: 0
Accepted
time: 0ms
memory: 3500kb

input:

9

output:

35
POP 101 GOTO 5; PUSH 30 GOTO 2
POP 101 GOTO 5; PUSH 29 GOTO 3
POP 101 GOTO 5; PUSH 28 GOTO 4
POP 101 GOTO 5; PUSH 27 GOTO 31
POP 1 GOTO 6; PUSH 1 GOTO 5
POP 2 GOTO 7; PUSH 2 GOTO 5
POP 3 GOTO 8; PUSH 3 GOTO 5
POP 4 GOTO 9; PUSH 4 GOTO 5
POP 5 GOTO 10; PUSH 5 GOTO 5
POP 6 GOTO 11; PUSH 6 GOTO 5
PO...

result:

ok x=9

Test #46:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

11

output:

36
POP 101 GOTO 6; PUSH 30 GOTO 2
POP 101 GOTO 6; PUSH 29 GOTO 3
POP 101 GOTO 6; PUSH 28 GOTO 4
POP 101 GOTO 6; PUSH 27 GOTO 5
POP 101 GOTO 6; PUSH 26 GOTO 31
POP 1 GOTO 7; PUSH 1 GOTO 6
POP 2 GOTO 8; PUSH 2 GOTO 6
POP 3 GOTO 9; PUSH 3 GOTO 6
POP 4 GOTO 10; PUSH 4 GOTO 6
POP 5 GOTO 11; PUSH 5 GOTO 6...

result:

ok x=11

Test #47:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

13

output:

37
POP 101 GOTO 7; PUSH 30 GOTO 2
POP 101 GOTO 7; PUSH 29 GOTO 3
POP 101 GOTO 7; PUSH 28 GOTO 4
POP 101 GOTO 7; PUSH 27 GOTO 5
POP 101 GOTO 7; PUSH 26 GOTO 6
POP 101 GOTO 7; PUSH 25 GOTO 31
POP 1 GOTO 8; PUSH 1 GOTO 7
POP 2 GOTO 9; PUSH 2 GOTO 7
POP 3 GOTO 10; PUSH 3 GOTO 7
POP 4 GOTO 11; PUSH 4 GOT...

result:

ok x=13

Test #48:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

15

output:

38
POP 101 GOTO 8; PUSH 30 GOTO 2
POP 101 GOTO 8; PUSH 29 GOTO 3
POP 101 GOTO 8; PUSH 28 GOTO 4
POP 101 GOTO 8; PUSH 27 GOTO 5
POP 101 GOTO 8; PUSH 26 GOTO 6
POP 101 GOTO 8; PUSH 25 GOTO 7
POP 101 GOTO 8; PUSH 24 GOTO 31
POP 1 GOTO 9; PUSH 1 GOTO 8
POP 2 GOTO 10; PUSH 2 GOTO 8
POP 3 GOTO 11; PUSH 3 ...

result:

ok x=15

Test #49:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

2147483643

output:

32
POP 101 GOTO 2; PUSH 2 GOTO 3
POP 1 GOTO 3; PUSH 1 GOTO 2
POP 2 GOTO 4; PUSH 2 GOTO 2
POP 3 GOTO 5; PUSH 3 GOTO 2
POP 4 GOTO 6; PUSH 4 GOTO 2
POP 5 GOTO 7; PUSH 5 GOTO 2
POP 6 GOTO 8; PUSH 6 GOTO 2
POP 7 GOTO 9; PUSH 7 GOTO 2
POP 8 GOTO 10; PUSH 8 GOTO 2
POP 9 GOTO 11; PUSH 9 GOTO 2
POP 10 GOTO 1...

result:

ok x=2147483643

Test #50:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

2147483645

output:

33
POP 101 GOTO 3; PUSH 2 GOTO 2
POP 101 GOTO 3; PUSH 1 GOTO 3
POP 1 GOTO 4; PUSH 1 GOTO 3
POP 2 GOTO 5; PUSH 2 GOTO 3
POP 3 GOTO 6; PUSH 3 GOTO 3
POP 4 GOTO 7; PUSH 4 GOTO 3
POP 5 GOTO 8; PUSH 5 GOTO 3
POP 6 GOTO 9; PUSH 6 GOTO 3
POP 7 GOTO 10; PUSH 7 GOTO 3
POP 8 GOTO 11; PUSH 8 GOTO 3
POP 9 GOTO ...

result:

ok x=2147483645

Test #51:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1073741827

output:

32
POP 101 GOTO 2; PUSH 29 GOTO 30
POP 1 GOTO 3; PUSH 1 GOTO 2
POP 2 GOTO 4; PUSH 2 GOTO 2
POP 3 GOTO 5; PUSH 3 GOTO 2
POP 4 GOTO 6; PUSH 4 GOTO 2
POP 5 GOTO 7; PUSH 5 GOTO 2
POP 6 GOTO 8; PUSH 6 GOTO 2
POP 7 GOTO 9; PUSH 7 GOTO 2
POP 8 GOTO 10; PUSH 8 GOTO 2
POP 9 GOTO 11; PUSH 9 GOTO 2
POP 10 GOTO...

result:

ok x=1073741827

Test #52:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

1073741825

output:

33
POP 101 GOTO 3; PUSH 30 GOTO 2
POP 101 GOTO 3; PUSH 1 GOTO 3
POP 1 GOTO 4; PUSH 1 GOTO 3
POP 2 GOTO 5; PUSH 2 GOTO 3
POP 3 GOTO 6; PUSH 3 GOTO 3
POP 4 GOTO 7; PUSH 4 GOTO 3
POP 5 GOTO 8; PUSH 5 GOTO 3
POP 6 GOTO 9; PUSH 6 GOTO 3
POP 7 GOTO 10; PUSH 7 GOTO 3
POP 8 GOTO 11; PUSH 8 GOTO 3
POP 9 GOTO...

result:

ok x=1073741825

Test #53:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1073741823

output:

34
POP 101 GOTO 4; PUSH 30 GOTO 2
POP 101 GOTO 4; PUSH 2 GOTO 3
POP 101 GOTO 4; PUSH 1 GOTO 4
POP 1 GOTO 5; PUSH 1 GOTO 4
POP 2 GOTO 6; PUSH 2 GOTO 4
POP 3 GOTO 7; PUSH 3 GOTO 4
POP 4 GOTO 8; PUSH 4 GOTO 4
POP 5 GOTO 9; PUSH 5 GOTO 4
POP 6 GOTO 10; PUSH 6 GOTO 4
POP 7 GOTO 11; PUSH 7 GOTO 4
POP 8 GO...

result:

ok x=1073741823

Test #54:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

536870967

output:

58
POP 101 GOTO 28; PUSH 30 GOTO 2
POP 101 GOTO 28; PUSH 28 GOTO 3
POP 101 GOTO 28; PUSH 27 GOTO 4
POP 101 GOTO 28; PUSH 26 GOTO 5
POP 101 GOTO 28; PUSH 25 GOTO 6
POP 101 GOTO 28; PUSH 24 GOTO 7
POP 101 GOTO 28; PUSH 23 GOTO 8
POP 101 GOTO 28; PUSH 22 GOTO 9
POP 101 GOTO 28; PUSH 21 GOTO 10
POP 101 ...

result:

ok x=536870967

Test #55:

score: 0
Accepted
time: 1ms
memory: 3856kb

input:

536870965

output:

57
POP 101 GOTO 27; PUSH 30 GOTO 2
POP 101 GOTO 27; PUSH 28 GOTO 3
POP 101 GOTO 27; PUSH 27 GOTO 4
POP 101 GOTO 27; PUSH 26 GOTO 5
POP 101 GOTO 27; PUSH 25 GOTO 6
POP 101 GOTO 27; PUSH 24 GOTO 7
POP 101 GOTO 27; PUSH 23 GOTO 8
POP 101 GOTO 27; PUSH 22 GOTO 9
POP 101 GOTO 27; PUSH 21 GOTO 10
POP 101 ...

result:

ok x=536870965

Test #56:

score: 0
Accepted
time: 1ms
memory: 3628kb

input:

1073741881

output:

59
POP 101 GOTO 29; PUSH 29 GOTO 2
POP 101 GOTO 29; PUSH 28 GOTO 3
POP 101 GOTO 29; PUSH 27 GOTO 4
POP 101 GOTO 29; PUSH 26 GOTO 5
POP 101 GOTO 29; PUSH 25 GOTO 6
POP 101 GOTO 29; PUSH 24 GOTO 7
POP 101 GOTO 29; PUSH 23 GOTO 8
POP 101 GOTO 29; PUSH 22 GOTO 9
POP 101 GOTO 29; PUSH 21 GOTO 10
POP 101 ...

result:

ok x=1073741881

Test #57:

score: 0
Accepted
time: 1ms
memory: 3564kb

input:

1073741879

output:

58
POP 101 GOTO 28; PUSH 29 GOTO 2
POP 101 GOTO 28; PUSH 28 GOTO 3
POP 101 GOTO 28; PUSH 27 GOTO 4
POP 101 GOTO 28; PUSH 26 GOTO 5
POP 101 GOTO 28; PUSH 25 GOTO 6
POP 101 GOTO 28; PUSH 24 GOTO 7
POP 101 GOTO 28; PUSH 23 GOTO 8
POP 101 GOTO 28; PUSH 22 GOTO 9
POP 101 GOTO 28; PUSH 21 GOTO 10
POP 101 ...

result:

ok x=1073741879

Test #58:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

1073741877

output:

57
POP 101 GOTO 27; PUSH 29 GOTO 2
POP 101 GOTO 27; PUSH 28 GOTO 3
POP 101 GOTO 27; PUSH 27 GOTO 4
POP 101 GOTO 27; PUSH 26 GOTO 5
POP 101 GOTO 27; PUSH 25 GOTO 6
POP 101 GOTO 27; PUSH 24 GOTO 7
POP 101 GOTO 27; PUSH 23 GOTO 8
POP 101 GOTO 27; PUSH 22 GOTO 9
POP 101 GOTO 27; PUSH 21 GOTO 10
POP 101 ...

result:

ok x=1073741877

Extra Test:

score: 0
Extra Test Passed