QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#314876#8169. R-Connected Componentsucup-team003#AC ✓6ms3688kbC++141.6kb2024-01-26 13:48:572024-01-26 13:48:58

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1
2
3

output:

1
2
inf

result:

ok 3 tokens

Test #2:

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

input:

100
971962039
377418539
436722941
974460973
408831757
674955527
838941797
566099869
224191573
85539073
544795513
157335071
243499759
907206901
570172403
871918511
594778897
773009569
9371917
23810669
169348601
804358351
78636461
382633897
182514781
846151963
274168729
929192339
91532527
172531889
18...

output:

inf
inf
1
1
1
inf
1
1
1
1
1
inf
inf
1
inf
inf
1
1
1
1
1
inf
1
1
1
inf
1
inf
inf
1
inf
inf
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
1
1
inf
inf
1
1
inf
inf
1
1
inf
inf
inf
inf
inf
1
1
inf
inf
1
1
inf
1
1
1
1
inf
inf
1
inf
inf
inf
inf
inf
1
1
1
1
inf
1
1
1
inf
inf
1
inf
inf
1
inf
1
inf
1
1
inf
inf
1

result:

ok 100 tokens

Test #3:

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

input:

100
145332973
48696341
806778307
222052531
641666023
541840597
635341691
814013
661659811
428891707
81656189
417810353
889550023
634550447
905470561
429756883
249889429
195597113
906475553
913878767
953103803
192400903
483162293
643055177
137120771
748444841
701614733
452585411
367582519
564268909
6...

output:

1
1
inf
inf
inf
1
inf
1
inf
inf
1
1
inf
inf
1
inf
1
1
1
inf
inf
inf
1
1
inf
1
1
inf
inf
1
inf
inf
1
1
inf
1
1
1
1
inf
1
1
inf
1
inf
1
inf
inf
inf
1
inf
1
inf
inf
inf
inf
inf
1
inf
inf
1
1
inf
1
inf
1
1
inf
inf
1
inf
inf
inf
1
1
inf
1
1
inf
inf
inf
inf
1
1
1
1
inf
inf
inf
1
1
1
inf
1
inf
inf
1
1
1
inf

result:

ok 100 tokens

Test #4:

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

input:

100
999999937
999999929
999999893
999999883
999999797
999999761
999999757
999999751
999999739
999999733
999999677
999999667
999999613
999999607
999999599
999999587
999999541
999999527
999999503
999999491
999999487
999999433
999999391
999999353
999999337
999999323
999999229
999999223
999999197
999999...

output:

1
1
1
inf
1
1
1
inf
inf
1
1
inf
1
inf
inf
inf
1
inf
inf
inf
inf
1
inf
1
1
inf
1
inf
1
1
inf
1
inf
inf
1
inf
1
inf
inf
inf
inf
inf
1
1
1
1
inf
inf
1
1
1
1
inf
1
inf
inf
1
1
1
1
1
inf
inf
inf
1
1
inf
inf
1
1
1
inf
1
1
1
inf
1
inf
inf
1
inf
1
1
1
inf
inf
inf
1
inf
inf
1
1
inf
inf
1
inf
inf
1
inf
inf

result:

ok 100 tokens

Test #5:

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

input:

100
315798823
138076441
16013527
105333433
88400579
81370909
61828003
35409677
1148723
553787863
27501853
362120687
51345997
55496489
317656091
244618859
93709579
179950021
391542071
892937473
51911033
520441661
257008447
808078441
9461321
313593769
230895449
409677377
957316117
263495411
185463989
...

output:

inf
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
1
1
inf
inf
inf
inf
inf
inf
1
inf
inf
1
inf
inf
1
1
1
inf
inf
inf
1
inf
inf
inf
inf
inf
1
inf
inf
inf
1
1
inf
1
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
1
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
...

result:

ok 100 tokens

Test #6:

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

input:

100
33396841
155925169
725337061
54724081
120942061
666015877
383161
901555513
883456729
24196561
743043373
12241
73396613
329229533
416642297
284838833
539493529
231009601
832841881
143815537
223173721
265406201
236882881
22071701
163814401
90810781
563712997
528397937
113699569
388557821
19246817
...

output:

33396841
155925169
1
1
1
1
383161
1
883456729
24196561
1
1
1
1
1
1
539493529
231009601
832841881
1
223173721
1
236882881
1
163814401
1
1
1
113699569
1
1
1
1
389628121
1
1
1
1
1
1
848615161
101586241
516961
161366209
1
85137529
1
1
541911841
40436881
734789449
10004569
1
1
858665809
961
633579241
1
1...

result:

ok 100 tokens

Test #7:

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

input:

100
499658057
36899
6949
37019
984462473
106816361
1
1
22543
26953
2579
36913
257
1
716290573
149499529
20681
85306069
674566037
979891873
37321
373483237
1
609923317
1
3697
381941449
1
11909
27527
32851963
1
1
994521181
404960503
412873481
25229
31649
1
1
560316241
648138649
68383457
269359861
9144...

output:

1
inf
1
inf
1
1
1
1
inf
1
inf
1
1
1
1
149499529
1
1
1
1
1
1
1
1
1
1
1
1
1
inf
inf
1
1
1
inf
1
1
1
1
1
560316241
1
1
1
1
1
inf
1
inf
1
1
1
1
1
863360689
1
inf
inf
inf
140161921
1
1
1
1
1
1
1
inf
1
1
inf
1
1
1
1
1
1
1
1
inf
inf
57121
1
1
1
inf
1
1
1
1
1
1
1
1
1
1
1
343694521
1
1

result:

ok 100 tokens

Test #8:

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

input:

100
187975087
276217093
379657199
19605367
26780417
115587119
822088937
707592463
138222697
208471433
554801549
117467881
424963307
460625467
941301527
46982561
496089131
195270919
418619423
4244843
680028269
472729021
208491079
9537223
499139983
613552127
112408841
457474711
975931039
330137651
766...

output:

inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
1
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
in...

result:

ok 100 tokens

Test #9:

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

input:

100
926045761
14670797
171688609
6446521
16737737
574909381
373909561
547799737
518254321
127667401
20163653
475166101
497423809
27789353
146010829
203374313
964909969
109390681
852531377
743288509
521410829
146539061
11015761
104919049
74658329
832009333
25253
275659609
9661
436984357
438641981
292...

output:

926045761
1
171688609
6446521
961
1
1
1
1
127667401
1
1
497423809
1
1
1
964909969
109390681
1
1
1
1
11015761
104919049
1
1
1
275659609
1
1
1
292375801
1
1
143641
177608929
173159281
562590961
173475241
63218401
1
1
1
570588769
104509729
1
1
935089
130484929
1
1
1
1
597460249
325549849
1
1
1
3481
273...

result:

ok 100 tokens

Test #10:

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

input:

100
26713
263648797
137334961
32321
29333
17957
74605217
258427909
879778901
360802447
641367061
542799073
27743
688340633
417761737
1
288847913
566928841
1
24373
31489
328528741
487071331
29209
262454497
823802533
33029
17417
12953
1193
38431
14827
24137
31321
666705601
1
22381
508641857
230597681
...

output:

1
1
137334961
1
1
1
1
1
1
inf
1
1
inf
1
1
1
1
1
1
1
1
1
inf
1
1
1
1
1
1
1
inf
inf
1
1
1
1
1
1
1
1
inf
inf
1
1
inf
1
1
1
1
85137529
inf
1
1
1
inf
1
1
1
1
1
1
1
1
inf
1
1
inf
1
1
1
1
1
387577969
1
1
29235649
71284249
1
1
1
inf
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
72982849
1
1
1

result:

ok 100 tokens

Test #11:

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

input:

100
1000000000
999999999
999999998
999999997
999999996
999999995
999999994
999999993
999999992
999999991
999999990
999999989
999999988
999999987
999999986
999999985
999999984
999999983
999999982
999999981
999999980
999999979
999999978
999999977
999999976
999999975
999999974
999999973
999999972
99999...

output:

512
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
9
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
inf
inf
2
1
inf
inf
inf
inf
inf
inf
18
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
4
inf
98
1
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
...

result:

ok 100 tokens

Test #12:

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

input:

99
299902924
35471594
767706938
205698814
603316556
959029294
669327817
60138672
712708244
210563062
601408116
437250771
158745205
750158779
756779346
816318088
345490794
171471636
393930139
200252253
662551077
930897589
745450774
653627965
689924438
826274515
230872263
483617510
728080890
366788221...

output:

inf
inf
inf
inf
inf
inf
inf
inf
4
inf
36
inf
1
inf
18
inf
inf
inf
inf
inf
inf
1
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
36
inf
121
inf
inf
inf
inf
inf
inf
inf
32
inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
16
2
inf
inf
1
inf
inf
inf
i...

result:

ok 99 tokens

Test #13:

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

input:

99
488088308
663690321
268225458
648477948
688846579
254806549
113314121
438995270
56300243
73381809
776283843
251076857
929879954
86940650
209494574
16336790
328610214
342080737
483571163
242283385
803352057
377592875
371617968
4533714
306390527
390527765
576136864
186247299
290383679
400622739
308...

output:

4
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
1
inf
2
inf
inf
inf
1
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
484
inf
2
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
1
inf
inf
inf
2
1
4
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
...

result:

ok 99 tokens

Test #14:

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

input:

97
840202518
671320750
280528584
906366382
287081712
921963495
331419154
411783637
28411034
363506012
200247422
88538940
378604243
190325137
518138314
74408408
509021083
416036599
950895784
975528353
234364739
687930548
333943665
414528753
776199706
685313211
301500175
945316256
814736881
950995223
...

output:

inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
2
inf
inf
inf
8
1
inf
inf
inf
inf
inf
inf
inf
32
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
2
inf
inf
inf
inf
inf
inf
72
inf
2
inf
inf
inf
inf
9
inf
inf
8
inf
2
inf
inf
...

result:

ok 97 tokens

Test #15:

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

input:

96
929503810
150629471
302391255
35506390
226176149
394943615
380793606
668719155
109471389
573877275
471827746
986995188
677912717
357512231
525712669
102198307
122271417
316947200
655536963
938366792
884425402
749922216
99452382
894325929
324632943
546176203
110264722
448468150
705421788
345896691...

output:

2
inf
inf
inf
1
inf
inf
inf
inf
inf
2
inf
inf
inf
1
inf
inf
inf
inf
inf
98
inf
inf
inf
inf
inf
2
inf
inf
inf
2
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
36
inf
inf
inf
4
inf
inf
inf
inf
8
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
576
inf
1
inf
inf
inf
inf
inf
inf
inf
4
1
inf
inf
inf
inf
in...

result:

ok 96 tokens

Test #16:

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

input:

87
628640451
418894147
127415700
460391125
748700143
947553400
336114946
589685593
560604405
147529680
941694657
241136656
604410904
384716420
350195802
677186930
39772698
559195055
154207794
130703534
459402160
386402858
807221542
536095345
303589229
568841882
596276334
242257576
996431662
91391563...

output:

inf
inf
inf
1
inf
inf
2
inf
inf
inf
inf
16
inf
inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
98
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
1
inf
inf
1
inf
inf
2
4
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
inf
1
in...

result:

ok 87 tokens

Test #17:

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

input:

99
9210919
66487
45363
267802819
904496086
78824728
21340
8113170
754973
92571
4407
527278
117602
303673
2056
762965757
98287554
888213030
301318559
16248
743065245
56952179
13440560
142741696
425761
7765
698357690
846268971
41934076
41301225
13052514
8581028
40800235
98382
64498631
621956479
715994...

output:

inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
8
inf
inf
inf
inf
inf
inf
inf
inf
inf
49
1
2
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
16
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
2
2
inf
inf
inf
inf
inf
1
inf
1
8
inf
inf
in...

result:

ok 99 tokens

Test #18:

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

input:

94
6976
1293
801978
1681
62802181
8598582
7258
54144902
55033
57437
420025242
90802
31159335
43770
6633
68109
835278
158039
576483
84343980
45391
538292706
2987664
68271
52615
383157
264968419
328398366
7868
6271720
53910
304167
9390906
97523
3614
15455878
31216337
4505817
73497354
8920
365041714
36...

output:

64
inf
inf
1
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
2
inf
inf
98
inf
inf
inf
inf
inf
inf
inf
1
1
inf
inf
inf
inf
1
inf
inf
inf
1
2
inf
inf
inf
2
inf
inf
18
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
2
i...

result:

ok 94 tokens

Test #19:

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

input:

84
660688
20674292
2187
9475022
408701
29846
4478
42964
759085654
424454
35518911
53408
82279
89236112
6311
308556
261158
6384
155687414
83386
692254788
55845413
740198808
586059370
852760310
2017
41539
3598101
289897
12616
727452
42718737
349484
63893
2019
4247786
46413491
136433564
9680
4989
89172...

output:

inf
4
inf
inf
1
inf
inf
inf
inf
inf
inf
32
inf
inf
inf
inf
inf
inf
inf
2
inf
1
inf
inf
inf
1
inf
inf
1
inf
inf
inf
inf
1
inf
inf
inf
inf
1936
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
8
inf
inf
inf
inf
inf
inf
inf
9
inf
inf
inf
inf
inf
inf
inf
inf
18
inf
inf
inf
inf
inf
inf
inf
inf
i...

result:

ok 84 tokens

Test #20:

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

input:

85
921010
4418
49090
80599
8823
4013
58596213
6573
363995431
2579417
915708
27655419
72901
81744
77936
19999823
9157307
840946
2715
909856
14642273
397708
84696
273976897
4441905
574917263
400826798
9495
680177
3721
5404369
428606705
5095624
62471
1590
3863
734484
15421451
787709
390871
88590976
970...

output:

inf
4418
2
inf
inf
1
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
2
inf
32
1
inf
inf
inf
inf
inf
inf
inf
1
1
inf
inf
8
inf
inf
inf
inf
inf
inf
inf
128
1
inf
inf
inf
inf
inf
inf
inf
1
49
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
4
inf
inf
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
i...

result:

ok 85 tokens

Test #21:

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

input:

84
535423
93379
37472
370928
59818286
41683494
2097746
532886
11243
9469
2715092
60005
940517553
6551758
1633
8794731
2573378
82602964
94910701
42461
10408
9111
647526605
8591
769179
12743084
1666
125964916
73014948
5565
954233
85913
61131457
9650152
444136
7142623
566243
7144640
244440518
3120695
4...

output:

inf
inf
inf
inf
inf
inf
inf
inf
inf
1
4
inf
inf
inf
inf
inf
inf
4
1
1
8
inf
inf
inf
inf
inf
98
inf
inf
inf
inf
1
inf
8
inf
inf
inf
inf
inf
inf
inf
4
2
inf
2
9
inf
inf
inf
4
1
inf
inf
inf
inf
2
inf
2
inf
inf
inf
inf
inf
inf
inf
98
inf
inf
inf
inf
inf
inf
1
2
inf
inf
inf
4
inf
inf
inf
inf
inf
inf

result:

ok 84 tokens

Test #22:

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

input:

100
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

output:

1
2
inf
4
1
inf
inf
8
9
2
inf
inf
1
inf
inf
16
1
18
inf
4
inf
inf
inf
inf
1
2
inf
inf
1
inf
inf
32
inf
2
inf
36
1
inf
inf
8
1
inf
inf
inf
9
inf
inf
inf
49
2
inf
4
1
inf
inf
inf
inf
2
inf
inf
1
inf
inf
64
1
inf
inf
4
inf
inf
inf
72
1
2
inf
inf
inf
inf
inf
16
81
2
inf
inf
1
inf
inf
inf
1
18
inf
inf
in...

result:

ok 100 tokens

Test #23:

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

input:

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
...

output:

1
inf
inf
8
inf
2
inf
inf
1
inf
inf
inf
1
inf
inf
4
9
inf
inf
inf
121
2
inf
inf
1
inf
inf
128
inf
2
inf
inf
inf
inf
inf
8
1
inf
inf
inf
inf
inf
inf
144
1
2
inf
4
1
inf
inf
inf
9
inf
inf
inf
1
inf
inf
32
inf
162
inf
4
inf
inf
inf
inf
1
2
inf
inf
1
inf
inf
inf
inf
2
inf
36
1
inf
inf
inf
1
inf
inf
inf
...

result:

ok 100 tokens

Test #24:

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

input:

100
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
...

output:

inf
2
inf
inf
1
inf
inf
16
inf
inf
inf
4
inf
inf
inf
inf
inf
2
inf
inf
1
inf
inf
inf
9
2
inf
inf
1
inf
inf
8
1
18
inf
inf
inf
inf
inf
inf
1
242
inf
4
49
inf
inf
inf
inf
2
inf
inf
inf
inf
inf
256
1
inf
inf
4
9
inf
inf
inf
1
inf
inf
inf
1
inf
inf
16
inf
2
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
in...

result:

ok 100 tokens

Test #25:

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

input:

100
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
...

output:

inf
inf
inf
inf
1
18
inf
inf
inf
inf
inf
inf
1
2
inf
inf
1
inf
inf
64
inf
inf
inf
324
1
inf
inf
8
inf
inf
inf
inf
9
inf
inf
inf
1
2
inf
4
inf
inf
inf
inf
inf
2
inf
inf
1
inf
inf
inf
1
inf
inf
4
inf
inf
inf
72
361
2
inf
inf
1
inf
inf
inf
9
2
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
2
i...

result:

ok 100 tokens

Test #26:

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

input:

100
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
...

output:

1
inf
inf
4
81
inf
inf
inf
1
2
inf
inf
inf
inf
inf
32
inf
inf
inf
inf
1
inf
inf
8
1
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
4
inf
inf
inf
inf
441
2
inf
inf
1
inf
inf
inf
1
18
inf
4
inf
inf
inf
inf
1
2
inf
inf
1
inf
inf
16
inf
2
inf
36
inf
inf
inf
inf
inf
inf
inf
inf
9
inf
inf
inf
1
2
inf
484
1
inf
inf...

result:

ok 100 tokens

Test #27:

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

input:

100
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
...

output:

inf
inf
inf
inf
1
inf
inf
inf
1
inf
inf
512
inf
2
inf
inf
inf
inf
inf
8
1
18
inf
inf
inf
inf
inf
inf
529
2
inf
inf
1
inf
inf
inf
inf
2
inf
inf
1
inf
inf
32
1
inf
inf
4
9
inf
inf
inf
inf
2
inf
inf
1
inf
inf
inf
inf
2
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
576
1
2
inf
4
inf
inf
inf
8
9
2
inf
...

result:

ok 100 tokens

Test #28:

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

input:

100
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
...

output:

1
inf
inf
inf
121
inf
inf
inf
inf
2
inf
36
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
1
2
inf
4
1
inf
inf
inf
inf
2
inf
inf
49
inf
inf
128
1
inf
inf
inf
inf
inf
inf
648
inf
2
inf
inf
1
inf
inf
16
9
inf
inf
inf
1
inf
inf
inf
inf
18
inf
inf
inf
inf
inf
inf
1
2
inf
4
1
inf
inf
8
inf
inf
inf
inf
1
inf
...

result:

ok 100 tokens

Test #29:

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

input:

100
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
...

output:

1
inf
inf
inf
inf
2
inf
inf
1
inf
inf
8
inf
inf
inf
inf
inf
inf
inf
144
inf
722
inf
4
1
inf
inf
inf
729
2
inf
inf
1
inf
inf
inf
inf
18
inf
4
inf
inf
inf
inf
1
2
inf
inf
inf
inf
inf
inf
inf
2
inf
inf
1
inf
inf
inf
1
inf
inf
inf
9
inf
inf
inf
1
inf
inf
4
1
inf
inf
8
inf
2
inf
inf
inf
inf
inf
784
1
inf...

result:

ok 100 tokens

Test #30:

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

input:

100
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
...

output:

9
2
inf
inf
inf
inf
inf
8
1
162
inf
inf
inf
inf
inf
inf
inf
2
inf
4
1
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
64
49
inf
inf
inf
inf
inf
inf
inf
1
2
inf
inf
1
inf
inf
16
inf
2
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
1
2
inf
inf
inf
inf
inf
8
9
inf
inf
inf
1
inf
inf
inf
1
882
inf
4
inf
inf
i...

result:

ok 100 tokens

Test #31:

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

input:

100
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
...

output:

1
inf
inf
8
1
inf
inf
inf
9
inf
inf
inf
inf
2
inf
4
inf
inf
inf
inf
inf
2
inf
inf
1
inf
inf
32
1
inf
inf
4
inf
inf
inf
72
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
1
18
inf
inf
inf
inf
inf
inf
961
2
inf
4
1
inf
inf
968
inf
2
inf
inf
inf
inf
inf
16
1
inf
inf
196
9
inf
inf
inf
1
2
inf
...

result:

ok 100 tokens

Extra Test:

score: 0
Extra Test Passed