QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#808693#9550. The Empresstest_algthAC ✓1ms3864kbC++172.9kb2024-12-11 00:03:382024-12-11 00:03:39

Judging History

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

  • [2024-12-11 00:03:39]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3864kb
  • [2024-12-11 00:03:38]
  • 提交

answer

#include <bits/stdc++.h>

const int MAXN = 66;
int A[MAXN];

inline void OUT(int a, int b, int c, int d) {
  std::cout << "POP " << a << " GOTO " << b << "; PUSH " << c << " GOTO " << d << '\n';
}

inline void EXIT() {
  std::cout << "HALT; PUSH 99 GOTO 1\n";
}

int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);

  int N;
  std::cin >> N;
  if ((N & 1) == 0) {
    std::cout << "What ????\n";
    return 0;
  }

  --N;
  if (N <= 63) {
    std::cout << (N + 1) << '\n';
    for (int i = 1; i <= N; ++i) {
      OUT(1, i + 1, 1, i + 1);
    }
    EXIT();
    return 0;
  }

  bool flag = true;
  for (int i = 0; i <= 31 && flag; ++i) {
    for (int j = 0; i + j * 2 <= 63 && flag; ++j) {
      for (int k = i; k <= 31 && flag && i + 2 * j + k <= 63; ++k) {
        int now = N - i * 2 - j * 2;
        if ((now >> (k + 1)) > 0) continue;
        if (__builtin_popcount(now) == k - i) {
          flag = false;
          int idx = 1;
          std::cout << (i + 2 * j + k + 1) << '\n';
          // printf("(%d, %d, %d)\n", i, j, k);
          // for (int h = 1; h <= k; ++h) {
          //   std::cout << ((now >> h & 1)) << " \n"[h == k];
          // }
          for (int h = k; h >= 1; --h) {
            if ((now >> h) & 1) continue;

            if (idx <= i) {
              A[h] = 1;
              OUT(h, idx + 1, h, idx + 1);
              ++idx;
            }
          }

          for (int h = 1; h <= j; ++h) {
            OUT(99, idx + 1, 99, idx + 1);
            ++idx;
            OUT(99, idx + 1, 99, idx + 1);
            ++idx;
          }

          int cur = idx;
          for (int h = 1; h <= k; ++h) {
            OUT(h, idx + 1, h, cur);
            ++idx;
          }

          EXIT();
        }
      }
    }

    for (int j = 0; i * 2 + j <= 63 && flag; ++j) {
      for (int k = i; k <= 31 && i + j + k <= 63 && flag; ++k) {
        int now = N - j * 2 - i * 2;
        if ((now >> (k + 1)) > 0) continue;
        if (__builtin_popcount(now) == k - i) {
          std::cout << i + j + k + 1 << '\n';
          flag = false;
          int idx = 1;
          // printf("(%d, %d, %d)\n", i, j, k);
          // for (int h = 1; h <= k; ++h) {
          //   std::cout << ((now >> h & 1)) << " \n"[h == k];
          // }
          for (int h = k; h >= 1; --h) {
            if ((now >> h) & 1) continue;

            if (idx <= i) {
              A[h] = 1;
              OUT(h, idx + 1, h, idx + 1);
              ++idx;
            }
          }

          int cur = idx;
          for (int h = 1; h <= k; ++h) {
            OUT(h, idx + 1, h, cur);
            ++idx;
          }

          for (int h = 1; h <= j; ++h) {
            OUT(1, idx + 1, 1, idx);
            ++idx;
          }

          EXIT();
        }
      }
    }
  }

  if (flag) {
    std::cout << "I have to say I lose!\n";
  }

  return 0;
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

1
HALT; PUSH 99 GOTO 1

result:

ok x=1

Test #2:

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

input:

5

output:

5
POP 1 GOTO 2; PUSH 1 GOTO 2
POP 1 GOTO 3; PUSH 1 GOTO 3
POP 1 GOTO 4; PUSH 1 GOTO 4
POP 1 GOTO 5; PUSH 1 GOTO 5
HALT; PUSH 99 GOTO 1

result:

ok x=5

Test #3:

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

input:

17

output:

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

result:

ok x=17

Test #4:

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

input:

19260817

output:

34
POP 23 GOTO 2; PUSH 23 GOTO 2
POP 22 GOTO 3; PUSH 22 GOTO 3
POP 20 GOTO 4; PUSH 20 GOTO 4
POP 19 GOTO 5; PUSH 19 GOTO 5
POP 17 GOTO 6; PUSH 17 GOTO 6
POP 12 GOTO 7; PUSH 12 GOTO 7
POP 11 GOTO 8; PUSH 11 GOTO 8
POP 9 GOTO 9; PUSH 9 GOTO 9
POP 7 GOTO 10; PUSH 7 GOTO 10
POP 1 GOTO 11; PUSH 1 GOTO 10...

result:

ok x=19260817

Test #5:

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

input:

1145141919

output:

48
POP 29 GOTO 2; PUSH 29 GOTO 2
POP 28 GOTO 3; PUSH 28 GOTO 3
POP 27 GOTO 4; PUSH 27 GOTO 4
POP 25 GOTO 5; PUSH 25 GOTO 5
POP 24 GOTO 6; PUSH 24 GOTO 6
POP 23 GOTO 7; PUSH 23 GOTO 7
POP 21 GOTO 8; PUSH 21 GOTO 8
POP 20 GOTO 9; PUSH 20 GOTO 9
POP 19 GOTO 10; PUSH 19 GOTO 10
POP 18 GOTO 11; PUSH 18 G...

result:

ok x=1145141919

Test #6:

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

input:

2147483647

output:

31
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...

result:

ok x=2147483647

Test #7:

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

input:

1868665701

output:

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

result:

ok x=1868665701

Test #8:

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

input:

2102547599

output:

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

result:

ok x=2102547599

Test #9:

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

input:

2054530275

output:

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

result:

ok x=2054530275

Test #10:

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

input:

1953685475

output:

58
POP 27 GOTO 2; PUSH 27 GOTO 2
POP 25 GOTO 3; PUSH 25 GOTO 3
POP 24 GOTO 4; PUSH 24 GOTO 4
POP 23 GOTO 5; PUSH 23 GOTO 5
POP 19 GOTO 6; PUSH 19 GOTO 6
POP 18 GOTO 7; PUSH 18 GOTO 7
POP 16 GOTO 8; PUSH 16 GOTO 8
POP 13 GOTO 9; PUSH 13 GOTO 9
POP 6 GOTO 10; PUSH 6 GOTO 10
POP 99 GOTO 11; PUSH 99 GOT...

result:

ok x=1953685475

Test #11:

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

input:

2119017059

output:

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

result:

ok x=2119017059

Test #12:

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

input:

1911337379

output:

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

result:

ok x=1911337379

Test #13:

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

input:

887618459

output:

51
POP 27 GOTO 2; PUSH 27 GOTO 2
POP 25 GOTO 3; PUSH 25 GOTO 3
POP 24 GOTO 4; PUSH 24 GOTO 4
POP 20 GOTO 5; PUSH 20 GOTO 5
POP 19 GOTO 6; PUSH 19 GOTO 6
POP 10 GOTO 7; PUSH 10 GOTO 7
POP 7 GOTO 8; PUSH 7 GOTO 8
POP 99 GOTO 9; PUSH 99 GOTO 9
POP 99 GOTO 10; PUSH 99 GOTO 10
POP 99 GOTO 11; PUSH 99 GOT...

result:

ok x=887618459

Test #14:

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

input:

831117597

output:

48
POP 27 GOTO 2; PUSH 27 GOTO 2
POP 26 GOTO 3; PUSH 26 GOTO 3
POP 25 GOTO 4; PUSH 25 GOTO 4
POP 22 GOTO 5; PUSH 22 GOTO 5
POP 21 GOTO 6; PUSH 21 GOTO 6
POP 20 GOTO 7; PUSH 20 GOTO 7
POP 18 GOTO 8; PUSH 18 GOTO 8
POP 17 GOTO 9; PUSH 17 GOTO 9
POP 13 GOTO 10; PUSH 13 GOTO 10
POP 10 GOTO 11; PUSH 10 G...

result:

ok x=831117597

Test #15:

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

input:

1820253559

output:

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

result:

ok x=1820253559

Test #16:

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

input:

1563399651

output:

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

result:

ok x=1563399651

Test #17:

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

input:

1631350977

output:

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

result:

ok x=1631350977

Test #18:

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

input:

1897574279

output:

43
POP 27 GOTO 2; PUSH 27 GOTO 2
POP 26 GOTO 3; PUSH 26 GOTO 3
POP 25 GOTO 4; PUSH 25 GOTO 4
POP 23 GOTO 5; PUSH 23 GOTO 5
POP 22 GOTO 6; PUSH 22 GOTO 6
POP 21 GOTO 7; PUSH 21 GOTO 7
POP 18 GOTO 8; PUSH 18 GOTO 8
POP 16 GOTO 9; PUSH 16 GOTO 9
POP 14 GOTO 10; PUSH 14 GOTO 10
POP 12 GOTO 11; PUSH 12 G...

result:

ok x=1897574279

Test #19:

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

input:

450973351

output:

58
POP 26 GOTO 2; PUSH 26 GOTO 2
POP 24 GOTO 3; PUSH 24 GOTO 3
POP 20 GOTO 4; PUSH 20 GOTO 4
POP 19 GOTO 5; PUSH 19 GOTO 5
POP 18 GOTO 6; PUSH 18 GOTO 6
POP 17 GOTO 7; PUSH 17 GOTO 7
POP 15 GOTO 8; PUSH 15 GOTO 8
POP 13 GOTO 9; PUSH 13 GOTO 9
POP 12 GOTO 10; PUSH 12 GOTO 10
POP 8 GOTO 11; PUSH 8 GOT...

result:

ok x=450973351

Test #20:

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

input:

1212949423

output:

63
POP 29 GOTO 2; PUSH 29 GOTO 2
POP 28 GOTO 3; PUSH 28 GOTO 3
POP 26 GOTO 4; PUSH 26 GOTO 4
POP 25 GOTO 5; PUSH 25 GOTO 5
POP 24 GOTO 6; PUSH 24 GOTO 6
POP 23 GOTO 7; PUSH 23 GOTO 7
POP 21 GOTO 8; PUSH 21 GOTO 8
POP 20 GOTO 9; PUSH 20 GOTO 9
POP 17 GOTO 10; PUSH 17 GOTO 10
POP 16 GOTO 11; PUSH 16 G...

result:

ok x=1212949423

Test #21:

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

input:

1800664165

output:

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

result:

ok x=1800664165

Test #22:

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

input:

2083340735

output:

63
POP 25 GOTO 2; PUSH 25 GOTO 2
POP 24 GOTO 3; PUSH 24 GOTO 3
POP 23 GOTO 4; PUSH 23 GOTO 4
POP 22 GOTO 5; PUSH 22 GOTO 5
POP 20 GOTO 6; PUSH 20 GOTO 6
POP 17 GOTO 7; PUSH 17 GOTO 7
POP 15 GOTO 8; PUSH 15 GOTO 8
POP 13 GOTO 9; PUSH 13 GOTO 9
POP 12 GOTO 10; PUSH 12 GOTO 10
POP 11 GOTO 11; PUSH 11 G...

result:

ok x=2083340735

Test #23:

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

input:

1989353363

output:

41
POP 27 GOTO 2; PUSH 27 GOTO 2
POP 24 GOTO 3; PUSH 24 GOTO 3
POP 22 GOTO 4; PUSH 22 GOTO 4
POP 21 GOTO 5; PUSH 21 GOTO 5
POP 19 GOTO 6; PUSH 19 GOTO 6
POP 18 GOTO 7; PUSH 18 GOTO 7
POP 15 GOTO 8; PUSH 15 GOTO 8
POP 14 GOTO 9; PUSH 14 GOTO 9
POP 13 GOTO 10; PUSH 13 GOTO 10
POP 7 GOTO 11; PUSH 7 GOT...

result:

ok x=1989353363

Test #24:

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

input:

1686030751

output:

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

result:

ok x=1686030751

Test #25:

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

input:

483234157

output:

63
POP 25 GOTO 2; PUSH 25 GOTO 2
POP 24 GOTO 3; PUSH 24 GOTO 3
POP 21 GOTO 4; PUSH 21 GOTO 4
POP 20 GOTO 5; PUSH 20 GOTO 5
POP 17 GOTO 6; PUSH 17 GOTO 6
POP 14 GOTO 7; PUSH 14 GOTO 7
POP 13 GOTO 8; PUSH 13 GOTO 8
POP 11 GOTO 9; PUSH 11 GOTO 9
POP 10 GOTO 10; PUSH 10 GOTO 10
POP 9 GOTO 11; PUSH 9 GOT...

result:

ok x=483234157

Test #26:

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

input:

1784967647

output:

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

result:

ok x=1784967647

Test #27:

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

input:

1052131125

output:

57
POP 24 GOTO 2; PUSH 24 GOTO 2
POP 22 GOTO 3; PUSH 22 GOTO 3
POP 19 GOTO 4; PUSH 19 GOTO 4
POP 16 GOTO 5; PUSH 16 GOTO 5
POP 15 GOTO 6; PUSH 15 GOTO 6
POP 14 GOTO 7; PUSH 14 GOTO 7
POP 8 GOTO 8; PUSH 8 GOTO 8
POP 1 GOTO 9; PUSH 1 GOTO 8
POP 2 GOTO 10; PUSH 2 GOTO 8
POP 3 GOTO 11; PUSH 3 GOTO 8
POP...

result:

ok x=1052131125

Test #28:

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

input:

673034421

output:

57
POP 28 GOTO 2; PUSH 28 GOTO 2
POP 26 GOTO 3; PUSH 26 GOTO 3
POP 25 GOTO 4; PUSH 25 GOTO 4
POP 24 GOTO 5; PUSH 24 GOTO 5
POP 23 GOTO 6; PUSH 23 GOTO 6
POP 22 GOTO 7; PUSH 22 GOTO 7
POP 21 GOTO 8; PUSH 21 GOTO 8
POP 17 GOTO 9; PUSH 17 GOTO 9
POP 14 GOTO 10; PUSH 14 GOTO 10
POP 11 GOTO 11; PUSH 11 G...

result:

ok x=673034421

Test #29:

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

input:

1136250939

output:

61
POP 29 GOTO 2; PUSH 29 GOTO 2
POP 28 GOTO 3; PUSH 28 GOTO 3
POP 27 GOTO 4; PUSH 27 GOTO 4
POP 26 GOTO 5; PUSH 26 GOTO 5
POP 22 GOTO 6; PUSH 22 GOTO 6
POP 18 GOTO 7; PUSH 18 GOTO 7
POP 17 GOTO 8; PUSH 17 GOTO 8
POP 13 GOTO 9; PUSH 13 GOTO 9
POP 12 GOTO 10; PUSH 12 GOTO 10
POP 1 GOTO 11; PUSH 1 GOT...

result:

ok x=1136250939

Test #30:

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

input:

1434678339

output:

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

result:

ok x=1434678339

Test #31:

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

input:

174274079

output:

50
POP 26 GOTO 2; PUSH 26 GOTO 2
POP 24 GOTO 3; PUSH 24 GOTO 3
POP 23 GOTO 4; PUSH 23 GOTO 4
POP 20 GOTO 5; PUSH 20 GOTO 5
POP 19 GOTO 6; PUSH 19 GOTO 6
POP 18 GOTO 7; PUSH 18 GOTO 7
POP 15 GOTO 8; PUSH 15 GOTO 8
POP 14 GOTO 9; PUSH 14 GOTO 9
POP 11 GOTO 10; PUSH 11 GOTO 10
POP 9 GOTO 11; PUSH 9 GOT...

result:

ok x=174274079

Test #32:

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

input:

1911998229

output:

44
POP 27 GOTO 2; PUSH 27 GOTO 2
POP 26 GOTO 3; PUSH 26 GOTO 3
POP 25 GOTO 4; PUSH 25 GOTO 4
POP 19 GOTO 5; PUSH 19 GOTO 5
POP 16 GOTO 6; PUSH 16 GOTO 6
POP 13 GOTO 7; PUSH 13 GOTO 7
POP 12 GOTO 8; PUSH 12 GOTO 8
POP 11 GOTO 9; PUSH 11 GOTO 9
POP 8 GOTO 10; PUSH 8 GOTO 10
POP 99 GOTO 11; PUSH 99 GOT...

result:

ok x=1911998229

Test #33:

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

input:

441665295

output:

41
POP 26 GOTO 2; PUSH 26 GOTO 2
POP 24 GOTO 3; PUSH 24 GOTO 3
POP 23 GOTO 4; PUSH 23 GOTO 4
POP 21 GOTO 5; PUSH 21 GOTO 5
POP 19 GOTO 6; PUSH 19 GOTO 6
POP 18 GOTO 7; PUSH 18 GOTO 7
POP 15 GOTO 8; PUSH 15 GOTO 8
POP 13 GOTO 9; PUSH 13 GOTO 9
POP 12 GOTO 10; PUSH 12 GOTO 10
POP 11 GOTO 11; PUSH 11 G...

result:

ok x=441665295

Test #34:

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

input:

1325107907

output:

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

result:

ok x=1325107907

Test #35:

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

input:

264691101

output:

51
POP 21 GOTO 2; PUSH 21 GOTO 2
POP 20 GOTO 3; PUSH 20 GOTO 3
POP 19 GOTO 4; PUSH 19 GOTO 4
POP 16 GOTO 5; PUSH 16 GOTO 5
POP 13 GOTO 6; PUSH 13 GOTO 6
POP 9 GOTO 7; PUSH 9 GOTO 7
POP 7 GOTO 8; PUSH 7 GOTO 8
POP 99 GOTO 9; PUSH 99 GOTO 9
POP 99 GOTO 10; PUSH 99 GOTO 10
POP 99 GOTO 11; PUSH 99 GOTO ...

result:

ok x=264691101

Test #36:

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

input:

1655988757

output:

47
POP 28 GOTO 2; PUSH 28 GOTO 2
POP 27 GOTO 3; PUSH 27 GOTO 3
POP 26 GOTO 4; PUSH 26 GOTO 4
POP 24 GOTO 5; PUSH 24 GOTO 5
POP 22 GOTO 6; PUSH 22 GOTO 6
POP 19 GOTO 7; PUSH 19 GOTO 7
POP 17 GOTO 8; PUSH 17 GOTO 8
POP 16 GOTO 9; PUSH 16 GOTO 9
POP 15 GOTO 10; PUSH 15 GOTO 10
POP 12 GOTO 11; PUSH 12 G...

result:

ok x=1655988757

Test #37:

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

input:

1912613857

output:

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

result:

ok x=1912613857

Test #38:

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

input:

471758205

output:

48
POP 25 GOTO 2; PUSH 25 GOTO 2
POP 24 GOTO 3; PUSH 24 GOTO 3
POP 23 GOTO 4; PUSH 23 GOTO 4
POP 22 GOTO 5; PUSH 22 GOTO 5
POP 21 GOTO 6; PUSH 21 GOTO 6
POP 16 GOTO 7; PUSH 16 GOTO 7
POP 15 GOTO 8; PUSH 15 GOTO 8
POP 11 GOTO 9; PUSH 11 GOTO 9
POP 9 GOTO 10; PUSH 9 GOTO 10
POP 7 GOTO 11; PUSH 7 GOTO ...

result:

ok x=471758205

Test #39:

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

input:

1295394655

output:

50
POP 29 GOTO 2; PUSH 29 GOTO 2
POP 28 GOTO 3; PUSH 28 GOTO 3
POP 25 GOTO 4; PUSH 25 GOTO 4
POP 23 GOTO 5; PUSH 23 GOTO 5
POP 22 GOTO 6; PUSH 22 GOTO 6
POP 19 GOTO 7; PUSH 19 GOTO 7
POP 16 GOTO 8; PUSH 16 GOTO 8
POP 15 GOTO 9; PUSH 15 GOTO 9
POP 14 GOTO 10; PUSH 14 GOTO 10
POP 12 GOTO 11; PUSH 12 G...

result:

ok x=1295394655

Test #40:

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

input:

1734993785

output:

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

result:

ok x=1734993785

Test #41:

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

input:

986893495

output:

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

result:

ok x=986893495

Test #42:

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

input:

105826293

output:

40
POP 24 GOTO 2; PUSH 24 GOTO 2
POP 23 GOTO 3; PUSH 23 GOTO 3
POP 21 GOTO 4; PUSH 21 GOTO 4
POP 20 GOTO 5; PUSH 20 GOTO 5
POP 16 GOTO 6; PUSH 16 GOTO 6
POP 13 GOTO 7; PUSH 13 GOTO 7
POP 12 GOTO 8; PUSH 12 GOTO 8
POP 11 GOTO 9; PUSH 11 GOTO 9
POP 5 GOTO 10; PUSH 5 GOTO 10
POP 99 GOTO 11; PUSH 99 GOT...

result:

ok x=105826293

Test #43:

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

input:

3

output:

3
POP 1 GOTO 2; PUSH 1 GOTO 2
POP 1 GOTO 3; PUSH 1 GOTO 3
HALT; PUSH 99 GOTO 1

result:

ok x=3

Test #44:

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

input:

7

output:

7
POP 1 GOTO 2; PUSH 1 GOTO 2
POP 1 GOTO 3; PUSH 1 GOTO 3
POP 1 GOTO 4; PUSH 1 GOTO 4
POP 1 GOTO 5; PUSH 1 GOTO 5
POP 1 GOTO 6; PUSH 1 GOTO 6
POP 1 GOTO 7; PUSH 1 GOTO 7
HALT; PUSH 99 GOTO 1

result:

ok x=7

Test #45:

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

input:

9

output:

9
POP 1 GOTO 2; PUSH 1 GOTO 2
POP 1 GOTO 3; PUSH 1 GOTO 3
POP 1 GOTO 4; PUSH 1 GOTO 4
POP 1 GOTO 5; PUSH 1 GOTO 5
POP 1 GOTO 6; PUSH 1 GOTO 6
POP 1 GOTO 7; PUSH 1 GOTO 7
POP 1 GOTO 8; PUSH 1 GOTO 8
POP 1 GOTO 9; PUSH 1 GOTO 9
HALT; PUSH 99 GOTO 1

result:

ok x=9

Test #46:

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

input:

11

output:

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

result:

ok x=11

Test #47:

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

input:

13

output:

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

result:

ok x=13

Test #48:

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

input:

15

output:

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

result:

ok x=15

Test #49:

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

input:

2147483643

output:

34
POP 3 GOTO 2; PUSH 3 GOTO 2
POP 99 GOTO 3; PUSH 99 GOTO 3
POP 99 GOTO 4; PUSH 99 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 GOTO ...

result:

ok x=2147483643

Test #50:

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

input:

2147483645

output:

32
POP 2 GOTO 2; PUSH 2 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 12;...

result:

ok x=2147483645

Test #51:

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

input:

1073741827

output:

34
POP 99 GOTO 2; PUSH 99 GOTO 2
POP 99 GOTO 3; PUSH 99 GOTO 3
POP 99 GOTO 4; PUSH 99 GOTO 4
POP 99 GOTO 5; PUSH 99 GOTO 5
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
POP 7 G...

result:

ok x=1073741827

Test #52:

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

input:

1073741825

output:

32
POP 99 GOTO 2; PUSH 99 GOTO 2
POP 99 GOTO 3; PUSH 99 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: 3620kb

input:

1073741823

output:

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 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...

result:

ok x=1073741823

Test #54:

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

input:

536870967

output:

57
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...

result:

ok x=536870967

Test #55:

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

input:

536870965

output:

56
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...

result:

ok x=536870965

Test #56:

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

input:

1073741881

output:

59
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...

result:

ok x=1073741881

Test #57:

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

input:

1073741879

output:

58
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...

result:

ok x=1073741879

Test #58:

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

input:

1073741877

output:

57
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...

result:

ok x=1073741877

Extra Test:

score: 0
Extra Test Passed