QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#807093#8873. KeysSGColinAC ✓165ms30984kbC++204.5kb2024-12-09 18:46:232024-12-09 18:46:24

Judging History

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

  • [2024-12-09 18:46:24]
  • 评测
  • 测评结果:AC
  • 用时:165ms
  • 内存:30984kb
  • [2024-12-09 18:46:23]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;

inline int rd() {
    int x = 0;
    bool f = 0;
    char c = getchar();
    for (; !isdigit(c); c = getchar()) f |= (c == '-');
    for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
    return f ? -x : x;  
}

#define fr first
#define sc second
#define eb emplace_back
#define all(s) (s).begin(), (s).end()
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)

#define N 100007

vector<int> e[N];

vector<int> s, ss;

bool vis[N], cir[N];

bool dfs(int u) {
    vis[u] = true; s.eb(u);
    for (auto v : e[u]) {
        if (v == 1 && s.size() > 2) return true;
        if (!vis[v]) if (dfs(v)) return true;
    }
    s.pop_back(); return false;
}

int efs(int u) {
    vis[u] = true; ss.eb(u);
    for (auto v : e[u]) {
        if (cir[v]) return v;
        if (!vis[v]) {
            int ret = efs(v);
            if (ret) return ret;
        } 
    }
    ss.pop_back();
    return 0;
}

int main(){
    int n = rd(), m = rd();
    map<pii, int> id;
    vector<int> keya, keyb;
    rep(i, 0, m - 1) {
        int u = rd(), v = rd();
        e[u].eb(v); e[v].eb(u); 
        id[{u, v}] = id[{v, u}] = i;
    }
    if (!dfs(1)) {puts("No solution"); return 0;}
    memset(vis, 0, sizeof(vis));
    for (auto v : s) cir[v] = true;
    if (cir[0]) {
        int pos = 0;
        int l = s.size();
        rep(i, 1, l - 1) if (s[i] == 0) pos = i;
        rep(i, 1, pos) keya.eb(id[{s[i], s[i - 1]}]);
        rep(i, pos + 1, l - 1) keyb.eb(id[{s[i], s[i - 1]}]);
        keyb.eb(id[{1, s.back()}]);

        sort(all(keya)); sort(all(keyb));
        for (auto x : keya) printf("%d ", x); puts("");
        for (auto x : keyb) printf("%d ", x); puts("");

        per(i, pos - 1, 0) printf("MOVE %d\n", s[i]); 
        puts("DONE");
        per(i, l - 1, pos) printf("MOVE %d\n", s[i]);
        puts("DONE"); return 0;
    }
    int sp = efs(0);
    memset(vis, 0, sizeof(vis));
    if (sp == 1) {
        /* 
        A : 0 -> (ss) -> 1 -> s.back() -> 1
        B : 1 -> (s) -> s.back() -> (s) -> 1 -> (ss) -> 0   
        */
        auto adda = [&](int u, int v) {
            int nw = id[{u, v}];
            keya.eb(nw); vis[nw] = true;
        };
        int l1 = ss.size();
        rep(i, 1, l1 - 1) adda(ss[i], ss[i - 1]);
        adda(ss.back(), 1); adda(1, s.back());
        int notdrop = id[{1, s.back()}];
        rep(i, 0, m - 1) if (!vis[i]) keyb.eb(i);
        
        sort(all(keya)); sort(all(keyb));
        for (auto x : keya) printf("%d ", x); puts("");
        for (auto x : keyb) printf("%d ", x); puts("");
        
        rep(i, 1, l1 - 1) printf("MOVE %d\n", ss[i]);
        printf("MOVE 1\n");
        printf("MOVE %d\n", s.back());
        printf("DROP"); for (auto x : keya) if (x != notdrop) printf(" %d", x); puts("");
        printf("MOVE 1\n");
        puts("DONE");
        
        int l2 = s.size();
        rep(i, 1, l2 - 1) printf("MOVE %d\n", s[i]);
        printf("GRAB\n");
        per(i, l2 - 2, 0) printf("MOVE %d\n", s[i]);
        per(i, l1 - 1, 0) printf("MOVE %d\n", ss[i]);
        puts("DONE");
    } else {
        /* 
        A : 0 -> (ss) -> sp -> ... -> 1
        B : 1 -> (reverse_s) -> sp -> (ss) -> 0 
        */
        vector<int> dropa;
        auto adda = [&](int u, int v, bool drop) {
            int nw = id[{u, v}];
            keya.eb(nw); vis[nw] = true;
            if (drop) dropa.eb(nw);
        };
        int l1 = ss.size(), l2 = s.size();
        rep(i, 1, l1 - 1) adda(ss[i], ss[i - 1], true);
        adda(ss.back(), sp, true); 
        int pos = 0;
        rep(i, 1, l2 - 1) {
            adda(s[i - 1], s[i], false);
            if (s[i] == sp) {pos = i; break;}
        }
        
        rep(i, 0, m - 1) if (!vis[i]) keyb.eb(i);
        
        sort(all(keya)); sort(all(keyb));
        for (auto x : keya) printf("%d ", x); puts("");
        for (auto x : keyb) printf("%d ", x); puts("");
        
        rep(i, 1, l1 - 1) printf("MOVE %d\n", ss[i]);
        printf("MOVE %d\n", sp);
        printf("DROP"); for (auto x : dropa) printf(" %d", x); puts("");
        per(i, pos - 1, 0) printf("MOVE %d\n", s[i]);
        puts("DONE");
        
        per(i, l2 - 1, pos) printf("MOVE %d\n", s[i]);
        printf("GRAB\n");
        per(i, l1 - 1, 0) printf("MOVE %d\n", ss[i]);
        puts("DONE");
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 87ms
memory: 22892kb

input:

100000 100000
23318 40203
97982 61157
60398 86095
58324 78522
28830 15221
65885 58978
88701 79733
60488 97069
18196 67504
53341 92581
41374 31350
38622 72661
83410 44870
47326 8073
98347 37592
6260 85798
28852 71221
50180 3244
64489 93594
78096 7442
17696 59981
22755 17291
17870 81187
35524 29465
22...

output:

33 35 36 101 140 145 187 193 210 248 299 308 331 338 348 405 428 433 437 443 462 479 498 505 537 538 579 589 594 608 613 632 646 652 697 710 738 760 785 792 804 827 836 843 882 908 913 929 936 952 1038 1047 1052 1111 1129 1132 1194 1213 1249 1284 1298 1315 1320 1321 1325 1369 1390 1397 1401 1408 141...

result:

ok good job, 10323 instruction(s)

Test #2:

score: 0
Accepted
time: 105ms
memory: 22876kb

input:

50000 100000
8934 28735
44226 12238
17786 15795
13217 27239
168 16295
550 15556
16441 41473
36979 35662
5444 33264
26116 48547
32991 35682
15764 44379
12428 45701
47650 4749
32595 21554
40428 36364
41567 14621
3849 33959
43468 46279
48666 11408
3325 20704
25461 14749
47526 49245
33711 19577
13605 43...

output:

0 4 6 10 12 17 19 24 26 31 34 36 37 38 39 40 41 43 44 45 48 49 50 52 53 54 55 61 62 67 68 71 73 76 77 79 80 81 82 87 88 91 92 93 94 95 98 101 102 104 105 106 108 109 112 113 114 117 118 120 121 122 125 126 128 129 131 132 133 134 136 138 139 144 145 146 147 150 151 152 154 158 159 163 165 167 170 17...

result:

ok good job, 27930 instruction(s)

Test #3:

score: 0
Accepted
time: 148ms
memory: 30360kb

input:

100000 100000
25942 82376
88672 78819
18680 79879
67017 29864
43795 42855
7573 47211
33582 81171
12735 62529
65617 20494
99853 41155
78124 82179
38806 81035
57275 6802
50707 33443
33953 4519
91953 55970
59249 62761
48557 65743
71493 80407
90878 54712
66231 20900
21622 66923
94531 11951
54879 92804
5...

output:

0 1 2 3 4 6 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 33 36 37 38 39 41 42 43 44 45 46 47 48 49 50 52 53 54 55 56 57 58 59 60 61 62 63 64 65 68 69 70 71 72 73 75 76 77 78 79 80 81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 98 100 101 102 103 104 105 106 107 108 109 110 111 ...

result:

ok good job, 150002 instruction(s)

Test #4:

score: 0
Accepted
time: 151ms
memory: 30984kb

input:

100000 100000
21864 56883
52947 45601
74935 69509
94478 26883
4033 18901
13136 47602
57282 96987
1689 58102
77156 35075
95629 47175
5915 19979
71495 48121
91235 85213
69319 43824
88116 6683
42155 72450
15251 23971
28359 85564
88246 94015
27333 69498
26663 81965
31007 91728
69773 34777
42347 72107
89...

output:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...

result:

ok good job, 199997 instruction(s)

Test #5:

score: 0
Accepted
time: 95ms
memory: 30360kb

input:

100000 100000
1579 36634
55021 87121
61247 53504
26526 11501
63096 95355
26157 54097
22547 72337
53502 93653
10336 58493
18020 41208
7269 2318
12039 94961
70947 16210
46822 1274
33785 1813
10779 40529
77491 71330
9272 95406
36277 69039
33374 7524
83196 20806
96206 89860
86304 59579
95435 52196
80968...

output:

30 32 52 56 74 95 120 141 160 167 180 186 203 207 244 250 258 270 307 309 321 344 359 400 416 447 453 474 482 525 526 545 586 612 627 642 653 664 688 692 701 704 732 792 796 820 839 849 892 941 945 949 971 987 1000 1002 1009 1017 1018 1033 1037 1068 1084 1103 1106 1125 1134 1166 1188 1204 1215 1225 ...

result:

ok good job, 100012 instruction(s)

Test #6:

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

input:

6 6
0 2
2 3
3 1
3 4
4 5
1 5

output:

0 1 2 
3 4 5 
MOVE 2
MOVE 3
DROP 0 1
MOVE 1
DONE
MOVE 5
MOVE 4
MOVE 3
GRAB
MOVE 2
MOVE 0
DONE

result:

ok good job, 12 instruction(s)

Test #7:

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

input:

6 6
0 2
2 3
3 1
1 4
4 5
1 5

output:

0 1 2 5 
3 4 
MOVE 2
MOVE 3
MOVE 1
MOVE 5
DROP 0 1 2
MOVE 1
DONE
MOVE 4
MOVE 5
GRAB
MOVE 4
MOVE 1
MOVE 3
MOVE 2
MOVE 0
DONE

result:

ok good job, 16 instruction(s)

Test #8:

score: 0
Accepted
time: 98ms
memory: 23104kb

input:

100000 100000
96367 66531
65295 71645
67296 93287
73673 40112
15826 61132
89088 31681
50727 38751
7202 84213
59585 77793
48336 3706
17614 32412
6411 36116
80130 50904
81086 20756
69676 50485
46054 28686
16875 11587
91878 86414
12128 41724
69733 78314
87279 80436
57326 95934
26572 60051
2769 85752
15...

output:

24 40 57 59 74 82 84 105 134 162 172 196 212 217 239 252 262 268 277 285 296 298 315 339 355 360 382 385 404 430 434 481 491 527 534 541 544 555 597 598 604 607 628 631 642 646 653 655 662 676 707 716 718 732 741 760 771 772 858 866 889 924 936 976 992 1009 1019 1070 1075 1091 1104 1163 1166 1187 12...

result:

ok good job, 12520 instruction(s)

Test #9:

score: 0
Accepted
time: 127ms
memory: 30300kb

input:

100000 100000
10014 30317
91383 38616
44018 69738
67567 14439
94645 77295
40683 36981
93253 77191
86464 17901
9306 64146
77493 92538
73062 26034
41936 5045
43534 12176
81788 12494
51574 64920
79813 936
81999 67801
60001 96187
61237 45643
81878 58084
41735 16898
11958 65746
51947 96855
72637 87194
71...

output:

1 2 3 5 7 8 10 12 13 14 18 20 21 22 23 25 27 28 30 31 32 33 42 43 45 46 48 49 50 51 52 53 57 59 61 64 65 66 67 69 70 71 75 77 78 79 83 85 86 90 95 97 98 100 101 102 103 107 110 111 112 113 116 117 122 123 130 131 134 137 139 141 145 146 147 148 149 151 152 156 158 162 164 165 170 171 172 177 178 183...

result:

ok good job, 100002 instruction(s)

Test #10:

score: 0
Accepted
time: 107ms
memory: 22372kb

input:

50000 100000
24539 6119
20751 35924
41982 48393
19912 32252
10409 28344
16342 33219
1887 8519
21267 26408
8705 10970
2657 17850
39993 2645
512 27373
15091 23151
12486 45982
48476 4490
25329 15083
7662 42457
3308 3722
4529 42388
24030 42893
24228 9162
38184 41052
9096 16089
4324 11034
26951 33431
270...

output:

0 1 2 3 4 5 9 10 13 16 17 18 21 23 24 27 29 32 34 36 38 39 41 44 45 48 49 50 51 52 54 55 56 57 58 61 62 64 65 68 69 71 72 74 76 82 85 86 89 90 91 93 94 97 98 99 100 102 108 109 111 112 113 115 117 119 120 122 123 125 126 128 131 132 134 135 136 138 139 140 145 147 148 149 150 151 152 155 156 157 159...

result:

ok good job, 31022 instruction(s)

Test #11:

score: 0
Accepted
time: 112ms
memory: 23336kb

input:

100000 100000
43296 75273
85441 62496
89990 49908
73020 129
55990 71803
84461 36667
88524 92277
57523 90585
61215 94569
67755 68868
12382 91067
84640 1421
10362 56957
54388 15787
98562 57954
57458 7730
90559 76725
10535 67001
37969 90538
63009 83781
33040 174
28995 25391
42150 72884
48377 68701
7704...

output:

7 9 18 39 47 62 63 71 81 87 104 124 154 161 169 196 206 229 231 253 258 260 261 279 286 287 288 289 318 323 325 330 334 337 372 387 399 403 408 415 432 444 476 484 491 505 511 515 519 555 563 567 581 585 603 605 610 617 642 646 654 668 670 671 673 679 691 698 710 723 754 759 765 780 791 797 800 828 ...

result:

ok good job, 42180 instruction(s)

Test #12:

score: 0
Accepted
time: 105ms
memory: 21508kb

input:

50000 100000
7568 36646
1279 47292
45650 35409
46841 16671
47440 40391
27528 17631
10548 26844
23545 14620
14511 23071
13025 37478
1923 48560
6122 30106
28548 36103
9215 36285
37710 44617
3674 49875
14022 16799
44476 30381
33114 30895
41787 37779
19820 47557
7937 4087
2576 2981
19278 36043
6340 3419...

output:

12 15 18 21 22 35 43 49 55 57 91 95 105 113 129 140 143 152 167 168 174 180 189 191 196 198 199 201 215 216 218 221 228 230 238 265 276 284 307 308 315 321 327 331 346 353 361 363 375 386 418 419 421 433 448 450 452 461 478 482 498 520 521 527 529 532 545 558 573 579 582 589 590 593 602 608 623 643 ...

result:

ok good job, 35644 instruction(s)

Test #13:

score: 0
Accepted
time: 131ms
memory: 26344kb

input:

100000 100000
86322 4929
83579 61717
81028 93863
63624 56270
52901 75158
54370 34740
58954 62029
97574 74084
32946 39229
4694 95648
22560 76996
79300 91701
99942 32414
68575 29471
58051 52619
69874 19847
12767 11792
74151 54115
25 82313
94428 47942
58029 93563
89788 29043
70700 79708
20195 35110
351...

output:

1 3 7 8 9 13 15 16 17 19 21 22 24 25 28 29 30 31 36 37 39 41 43 44 47 48 49 50 51 54 55 59 64 70 71 73 74 76 78 79 80 82 83 85 86 90 97 101 104 105 106 107 110 112 114 115 118 120 123 125 126 127 134 138 143 144 148 150 152 153 156 157 158 159 162 163 165 166 168 170 171 175 176 177 179 180 183 185 ...

result:

ok good job, 200002 instruction(s)

Test #14:

score: 0
Accepted
time: 165ms
memory: 30496kb

input:

100000 100000
25428 37272
69619 7282
64587 18392
24381 57301
54320 20485
17236 59526
30823 38757
55343 17370
37512 58190
86473 19428
30287 35049
10303 29575
44114 62530
62330 49078
82698 70083
71507 48140
11831 88428
3173 16351
15822 7562
77244 22730
38140 96265
78005 44175
20548 8320
39079 10796
83...

output:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...

result:

ok good job, 200002 instruction(s)

Test #15:

score: 0
Accepted
time: 99ms
memory: 30360kb

input:

100000 100000
10889 73894
28668 13203
98139 70161
1044 5038
47917 31269
58227 54508
26143 15200
46703 96821
51030 9669
98391 36506
27411 30543
5988 84867
58309 98558
67523 58507
71133 50142
56482 50601
97335 29657
81621 28543
38313 68151
46162 31389
30858 76334
48708 20205
6111 47722
52359 39481
645...

output:

633 639 2251 4444 5006 5292 5592 6842 8127 8320 9874 10626 11921 12241 12631 12822 13365 15098 15102 15490 16368 16492 17821 19810 19865 20488 20765 20815 20959 21225 21726 22473 28287 28414 31335 31507 31891 32502 34089 34107 35996 36007 36446 36620 37816 41577 41819 45563 47081 47177 47780 53432 5...

result:

ok good job, 200002 instruction(s)

Test #16:

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

input:

6 6
0 2
2 3
3 1
1 5
2 4
3 4

output:

No solution

result:

ok no solution

Test #17:

score: 0
Accepted
time: 92ms
memory: 19696kb

input:

50000 100000
26144 7421
22412 44494
29727 15433
49590 24000
44200 24509
37641 22526
23764 19318
8924 18734
26213 42867
11997 29991
21761 5388
45970 13904
20943 43174
16307 22885
26999 22799
41360 41456
25911 8522
35863 33750
46384 21531
21281 8834
15465 49013
1753 4004
27082 15982
19334 27615
33954 ...

output:

No solution

result:

ok no solution

Test #18:

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

input:

90000 100000
64261 74711
3299 89019
86241 18036
20799 48883
20053 72155
61408 44131
2243 74042
76172 5660
71753 15465
14846 30249
87138 73873
60899 62854
68202 28401
25560 33368
34094 75934
26244 45318
56438 50859
17557 74836
27193 84062
80223 8263
19255 46960
89294 7521
63921 852
83066 1187
81691 4...

output:

No solution

result:

ok no solution

Test #19:

score: 0
Accepted
time: 104ms
memory: 21452kb

input:

80000 99999
39119 4959
79093 57828
22618 54434
19532 65500
70312 13855
1851 13852
59001 71101
47059 65915
66225 24764
72168 58158
61158 31691
4393 33815
65233 34904
54222 39966
71200 74623
7657 77656
74506 32078
46352 7090
56533 50975
48596 6918
38663 36592
3485 70779
68511 51111
50834 25116
16186 2...

output:

No solution

result:

ok no solution

Test #20:

score: 0
Accepted
time: 96ms
memory: 22896kb

input:

100000 99999
49345 76110
2798 86271
57038 171
77955 15337
19296 48682
98349 5586
31051 49709
29280 27554
35162 52474
25359 81583
69885 46484
25451 32306
33480 72015
1367 90132
91794 22392
54238 86888
54749 9873
20459 26835
47752 90888
77221 48293
88587 256
24236 58681
4801 8895
29926 32488
47889 255...

output:

No solution

result:

ok no solution

Test #21:

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

input:

6 6
0 1
1 2
2 3
3 4
4 5
0 5

output:

0 
1 2 3 4 5 
MOVE 1
DONE
MOVE 2
MOVE 3
MOVE 4
MOVE 5
MOVE 0
DONE

result:

ok good job, 8 instruction(s)

Test #22:

score: 0
Accepted
time: 85ms
memory: 21816kb

input:

100000 100000
59828 64708
47750 16573
57769 81309
99088 79554
69563 87704
77880 38685
82767 50190
69199 35860
57542 75312
81796 99850
33543 99431
56817 78988
68644 9817
40018 32389
78233 43850
51782 70539
97258 21202
36292 91807
94611 42699
4237 7706
97296 17899
82467 22237
545 76141
75385 23587
129...

output:

No solution

result:

ok no solution

Test #23:

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

input:

50000 100000
14198 3429
21041 27019
19584 19711
39287 34721
15399 34050
11683 31085
13955 46499
25087 11616
19485 946
36235 37467
33136 7703
2361 6714
5763 38639
47041 27135
48735 7749
17747 36327
30830 1522
45507 8282
46226 22455
9592 19737
10008 20723
7119 20392
6430 43960
43822 39822
21097 11434
...

output:

6 7 8 10 11 13 14 15 17 18 24 25 26 28 30 31 32 33 34 37 40 41 49 51 53 56 57 59 62 64 67 69 70 71 74 76 79 82 83 86 88 89 93 96 100 101 102 104 105 110 112 113 114 115 117 124 126 127 131 133 134 135 136 138 142 147 149 150 151 157 162 164 165 168 172 173 175 176 177 180 185 186 187 189 192 196 198...

result:

ok good job, 16283 instruction(s)

Test #24:

score: 0
Accepted
time: 92ms
memory: 22812kb

input:

90000 100000
70015 24995
73200 87248
12741 75391
34774 22943
21965 53886
1683 18908
54010 88101
39661 54904
11072 62774
48600 64239
20437 85037
54989 8249
14077 74956
44570 32008
27854 72613
89714 70086
21262 1153
2696 9930
67044 74871
36017 2386
10562 85960
32615 76055
1792 74732
36996 14729
15301 ...

output:

No solution

result:

ok no solution

Test #25:

score: 0
Accepted
time: 88ms
memory: 21648kb

input:

40000 100000
2078 4393
29204 30505
29433 14568
15183 32906
20225 19309
21922 9700
31026 31286
7627 7349
33842 1908
17471 16058
13786 36351
33519 10984
14645 23624
30419 11149
15925 25328
5549 24013
18809 27531
32587 38623
11672 7833
19162 25199
32748 31258
11833 31833
26558 11203
24694 8796
29328 19...

output:

4 10 13 14 15 16 17 21 25 30 33 36 38 41 45 46 47 49 52 56 57 58 59 69 81 92 94 95 97 100 107 108 120 122 123 132 139 146 148 150 152 154 155 156 157 159 163 172 178 180 181 183 190 191 196 197 199 200 204 212 214 215 217 219 223 231 236 237 240 245 247 249 253 254 255 268 269 273 278 285 301 303 30...

result:

ok good job, 26895 instruction(s)

Test #26:

score: 0
Accepted
time: 113ms
memory: 22608kb

input:

60000 100000
41782 59837
56864 23608
29860 43226
20509 19621
13947 2214
58705 33
9631 17559
52626 17291
4051 39368
45882 40381
20032 16705
49072 47635
58180 35649
4143 36217
10237 50827
40642 15676
33763 53910
31325 39360
43691 31911
56426 47740
28181 36633
16943 11090
34059 53313
43159 22495
41289 ...

output:

12 23 30 32 44 68 73 81 90 97 106 107 108 114 115 125 132 141 142 154 180 186 188 209 216 227 230 243 244 247 249 253 262 283 293 298 299 315 320 331 346 347 351 355 381 386 408 409 412 416 450 464 476 489 510 561 567 580 581 584 585 611 612 613 624 627 630 631 632 641 664 670 685 686 693 698 707 72...

result:

ok good job, 30479 instruction(s)