QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#859101#5309. Guess Cycle Lengthlichenyu_acAC ✓17ms3968kbC++14601b2025-01-17 15:06:252025-01-17 15:06:25

Judging History

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

  • [2025-01-17 15:06:25]
  • 评测
  • 测评结果:AC
  • 用时:17ms
  • 内存:3968kb
  • [2025-01-17 15:06:25]
  • 提交

answer

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N = 1e4, B = 4000, V = 1e9;

mt19937 rd(time(0));

int n, idx;
map<int, ll> mp;

int ask(int x) {
	cout << "walk " << x << endl;
	int ret; cin >> ret;
	return ret;
}

void solve(int x) {
	int val = ask(x); idx += x;
	if (mp[val]) {
		cout << "guess " << idx - mp[val] << endl;
		exit(0);
	}
	mp[val] = idx;
}

int main() {
	for (int i = 0; i < N - B * 2; i++) n = max(n, ask(rd() % V + 1));
	for (int i = 0; i < B; i++) solve(1);
	solve(n);
	for (int i = 0; i < B; i++) solve(B);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3584kb

input:

5
8
1
9
4
4
5
1
1
4
10
6
8
7
10
1
6
5
3
10
4
4
4
9
9
6
9
1
2
2
1
5
2
10
3
8
8
8
6
1
4
5
3
1
10
7
3
4
3
9
10
7
10
3
7
6
8
6
6
9
7
10
9
2
2
2
6
3
10
7
2
9
2
10
6
4
4
5
2
1
2
8
4
9
3
2
2
4
1
4
4
3
2
10
2
4
6
10
6
1
5
7
8
6
2
8
1
9
6
9
7
3
1
5
1
5
4
8
7
9
8
3
9
7
6
1
6
7
5
9
6
4
9
6
4
2
10
7
9
1
2
5
5
2...

output:

walk 400879966
walk 228153399
walk 899092969
walk 407938084
walk 844140255
walk 674688830
walk 348057793
walk 22644748
walk 294181340
walk 580739199
walk 551252478
walk 790602128
walk 739777836
walk 961468247
walk 393725519
walk 251886593
walk 424551825
walk 771156987
walk 713872144
walk 87072111
wa...

result:

ok n=10

Test #2:

score: 0
Accepted
time: 3ms
memory: 3712kb

input:

10
7
18
19
15
5
20
16
16
5
6
3
7
4
13
16
3
20
17
13
15
5
15
19
12
8
19
18
1
11
18
10
1
13
17
7
9
7
3
18
5
20
17
18
6
4
17
15
17
19
13
14
6
17
4
3
7
8
3
19
4
13
12
11
11
1
3
2
13
14
1
12
11
6
8
5
5
10
11
18
11
9
15
12
2
1
1
5
16
15
15
17
11
6
1
5
8
13
3
16
20
14
9
3
1
9
16
19
8
12
4
17
16
10
16
20
5
...

output:

walk 400879966
walk 228153399
walk 899092969
walk 407938084
walk 844140255
walk 674688830
walk 348057793
walk 22644748
walk 294181340
walk 580739199
walk 551252478
walk 790602128
walk 739777836
walk 961468247
walk 393725519
walk 251886593
walk 424551825
walk 771156987
walk 713872144
walk 87072111
wa...

result:

ok n=20

Test #3:

score: 0
Accepted
time: 6ms
memory: 3968kb

input:

9967
3366
6335
4419
4674
3504
1297
6045
7385
6584
9062
1190
9026
7273
2792
9385
1210
8197
341
2452
4334
4124
3614
2619
8309
1100
1419
6955
1908
7618
4955
6567
8488
8112
41
1406
6156
2966
2810
635
844
1057
9701
6555
6542
5693
4221
8994
7621
2679
6892
43
8462
1201
3193
6750
9826
240
5790
6319
8433
623...

output:

walk 400879966
walk 228153399
walk 899092969
walk 407938084
walk 844140255
walk 674688830
walk 348057793
walk 22644748
walk 294181340
walk 580739199
walk 551252478
walk 790602128
walk 739777836
walk 961468247
walk 393725519
walk 251886593
walk 424551825
walk 771156987
walk 713872144
walk 87072111
wa...

result:

ok n=10000

Test #4:

score: 0
Accepted
time: 5ms
memory: 3712kb

input:

400879967
629033366
528126335
936064419
780204674
454893504
802951297
825596045
119777385
700516584
251769062
42371190
782149026
743617273
137342792
389229385
813781210
584938197
298810341
385882452
357194334
869144124
46333614
622902619
994018309
694961100
389071419
89966955
5771908
210037618
84348...

output:

walk 400879966
walk 228153399
walk 899092969
walk 407938084
walk 844140255
walk 674688830
walk 348057793
walk 22644748
walk 294181340
walk 580739199
walk 551252478
walk 790602128
walk 739777836
walk 961468247
walk 393725519
walk 251886593
walk 424551825
walk 771156987
walk 713872144
walk 87072111
wa...

result:

ok n=1000000000

Test #5:

score: 0
Accepted
time: 6ms
memory: 3712kb

input:

761787859
325525008
329500454
669446095
946270706
636831703
441903359
471962545
979682559
816064328
32311838
631153273
446745895
504411616
920728870
100537606
790584196
408719792
816460938
618447823
584195104
570166944
631664894
351067608
118571504
269073865
100149188
758252442
68675092
219057459
52...

output:

walk 759868048
walk 563737149
walk 3975446
walk 339945641
walk 276824611
walk 690560997
walk 805071656
walk 30059186
walk 507720014
walk 836381769
walk 216247510
walk 598841435
walk 815592622
walk 57665721
walk 416317254
walk 179808736
walk 690046590
walk 618135596
walk 407741146
walk 801986885
walk...

result:

ok n=1000000000

Test #6:

score: 0
Accepted
time: 10ms
memory: 3712kb

input:

637140497
266988870
566584812
572420269
673523416
668288885
961083997
679481919
466402397
192088510
547167780
471096775
819084869
475534486
275646444
520064716
334741146
237233638
432258480
707582125
650587862
863283542
35570692
28229070
658010662
111825559
715328730
433562688
237421738
493059697
20...

output:

walk 759868048
walk 563737149
walk 3975446
walk 339945641
walk 276824611
walk 690560997
walk 805071656
walk 30059186
walk 507720014
walk 836381769
walk 216247510
walk 598841435
walk 815592622
walk 57665721
walk 416317254
walk 179808736
walk 690046590
walk 618135596
walk 407741146
walk 801986885
walk...

result:

ok n=1000000000

Test #7:

score: 0
Accepted
time: 3ms
memory: 3712kb

input:

759868049
100248349
95830551
667526285
944350896
634911893
218747886
221540668
977762749
814144518
387970831
629233463
213071894
188945229
918809060
319877111
788664386
250572605
814541128
616528013
582275294
568247134
629745084
35646309
272875261
421284660
321557809
756332632
357229345
440499138
16...

output:

walk 759868048
walk 563737149
walk 3975446
walk 339945641
walk 276824611
walk 690560997
walk 805071656
walk 30059186
walk 507720014
walk 836381769
walk 216247510
walk 598841435
walk 815592622
walk 57665721
walk 416317254
walk 179808736
walk 690046590
walk 618135596
walk 407741146
walk 801986885
walk...

result:

ok n=1000000000

Test #8:

score: 0
Accepted
time: 12ms
memory: 3840kb

input:

635987462
941196285
243090744
191553473
924009100
59264970
670922301
504275483
141533765
155796561
624304327
365445143
210290836
135374091
468143186
875856805
182377286
484614604
159402736
418237871
684902303
101576693
757900521
113063778
98616195
307706833
624293786
966898116
68192259
643732086
211...

output:

walk 759868048
walk 563737149
walk 3975446
walk 339945641
walk 276824611
walk 690560997
walk 805071656
walk 30059186
walk 507720014
walk 836381769
walk 216247510
walk 598841435
walk 815592622
walk 57665721
walk 416317254
walk 179808736
walk 690046590
walk 618135596
walk 407741146
walk 801986885
walk...

result:

ok n=998244353

Test #9:

score: 0
Accepted
time: 5ms
memory: 3584kb

input:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

walk 994578475
walk 182652939
walk 579398340
walk 401502676
walk 336492164
walk 630180301
walk 670866074
walk 262633459
walk 715451694
walk 963441614
walk 679579039
walk 851257863
walk 445497846
walk 31909255
walk 693233833
walk 476635603
walk 916008199
walk 226030654
walk 697868160
walk 807320503
w...

result:

ok n=1

Test #10:

score: 0
Accepted
time: 3ms
memory: 3584kb

input:

7
10
10
6
10
7
9
2
4
8
7
2
10
9
4
7
10
2
2
3
10
8
6
1
6
5
1
5
10
1
6
7
6
2
5
2
2
8
10
10
3
6
10
5
10
3
7
1
3
2
10
2
1
3
9
1
4
7
10
4
4
10
3
10
5
9
7
6
2
10
2
1
10
4
6
9
8
8
9
8
8
1
5
1
6
9
4
6
1
8
3
3
3
5
5
8
9
7
1
2
5
5
6
8
8
6
3
3
5
10
6
8
6
6
9
1
2
7
10
3
5
2
4
10
6
4
1
10
9
5
4
2
7
9
6
3
8
6
8
5...

output:

walk 994578475
walk 182652939
walk 579398340
walk 401502676
walk 336492164
walk 630180301
walk 670866074
walk 262633459
walk 715451694
walk 963441614
walk 679579039
walk 851257863
walk 445497846
walk 31909255
walk 693233833
walk 476635603
walk 916008199
walk 226030654
walk 697868160
walk 807320503
w...

result:

ok n=10

Test #11:

score: 0
Accepted
time: 4ms
memory: 3712kb

input:

922
724
827
77
55
53
807
35
417
414
235
442
238
46
785
81
612
753
773
578
944
955
967
274
980
479
948
446
268
149
397
744
780
778
625
622
723
599
716
478
188
7
971
413
724
424
806
321
510
896
711
583
623
885
637
495
28
914
834
852
852
458
938
647
344
763
732
822
165
711
291
310
730
420
455
474
599
4...

output:

walk 994578475
walk 182652939
walk 579398340
walk 401502676
walk 336492164
walk 630180301
walk 670866074
walk 262633459
walk 715451694
walk 963441614
walk 679579039
walk 851257863
walk 445497846
walk 31909255
walk 693233833
walk 476635603
walk 916008199
walk 226030654
walk 697868160
walk 807320503
w...

result:

ok n=1000

Test #12:

score: 0
Accepted
time: 13ms
memory: 3712kb

input:

7206
9216
7140
699
3427
1188
1098
3656
9274
9603
6364
1996
7744
9488
9044
86
2494
8334
8730
5533
2544
1579
8996
7151
5816
4588
1269
7756
1089
2339
733
8997
3300
565
852
7370
260
8480
3436
7652
4735
3145
2991
7004
9216
1331
4762
3865
3609
9021
8521
6652
9705
8087
2288
5750
6315
5435
9221
6511
4601
19...

output:

walk 994578475
walk 182652939
walk 579398340
walk 401502676
walk 336492164
walk 630180301
walk 670866074
walk 262633459
walk 715451694
walk 963441614
walk 679579039
walk 851257863
walk 445497846
walk 31909255
walk 693233833
walk 476635603
walk 916008199
walk 226030654
walk 697868160
walk 807320503
w...

result:

ok n=10000

Test #13:

score: 0
Accepted
time: 11ms
memory: 3840kb

input:

98606
48804
58286
52387
63720
10461
61551
91599
12839
17113
75997
2594
45930
38756
3061
81871
27822
62084
38922
44564
84833
82212
43287
54911
58
73700
95790
24111
93143
86177
91182
83697
37573
73465
61915
27291
30205
68916
37242
89256
67167
45910
88954
83975
74025
43251
61686
75046
3038
35810
37039
...

output:

walk 994578475
walk 182652939
walk 579398340
walk 401502676
walk 336492164
walk 630180301
walk 670866074
walk 262633459
walk 715451694
walk 963441614
walk 679579039
walk 851257863
walk 445497846
walk 31909255
walk 693233833
walk 476635603
walk 916008199
walk 226030654
walk 697868160
walk 807320503
w...

result:

ok n=100000

Test #14:

score: 0
Accepted
time: 7ms
memory: 3968kb

input:

817572
784566
774824
194084
907121
202835
764782
817608
690199
418731
846080
287654
540598
10148
367008
956232
107126
25443
821131
880212
48333
580029
433204
516704
208970
314941
128469
499819
60611
744042
258404
839546
235515
762984
403159
339411
887920
384988
968881
695291
577013
274040
41836
3862...

output:

walk 994578475
walk 182652939
walk 579398340
walk 401502676
walk 336492164
walk 630180301
walk 670866074
walk 262633459
walk 715451694
walk 963441614
walk 679579039
walk 851257863
walk 445497846
walk 31909255
walk 693233833
walk 476635603
walk 916008199
walk 226030654
walk 697868160
walk 807320503
w...

result:

ok n=1000000

Test #15:

score: 0
Accepted
time: 10ms
memory: 3840kb

input:

3424417
4653767
1471298
5795443
66941
7742720
5685333
6188041
4284051
2380185
2739677
9916853
1788169
3953564
4928393
7717748
846433
1467680
4012814
1620556
2835220
1341973
1742523
7862807
1791674
6899475
1466661
6096636
4718027
9801255
8875024
8681547
5825509
7271650
8374397
2063792
515097
6227050
...

output:

walk 166673294
walk 424267206
walk 461315668
walk 421764202
walk 729361431
walk 768393525
walk 330750300
walk 528614457
walk 141717500
walk 504013500
walk 994531905
walk 975495835
walk 132885913
walk 616038585
walk 134959831
walk 516715084
walk 567381368
walk 208312960
walk 84902547
walk 23775003
wa...

result:

ok n=10000000

Test #16:

score: 0
Accepted
time: 11ms
memory: 3840kb

input:

79207474
36870967
95306861
99921692
38957449
12620713
94909850
59182444
84719809
67156303
35398173
61097723
50019442
3942607
15663699
87092718
80210364
59902357
59880094
16996588
96873104
30070706
95506059
43705603
6238607
28789731
11896301
23008781
9893495
23519819
38817474
83658610
20888135
493579...

output:

walk 166673294
walk 424267206
walk 461315668
walk 421764202
walk 729361431
walk 768393525
walk 330750300
walk 528614457
walk 141717500
walk 504013500
walk 994531905
walk 975495835
walk 132885913
walk 616038585
walk 134959831
walk 516715084
walk 567381368
walk 208312960
walk 84902547
walk 23775003
wa...

result:

ok n=100000000

Test #17:

score: 0
Accepted
time: 11ms
memory: 3840kb

input:

539654246
603696446
683007848
120373058
259169187
585532038
4009996
924920767
367427820
476501847
10362340
490010757
896932830
390206849
568614675
297962867
472012844
525202272
1318993
704166736
283205334
640433997
658158350
696507945
482409308
118879564
606919837
897575818
164769760
810112701
17453...

output:

walk 166673294
walk 424267206
walk 461315668
walk 421764202
walk 729361431
walk 768393525
walk 330750300
walk 528614457
walk 141717500
walk 504013500
walk 994531905
walk 975495835
walk 132885913
walk 616038585
walk 134959831
walk 516715084
walk 567381368
walk 208312960
walk 84902547
walk 23775003
wa...

result:

ok n=1000000000

Test #18:

score: 0
Accepted
time: 17ms
memory: 3840kb

input:

504166092
715643618
329395466
849605538
588363898
257047898
244304924
112072110
753549866
289891452
730004998
449656231
563447499
363769067
39138941
304971254
731219728
652946142
547366871
672655316
697942241
6242927
393335273
444032698
553526665
417499015
452883325
49950473
152597351
637380226
6837...

output:

walk 166673294
walk 424267206
walk 461315668
walk 421764202
walk 729361431
walk 768393525
walk 330750300
walk 528614457
walk 141717500
walk 504013500
walk 994531905
walk 975495835
walk 132885913
walk 616038585
walk 134959831
walk 516715084
walk 567381368
walk 208312960
walk 84902547
walk 23775003
wa...

result:

ok n=923579837

Test #19:

score: 0
Accepted
time: 13ms
memory: 3840kb

input:

261884645
57353755
87162368
206017376
184041757
143972553
65247046
234765594
136555075
156603173
22883652
75752844
140772134
37392868
102505392
243664888
103450732
149846285
249666228
203644644
78228879
222911841
148558393
229395591
116451422
105044434
120000213
88835338
8536695
41167857
115650960
2...

output:

walk 166673294
walk 424267206
walk 461315668
walk 421764202
walk 729361431
walk 768393525
walk 330750300
walk 528614457
walk 141717500
walk 504013500
walk 994531905
walk 975495835
walk 132885913
walk 616038585
walk 134959831
walk 516715084
walk 567381368
walk 208312960
walk 84902547
walk 23775003
wa...

result:

ok n=273583259

Test #20:

score: 0
Accepted
time: 8ms
memory: 3840kb

input:

160479957
368172839
59050196
203108426
386632151
77793106
214047301
83130056
224741341
10558936
332091814
157604038
275803391
175706590
201015326
137292911
112099156
165149838
315035760
266980543
88921144
115495441
17766346
117964780
105467943
322236193
252424480
52372922
307905150
376942372
2038624...

output:

walk 85118166
walk 651716425
walk 227294945
walk 131878493
walk 985110482
walk 8956182
walk 568774076
walk 264830844
walk 360448303
walk 436194497
walk 936415315
walk 102986631
walk 395595524
walk 970933027
walk 543520997
walk 166155333
walk 168333102
walk 228094178
walk 127203522
walk 141377354
wal...

result:

ok n=398532958

Test #21:

score: 0
Accepted
time: 5ms
memory: 3712kb

input:

73907989
41441073
49758108
107022501
46757292
97897561
60281531
6226922
72770412
136196294
15116581
63207413
120298777
108506083
109577612
119459782
101500224
140795818
85515201
39828954
101824256
2441509
123537300
64482796
133694143
98491148
147581274
129746120
51911343
87357934
18988854
66554156
4...

output:

walk 85118166
walk 651716425
walk 227294945
walk 131878493
walk 985110482
walk 8956182
walk 568774076
walk 264830844
walk 360448303
walk 436194497
walk 936415315
walk 102986631
walk 395595524
walk 970933027
walk 543520997
walk 166155333
walk 168333102
walk 228094178
walk 127203522
walk 141377354
wal...

result:

ok n=150182058

Test #22:

score: 0
Accepted
time: 11ms
memory: 3968kb

input:

234826008
61045922
28708569
49774988
183780862
131537389
180266979
258797188
219562006
219968371
273343769
118857889
138889312
108517712
117642575
25356022
216617282
109684011
206330064
59074153
130158296
306157032
109671775
52759983
207898959
138592576
276356627
75241148
168777623
15159683
40507383...

output:

walk 85118166
walk 651716425
walk 227294945
walk 131878493
walk 985110482
walk 8956182
walk 568774076
walk 264830844
walk 360448303
walk 436194497
walk 936415315
walk 102986631
walk 395595524
walk 970933027
walk 543520997
walk 166155333
walk 168333102
walk 228094178
walk 127203522
walk 141377354
wal...

result:

ok n=328535824

Test #23:

score: 0
Accepted
time: 15ms
memory: 3840kb

input:

105869155
929801671
455610732
387574148
792138876
595877953
145731580
372449095
796038021
885360399
203653494
453681730
103425408
882672826
222653016
131735283
166101452
847930445
647660642
558029720
190959057
47399364
238409947
449866452
11895295
285842474
607164712
688106397
138732879
762860827
72...

output:

walk 85118166
walk 651716425
walk 227294945
walk 131878493
walk 985110482
walk 8956182
walk 568774076
walk 264830844
walk 360448303
walk 436194497
walk 936415315
walk 102986631
walk 395595524
walk 970933027
walk 543520997
walk 166155333
walk 168333102
walk 228094178
walk 127203522
walk 141377354
wal...

result:

ok n=998244353

Test #24:

score: 0
Accepted
time: 8ms
memory: 3840kb

input:

627822115
371422390
931678463
819817867
674742860
214684065
697532195
972827236
431361347
583452777
224300833
440771357
410946890
382923125
670345461
801316447
69576717
59090088
121526823
742322780
865914327
502322400
589971111
195401668
990880561
854654398
265762960
373994092
725414656
796365408
76...

output:

walk 85118166
walk 651716425
walk 227294945
walk 131878493
walk 985110482
walk 8956182
walk 568774076
walk 264830844
walk 360448303
walk 436194497
walk 936415315
walk 102986631
walk 395595524
walk 970933027
walk 543520997
walk 166155333
walk 168333102
walk 228094178
walk 127203522
walk 141377354
wal...

result:

ok n=993244853

Test #25:

score: 0
Accepted
time: 12ms
memory: 3712kb

input:

731778292
722976020
125485459
457749555
36932666
133470955
54946940
445162120
690960919
477887461
708814662
257150417
732275073
670526356
527805179
426013083
235360253
542961578
698940013
673466316
473820241
87256873
417764535
351863998
281844902
370631004
261333031
626390732
8696987
8937105
6697894...

output:

walk 723794942
walk 56662465
walk 57126081
walk 584529474
walk 953372181
walk 296452614
walk 817834685
walk 764743157
walk 350788675
walk 8195245
walk 165197117
walk 365540900
walk 95903898
walk 859787129
walk 865174067
walk 681643262
walk 206275366
walk 852869672
walk 514504472
walk 86948807
walk 8...

result:

ok n=759738543

Test #26:

score: 0
Accepted
time: 13ms
memory: 3840kb

input:

19810613
115359657
99559238
120419646
95751450
41193308
85191087
44282976
69356163
1551250
74116099
115733632
32680695
96709628
52938566
117342423
33744743
46840293
18976606
115731339
51058901
45230802
14867701
93759554
5393571
100231771
70482387
11841473
75189623
120673307
14668144
52972563
1005013...

output:

walk 723794942
walk 56662465
walk 57126081
walk 584529474
walk 953372181
walk 296452614
walk 817834685
walk 764743157
walk 350788675
walk 8195245
walk 165197117
walk 365540900
walk 95903898
walk 859787129
walk 865174067
walk 681643262
walk 206275366
walk 852869672
walk 514504472
walk 86948807
walk 8...

result:

ok n=124834753

Test #27:

score: 0
Accepted
time: 14ms
memory: 3968kb

input:

496459892
636499602
217518478
577282257
925240678
104411497
662067942
470621214
737244829
121218924
566841501
289854746
165849024
64654628
240705785
240338417
506392733
385673390
370743502
511335339
133494842
557136623
274668061
308604446
660228750
285277365
380730818
380574290
210756384
109883118
4...

output:

walk 723794942
walk 56662465
walk 57126081
walk 584529474
walk 953372181
walk 296452614
walk 817834685
walk 764743157
walk 350788675
walk 8195245
walk 165197117
walk 365540900
walk 95903898
walk 859787129
walk 865174067
walk 681643262
walk 206275366
walk 852869672
walk 514504472
walk 86948807
walk 8...

result:

ok n=949952395

Test #28:

score: 0
Accepted
time: 12ms
memory: 3840kb

input:

408036431
820024972
63664689
645691023
220031435
754501000
380110257
90215534
384978659
625290987
210886696
61575222
59955097
751271618
470128409
671555800
362330349
696079147
426020579
489910980
489182502
793674184
597326680
120369482
480602932
586349121
545829705
34085651
523819468
681459183
20662...

output:

walk 723794942
walk 56662465
walk 57126081
walk 584529474
walk 953372181
walk 296452614
walk 817834685
walk 764743157
walk 350788675
walk 8195245
walk 165197117
walk 365540900
walk 95903898
walk 859787129
walk 865174067
walk 681643262
walk 206275366
walk 852869672
walk 514504472
walk 86948807
walk 8...

result:

ok n=835823588

Test #29:

score: 0
Accepted
time: 13ms
memory: 3584kb

input:

218653198
781331878
521509113
212396469
716450771
316676326
758828169
495102424
520779596
310290344
340144789
226301087
711012764
621606471
152724253
642469903
126435637
563416861
615769898
126695563
761189414
263448870
869743197
437086047
694423516
566798175
870034368
788198557
969911275
618609112
...

output:

walk 945852061
walk 746539292
walk 685556398
walk 172558411
walk 761569749
walk 360887482
walk 337804202
walk 142571120
walk 851900313
walk 849192698
walk 104221236
walk 289637852
walk 793026796
walk 158498942
walk 816918433
walk 379618198
walk 101250448
walk 538926703
walk 28712487
walk 289274179
w...

result:

ok n=996832654

Test #30:

score: 0
Accepted
time: 12ms
memory: 3712kb

input:

111488195
274621586
94100041
416254780
825278580
211055405
692515700
751002670
798971819
719612170
486475881
365351535
654638313
219395885
791730397
412888192
263823305
16799875
120724683
402616269
799711699
330809447
106096349
233493805
551268029
461262606
400487329
501282358
641697559
303268434
80...

output:

walk 945852061
walk 746539292
walk 685556398
walk 172558411
walk 761569749
walk 360887482
walk 337804202
walk 142571120
walk 851900313
walk 849192698
walk 104221236
walk 289637852
walk 793026796
walk 158498942
walk 816918433
walk 379618198
walk 101250448
walk 538926703
walk 28712487
walk 289274179
w...

result:

ok n=835884359

Test #31:

score: 0
Accepted
time: 12ms
memory: 3840kb

input:

372584333
259884931
86202635
258761046
161092101
521979583
545091
143116211
135777830
125731834
229953070
519590922
453379024
611877966
569557705
89937209
191187657
730114360
758826847
188862332
852148810
705913517
86691451
839729917
514491438
275894906
346992469
361378315
534457089
666926861
736492...

output:

walk 945852061
walk 746539292
walk 685556398
walk 172558411
walk 761569749
walk 360887482
walk 337804202
walk 142571120
walk 851900313
walk 849192698
walk 104221236
walk 289637852
walk 793026796
walk 158498942
walk 816918433
walk 379618198
walk 101250448
walk 538926703
walk 28712487
walk 289274179
w...

result:

ok n=859238694

Test #32:

score: 0
Accepted
time: 16ms
memory: 3712kb

input:

586755998
388713616
979551122
532597521
954449655
371121298
610783512
257962784
1473311
81898786
190317502
731904471
888321649
938118627
87035971
775477808
121519608
800946697
40959151
820773062
502424827
663300569
491621098
535513042
202289838
305654027
28660903
783687364
224604909
261020378
138856...

output:

walk 945852061
walk 746539292
walk 685556398
walk 172558411
walk 761569749
walk 360887482
walk 337804202
walk 142571120
walk 851900313
walk 849192698
walk 104221236
walk 289637852
walk 793026796
walk 158498942
walk 816918433
walk 379618198
walk 101250448
walk 538926703
walk 28712487
walk 289274179
w...

result:

ok n=984359463

Test #33:

score: 0
Accepted
time: 8ms
memory: 3840kb

input:

945852062
744033029
481231102
653789513
467000937
827888419
217334296
359905416
263447404
164281777
268503013
558140865
402809336
561308278
429868386
809486584
910737032
501305410
530017897
819292076
534220229
298865305
538881933
343562074
877562289
549846126
620943689
635329535
808408309
940878081
...

output:

walk 945852061
walk 746539292
walk 685556398
walk 172558411
walk 761569749
walk 360887482
walk 337804202
walk 142571120
walk 851900313
walk 849192698
walk 104221236
walk 289637852
walk 793026796
walk 158498942
walk 816918433
walk 379618198
walk 101250448
walk 538926703
walk 28712487
walk 289274179
w...

result:

ok n=948358325

Test #34:

score: 0
Accepted
time: 2ms
memory: 3712kb

input:

1
2
2
2
1
2
2
1
1
2
2
1
1
1
2
1
2
1
2
1
2
2
2
1
1
1
1
1
2
1
2
2
2
1
2
1
2
2
2
1
1
1
2
1
1
1
1
2
2
2
1
1
2
1
2
2
1
2
1
2
2
1
1
2
2
2
1
1
1
2
2
1
1
1
2
1
1
1
2
2
1
1
1
1
2
1
1
1
2
2
2
2
1
1
1
2
2
2
1
1
1
2
1
1
1
2
2
2
2
2
1
2
1
2
2
1
2
1
1
2
1
1
1
2
2
2
2
1
1
2
2
1
2
2
2
2
1
1
1
1
2
1
2
2
1
2
2
2
1
1
...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=2

Test #35:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

2
3
2
1
1
2
3
3
3
2
1
2
2
3
2
3
2
3
3
2
3
2
3
3
3
2
1
3
2
1
2
1
3
2
3
2
3
1
1
2
1
3
2
2
1
3
2
2
1
3
3
3
3
2
1
3
1
2
1
3
3
1
2
1
1
2
1
2
2
2
3
1
3
2
1
1
2
1
1
3
2
1
2
1
1
2
3
2
3
3
1
2
2
1
2
1
1
3
3
2
2
2
3
3
2
1
3
3
1
3
1
2
2
3
3
2
3
1
2
2
1
3
3
3
1
3
3
2
2
3
1
3
1
1
3
1
2
1
2
2
2
2
1
3
2
2
2
3
2
2
...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=3

Test #36:

score: 0
Accepted
time: 5ms
memory: 3584kb

input:

2
4
4
1
3
1
1
3
3
4
1
3
2
2
1
2
1
3
4
2
1
1
1
3
2
2
2
2
1
3
4
4
1
3
4
2
4
1
4
3
2
2
1
3
2
3
3
4
4
4
2
3
1
3
4
4
3
4
3
4
4
2
3
4
4
4
2
3
2
1
1
3
2
2
4
3
2
3
1
4
3
3
2
2
4
2
3
3
4
1
1
4
3
2
2
4
1
1
2
3
3
4
3
3
2
1
1
1
4
4
2
4
2
1
1
3
4
3
2
1
3
2
3
4
1
1
1
3
3
4
1
2
1
4
4
1
2
2
3
2
4
2
1
4
2
1
4
4
2
2
...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=4

Test #37:

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

input:

5
2
1
4
4
2
1
5
1
3
1
5
2
4
1
5
2
5
5
1
4
1
4
1
4
4
4
2
2
2
1
4
5
4
4
2
4
3
5
4
3
4
1
2
4
5
1
2
2
1
1
4
4
1
2
1
4
3
5
1
1
3
3
3
1
5
2
3
3
2
1
4
1
4
3
2
3
4
3
4
3
4
3
3
3
4
5
1
2
1
5
2
5
2
2
4
4
4
5
4
5
3
2
3
5
1
2
4
2
3
2
3
3
1
4
4
1
2
5
1
5
2
4
5
4
1
1
5
5
5
4
1
5
3
3
3
5
1
4
5
5
4
2
1
3
4
3
3
3
5
...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=5

Test #38:

score: 0
Accepted
time: 3ms
memory: 3584kb

input:

3
6
2
4
5
2
6
1
1
2
4
3
3
1
2
1
2
1
6
3
6
2
6
1
1
3
5
1
2
5
2
4
6
3
6
3
6
4
4
3
5
1
2
3
5
1
3
2
4
6
1
1
6
3
4
6
5
2
5
6
6
5
3
4
4
2
5
3
3
2
6
5
1
3
4
5
3
5
4
6
3
5
3
5
4
3
1
3
6
6
4
2
3
5
3
4
4
6
1
3
3
2
1
1
3
4
6
6
4
6
5
2
3
6
6
3
6
5
3
2
5
1
1
6
4
6
6
3
3
6
4
1
4
4
6
4
3
5
3
3
2
3
4
6
3
2
2
6
3
3
...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=6

Test #39:

score: 0
Accepted
time: 14ms
memory: 3712kb

input:

2058
956
2634
1742
1373
628
2534
2794
2605
180
2687
1243
1524
2476
2691
1884
938
920
1841
293
76
2340
1919
742
990
1434
1281
2405
483
1032
2454
1018
1792
2651
284
1833
659
2866
492
2243
1864
2881
2780
2423
1439
85
2751
1402
1299
1996
613
2130
1591
1629
476
2330
1066
477
2859
354
1123
1658
1810
1708
...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=3000

Test #40:

score: 0
Accepted
time: 3ms
memory: 3712kb

input:

1099
873
1872
1199
1330
664
1373
170
463
1179
1587
244
1743
1488
1436
1208
1782
392
554
748
1691
571
661
1667
907
1688
45
1948
1750
1981
1625
958
1694
28
441
541
1317
1265
1915
335
1357
245
1323
601
1322
1036
1072
531
180
1506
454
1083
1935
226
1962
1625
965
291
392
1907
634
1894
543
1054
1771
1096
...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=2000

Test #41:

score: 0
Accepted
time: 16ms
memory: 3840kb

input:

3421
3349
3840
482
3384
866
3262
1442
2515
3475
1720
2867
327
1688
68
489
3283
1805
905
3108
1721
3386
3923
2900
1352
3179
1049
1528
3411
2629
1316
3344
3926
557
2454
1785
201
2632
1227
3053
3210
2448
2909
399
139
3120
579
439
707
2224
2225
2476
3637
2602
2680
1316
3101
3303
909
3943
2486
964
1036
2...

output:

walk 237289224
walk 531689099
walk 102550288
walk 345267586
walk 776954385
walk 429083951
walk 731042228
walk 659364453
walk 209312532
walk 126154969
walk 414316426
walk 20857073
walk 566564034
walk 305894204
walk 109390729
walk 598775663
walk 347582269
walk 99554501
walk 7516905
walk 960366997
walk...

result:

ok n=4000

Test #42:

score: 0
Accepted
time: 11ms
memory: 3840kb

input:

1550
555
3602
410
577
311
894
3546
5778
942
548
4177
237
2105
810
2818
1747
3311
3251
3821
2480
540
1840
1862
916
1307
3433
2032
3700
4690
3268
5674
6503
2262
4324
2274
650
3838
112
3297
4115
3733
1152
413
6580
1921
819
3521
2580
4060
6036
6062
2565
143
5876
5882
6138
55
3736
1916
4224
3509
6098
661...

output:

walk 905409867
walk 79733267
walk 399392427
walk 224148500
walk 782603845
walk 527690264
walk 896007263
walk 699001719
walk 315650673
walk 473832974
walk 748491092
walk 512255542
walk 817484281
walk 123957153
walk 439308328
walk 425214476
walk 522646129
walk 890194214
walk 28156573
walk 873753996
wa...

result:

ok n=6666

Test #43:

score: 0
Accepted
time: 3ms
memory: 3840kb

input:

244
2344
275
5965
2141
255
1699
5517
4196
2680
1675
1677
6344
1396
6025
4343
515
5243
1823
5380
1619
4306
3325
3754
3374
4222
2182
4131
6184
5993
3094
5151
3830
1173
2157
6204
3627
2299
236
4711
1278
4115
5175
1144
1729
769
4692
5057
2154
5076
6286
4821
2882
1519
4130
1931
4826
3842
3872
3895
4758
1...

output:

walk 905409867
walk 79733267
walk 399392427
walk 224148500
walk 782603845
walk 527690264
walk 896007263
walk 699001719
walk 315650673
walk 473832974
walk 748491092
walk 512255542
walk 817484281
walk 123957153
walk 439308328
walk 425214476
walk 522646129
walk 890194214
walk 28156573
walk 873753996
wa...

result:

ok n=6667

Test #44:

score: 0
Accepted
time: 13ms
memory: 3840kb

input:

8426876
4428122
6404848
7909989
143300
6716950
6428188
629773
2902950
7938268
3175270
1689599
6407269
5634105
4506165
4163235
1924099
4966575
1145864
3266398
4591457
7166024
4752156
7409819
6649628
228410
4531516
2840559
7735596
4759047
8035997
821675
8292213
864569
4969408
2508017
5012995
5895826
7...

output:

walk 905409867
walk 79733267
walk 399392427
walk 224148500
walk 782603845
walk 527690264
walk 896007263
walk 699001719
walk 315650673
walk 473832974
walk 748491092
walk 512255542
walk 817484281
walk 123957153
walk 439308328
walk 425214476
walk 522646129
walk 890194214
walk 28156573
walk 873753996
wa...

result:

ok n=9000000

Test #45:

score: 0
Accepted
time: 11ms
memory: 3840kb

input:

1554671
7999621
9354181
7175489
2917891
277063
7899553
6383637
4931527
2675775
2724519
10832636
620557
6371766
10426256
8802550
3024189
5908795
3872287
6304156
5367022
9847307
1728306
4991238
6761930
9485088
210375
3216026
10748836
9843156
9304982
5446785
4657672
832106
5500220
9537281
7120610
88756...

output:

walk 905409867
walk 79733267
walk 399392427
walk 224148500
walk 782603845
walk 527690264
walk 896007263
walk 699001719
walk 315650673
walk 473832974
walk 748491092
walk 512255542
walk 817484281
walk 123957153
walk 439308328
walk 425214476
walk 522646129
walk 890194214
walk 28156573
walk 873753996
wa...

result:

ok n=11108889

Test #46:

score: 0
Accepted
time: 15ms
memory: 3712kb

input:

6320058
1497417
17680138
3272405
18200257
16779310
18166212
17875194
3896901
18868959
11103034
12482167
802135
4630288
1835518
6845614
15058021
3004127
1857265
17829086
3023102
13140840
16592970
12036780
15387579
879258
5295253
10156178
11265709
18501601
17855127
1419497
5134429
4550482
17842538
192...

output:

walk 801988955
walk 27712145
walk 791132494
walk 275553870
walk 348209204
walk 121642578
walk 434446491
walk 397967228
walk 753736076
walk 544871889
walk 836451734
walk 493292586
walk 154752786
walk 664170147
walk 675865938
walk 528378787
walk 268577603
walk 819401190
walk 130082072
walk 247108788
w...

result:

ok n=19260817

Test #47:

score: 0
Accepted
time: 10ms
memory: 3712kb

input:

171099
201234
230093
671561
501293
563531
374306
41722
271974
554026
431977
772132
101080
752875
751563
629664
777017
764987
153620
331081
272267
125142
617360
508807
723229
829709
328773
415767
604745
687459
60575
785902
254377
450977
257890
592464
120937
636012
489118
369429
316950
561196
141000
4...

output:

walk 801988955
walk 27712145
walk 791132494
walk 275553870
walk 348209204
walk 121642578
walk 434446491
walk 397967228
walk 753736076
walk 544871889
walk 836451734
walk 493292586
walk 154752786
walk 664170147
walk 675865938
walk 528378787
walk 268577603
walk 819401190
walk 130082072
walk 247108788
w...

result:

ok n=832478

Test #48:

score: 0
Accepted
time: 5ms
memory: 3712kb

input:

1614545
48020976
47012231
18867639
45686658
3869929
8707426
15044585
6952383
18852463
28114817
1256202
4014408
13538126
5171265
25380058
18599369
36093439
13910145
50699091
24080377
408566
56960889
40261506
17941558
47405760
53076485
7860918
15437654
24941035
7424252
900642
7447338
38164799
55804047...

output:

walk 801988955
walk 27712145
walk 791132494
walk 275553870
walk 348209204
walk 121642578
walk 434446491
walk 397967228
walk 753736076
walk 544871889
walk 836451734
walk 493292586
walk 154752786
walk 664170147
walk 675865938
walk 528378787
walk 268577603
walk 819401190
walk 130082072
walk 247108788
w...

result:

ok n=58737529

Test #49:

score: 0
Accepted
time: 9ms
memory: 3968kb

input:

188567024
35100698
137497119
88819334
192437243
68513667
234873255
89337272
235750419
19273733
127603756
17895261
168989984
138691252
44517153
123170787
8498487
75889346
40537200
5077590
221178586
86616814
7285816
110576797
232321405
207863560
55599376
169959766
46370379
85355464
78132926
44450472
2...

output:

walk 801988955
walk 27712145
walk 791132494
walk 275553870
walk 348209204
walk 121642578
walk 434446491
walk 397967228
walk 753736076
walk 544871889
walk 836451734
walk 493292586
walk 154752786
walk 664170147
walk 675865938
walk 528378787
walk 268577603
walk 819401190
walk 130082072
walk 247108788
w...

result:

ok n=238532958

Test #50:

score: 0
Accepted
time: 6ms
memory: 3840kb

input:

455579328
24230730
108712212
311213164
525431
31156262
375380559
503274033
16826626
285743570
33774681
57895198
347493758
94244454
40314710
9108981
477204686
325124847
495724969
419549742
260876649
126217245
79417952
316398691
381599425
54618732
278767833
179762552
261795769
42296785
240246722
17848...

output:

walk 801988955
walk 27712145
walk 791132494
walk 275553870
walk 348209204
walk 121642578
walk 434446491
walk 397967228
walk 753736076
walk 544871889
walk 836451734
walk 493292586
walk 154752786
walk 664170147
walk 675865938
walk 528378787
walk 268577603
walk 819401190
walk 130082072
walk 247108788
w...

result:

ok n=513204503

Test #51:

score: 0
Accepted
time: 10ms
memory: 3712kb

input:

222062065
581663571
619884714
713333662
720997228
576111855
109869699
335185463
259524956
474962392
786293232
832313973
176062196
602105331
314119047
769143070
617601071
694343673
92940412
819331198
869054414
231122395
483521026
402360034
124471250
560560844
507146808
901013377
172936435
71640511
97...

output:

walk 222062064
walk 359601506
walk 38221143
walk 93448948
walk 7663566
walk 778692862
walk 457336079
walk 225315764
walk 847917728
walk 215437436
walk 311330840
walk 46020741
walk 267326458
walk 426043135
walk 635591951
walk 455024023
walk 772036236
walk 76742602
walk 322174974
walk 726390786
walk 4...

result:

ok n=923578235

Test #52:

score: 0
Accepted
time: 11ms
memory: 3840kb

input:

138104489
111189409
149410552
49601207
57264773
62924463
133743956
165801427
47427690
69606833
187679380
40441828
114509993
154036542
16595321
85102758
84105822
160848424
96506812
49864426
99587642
191975565
57857610
127241681
193156253
49470968
146601995
153951978
156194978
12185824
188991154
16001...

output:

walk 222062064
walk 359601506
walk 38221143
walk 93448948
walk 7663566
walk 778692862
walk 457336079
walk 225315764
walk 847917728
walk 215437436
walk 311330840
walk 46020741
walk 267326458
walk 426043135
walk 635591951
walk 455024023
walk 772036236
walk 76742602
walk 322174974
walk 726390786
walk 4...

result:

ok n=193258293

Test #53:

score: 0
Accepted
time: 13ms
memory: 3840kb

input:

234083760
5067408
61956325
32722915
230605612
9928817
135473451
180909675
200116733
187862047
152917695
12737444
238300313
143862230
201638303
216882908
76833651
154940147
165301075
93950247
170957496
170101113
34389514
185309769
61188864
16132738
212748169
144827605
40998560
70526452
185202065
5787...

output:

walk 222062064
walk 359601506
walk 38221143
walk 93448948
walk 7663566
walk 778692862
walk 457336079
walk 225315764
walk 847917728
walk 215437436
walk 311330840
walk 46020741
walk 267326458
walk 426043135
walk 635591951
walk 455024023
walk 772036236
walk 76742602
walk 322174974
walk 726390786
walk 4...

result:

ok n=238728439