QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#761679#964. Excluded Min5toubun_no_hanayomeAC ✓1512ms169524kbC++146.3kb2024-11-19 08:44:222024-11-19 08:44:22

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 11ms
memory: 106400kb

input:

3 3
0 0 2
1 3
2 3
3 3

output:

3
1
0

result:

ok 3 number(s): "3 1 0"

Test #2:

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

input:

3 2
1 2 2
1 2
1 3

output:

0
3

result:

ok 2 number(s): "0 3"

Test #3:

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

input:

10 10
3 0 3 3 9 7 9 6 0 7
3 3
9 9
4 6
1 9
3 4
2 4
7 10
3 7
5 7
2 7

output:

0
1
0
5
0
1
1
0
0
1

result:

ok 10 numbers

Test #4:

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

input:

10 10
3 0 0 0 5 1 1 1 2 1
1 2
8 8
5 7
1 7
2 2
1 5
5 6
4 6
3 10
6 8

output:

1
0
2
7
1
4
0
2
8
3

result:

ok 10 numbers

Test #5:

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

input:

100 100
15 82 7 39 63 55 64 99 71 63 32 99 67 94 3 43 15 75 45 55 53 4 35 36 15 40 82 20 62 43 6 83 27 95 27 45 98 44 35 98 39 7 17 32 76 7 40 16 40 63 13 8 22 27 11 12 61 14 19 45 100 97 90 88 22 59 25 63 4 25 65 16 22 92 84 44 99 66 89 26 93 97 35 97 92 1 32 40 97 97 78 43 7 12 23 53 61 74 33 90
1...

output:

68
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
48
0
0
0
0
0
0
0
0
0
0
0
0
0
28
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

result:

ok 100 numbers

Test #6:

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

input:

100 100
17 86 33 8 11 27 8 11 13 9 3 43 11 23 26 42 44 12 44 12 15 0 75 51 72 5 49 2 40 57 24 47 39 42 4 5 6 52 3 2 42 19 62 33 24 22 16 69 4 33 44 70 29 11 2 2 58 9 6 10 25 10 33 26 17 3 14 0 48 7 48 51 0 39 54 37 14 9 3 85 18 4 25 9 2 0 39 8 17 13 25 45 10 39 12 18 9 5 66 6
13 89
10 90
42 67
43 52...

output:

76
80
0
0
18
1
18
1
5
5
1
1
22
11
0
15
0
59
5
56
1
80
0
1
1
21
0
61
22
11
0
3
8
15
40
1
8
81
71
20
2
0
60
0
60
31
0
59
0
0
0
28
0
21
1
7
5
0
31
0
76
28
0
0
27
1
23
0
1
27
1
0
0
1
0
5
63
52
2
43
73
1
86
0
61
0
27
2
30
5
31
1
0
14
59
27
1
1
67
63

result:

ok 100 numbers

Test #7:

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

input:

100 100
6 1 1 5 13 11 35 5 3 2 0 4 0 9 1 2 3 3 19 1 7 9 7 11 7 8 10 18 28 17 31 2 4 8 2 3 3 2 22 4 9 4 7 2 9 15 8 2 3 19 5 24 3 10 11 5 9 20 8 4 11 10 18 9 13 34 5 34 2 9 24 6 21 16 6 12 26 2 2 2 6 11 2 14 3 8 2 12 2 19 8 3 18 23 5 21 23 8 4 0
44 67
25 74
24 79
59 73
4 81
42 66
48 55
15 38
35 63
16 ...

output:

22
50
56
0
78
23
0
22
29
24
38
37
17
57
0
6
0
58
52
4
64
44
0
37
75
75
34
89
0
4
0
12
39
0
0
69
53
14
38
13
36
30
0
7
46
83
28
6
44
22
40
50
24
26
36
49
0
0
6
49
27
78
0
37
11
49
16
50
25
30
37
58
64
28
62
36
0
52
0
95
34
4
50
17
0
27
44
0
0
21
44
66
69
0
39
25
0
2
63
0

result:

ok 100 numbers

Test #8:

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

input:

100 100
0 1 0 1 0 1 1 1 0 2 1 1 2 0 1 1 0 3 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 1 0 0 1 2 0 0 1 0 0 3 0 1 0 0 3 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 2 0 0 0 4 0 1 1 0 1 0 2 2 0 0 1
41 53
31 36
78 99
60 86
1 67
3 92
89 92
60 70
42 56
42 46
39 84
40 66
9 27
75 78
33 94
17 53...

output:

13
6
22
27
67
90
3
11
15
5
46
27
19
4
62
37
84
35
53
4
47
95
55
63
24
39
22
51
67
21
55
36
24
16
33
74
4
16
63
81
41
14
3
54
6
40
36
33
29
32
14
60
13
17
73
44
34
2
14
79
59
13
75
72
31
10
22
57
23
37
74
2
6
6
38
5
4
62
66
22
33
0
23
21
12
54
75
6
8
16
37
36
3
53
63
18
67
60
31
19

result:

ok 100 numbers

Test #9:

score: 0
Accepted
time: 380ms
memory: 112336kb

input:

300000 300000
216504 101790 177261 84423 215788 67188 170620 125383 222808 149722 190483 152974 27524 172557 109218 201761 138030 177265 270417 244027 29296 13565 108388 270622 75102 137755 134081 21988 249714 268911 178911 39288 197287 232628 152784 226739 40134 213404 230781 181323 235763 55745 44...

output:

1
3
0
0
1
1
0
11
0
0
3
1
0
0
1
1
0
0
0
0
3
0
1
1
1
1
1
1
0
0
0
0
0
1
1
13
0
0
0
11
0
1
1
1
3
0
1
1
0
0
0
0
0
0
1
0
0
0
3
0
13
1
1
14
3
0
0
1
0
0
1
1
1
1
0
0
3
0
1
0
0
3
1
1
0
0
0
3
0
0
1
1
0
1
1
0
1
0
0
1
1
0
0
1
1
1
0
1
0
1
1
1
1
0
0
0
0
11
1
0
0
0
13
0
0
3
0
1
0
1
0
0
1
0
3
0
3
1
0
0
0
1
1
13
1
1
...

result:

ok 300000 numbers

Test #10:

score: 0
Accepted
time: 673ms
memory: 111832kb

input:

300000 300000
59375 140115 159075 154436 141196 15338 197722 158230 143168 29542 129520 24443 86025 174147 79007 72481 119436 30645 76347 16689 86494 58226 52030 12421 82352 104631 29663 109785 14534 15981 14386 116251 72729 63907 160568 62881 49823 131557 73658 36095 152983 102029 30197 8451 6637 5...

output:

178459
3302
1
1
0
0
116568
0
184096
0
275466
0
176260
1
1
235740
1
0
224495
212359
151327
10
164683
0
122505
84233
244352
12836
205269
29938
21548
128221
1
0
1
1
258766
189984
224975
7
12935
0
79823
0
217416
193250
204170
178196
37490
0
1
0
8
156975
174553
0
92490
1
7
151697
1
164
0
213287
1
186571
...

result:

ok 300000 numbers

Test #11:

score: 0
Accepted
time: 799ms
memory: 110136kb

input:

300000 300000
13382 6122 36036 1752 43260 20658 29295 6934 24163 15277 26525 3000 90431 1780 14895 33643 79181 20791 14941 28678 20366 24408 26713 14036 58649 36147 56859 26178 20143 57439 6852 19586 38748 41652 986 22368 46087 20998 9508 42052 26443 17946 53822 1630 16047 4410 26131 6783 10049 8204...

output:

0
0
74615
230263
49091
155785
40039
245512
9
87064
215692
108066
41690
76887
0
47929
13625
94648
116990
2
1
146674
0
234901
48458
37669
2
206305
210550
0
2
136250
0
73532
241430
23763
94113
243203
271759
10704
2
193100
156845
153922
265442
0
121742
97647
133440
170932
107307
87796
149291
261163
0
81...

result:

ok 300000 numbers

Test #12:

score: 0
Accepted
time: 832ms
memory: 108940kb

input:

300000 300000
693 15101 2105 3132 2823 4511 312 5151 69 3220 112 15836 5686 4016 4747 7996 97 304 8236 6602 413 818 2294 542 1239 1977 8768 3788 919 2330 651 507 6511 21404 1242 6052 1027 472 1046 608 2891 399 507 7798 4523 1092 94 255 7123 2493 2675 16852 1300 932 639 14840 665 2793 877 969 3090 17...

output:

108218
242349
72761
127143
151481
169916
95612
70846
31733
210337
90038
184672
27459
181773
26560
93495
0
108954
147314
69487
104909
176794
24826
76628
18027
181289
196727
202345
132323
789
24765
104826
19945
58405
276481
32405
21870
5852
108034
162998
24368
77991
134070
10340
79673
54012
18248
0
86...

result:

ok 300000 numbers

Test #13:

score: 0
Accepted
time: 229ms
memory: 114840kb

input:

400000 400000
84329 284144 8196 328223 350667 119044 61607 111375 149099 295090 191250 2984 2837 7919 395586 118583 79852 220759 93838 163172 170285 111947 348858 76246 158367 325491 360832 23094 345883 64402 68588 38489 36833 25877 388546 240645 163753 282542 293242 288593 205050 193517 232308 2769...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 400000 numbers

Test #14:

score: 0
Accepted
time: 840ms
memory: 113092kb

input:

400000 400000
18486 122948 4137 14655 54438 228799 295881 106438 50815 201228 52969 237859 125326 12791 261129 91102 64978 32041 132228 85743 210398 120735 187473 249388 27933 19782 179803 111622 103176 341 26733 1933 135306 165570 269738 1527 215310 172587 51120 22514 261669 158503 184320 91539 986...

output:

0
62201
4
0
12
1
149330
153206
264801
137132
277605
0
17
191339
83865
92939
144238
185422
259663
0
0
116466
461
0
91
143227
0
0
2
0
153978
20
0
12
235071
133168
0
85
191321
0
0
72798
0
0
262584
191216
0
270135
2307
5
328156
290867
0
0
104005
12
235848
0
0
0
65
0
0
0
140246
0
116243
0
0
179579
82742
...

result:

ok 400000 numbers

Test #15:

score: 0
Accepted
time: 1162ms
memory: 110852kb

input:

400000 400000
4230 8875 14228 68140 13626 5962 49017 7168 40307 13812 1964 8548 36045 5418 8513 22358 42641 44547 14800 34379 7176 20841 15146 4959 27352 66386 1982 72275 15171 38548 5215 16247 15759 14047 101799 39722 51238 20202 23684 5307 3884 2280 23172 23320 39097 2227 48427 23097 1262 23346 33...

output:

39692
115006
66652
174773
248161
147529
163061
55249
2
276174
24001
331244
201834
278983
56324
208994
260118
199479
152056
141187
82281
1
67141
306318
203228
184782
229826
169471
118739
0
199767
363451
0
351932
0
74373
167703
71598
207200
166071
26722
271364
195830
113466
281136
182903
383788
101561...

result:

ok 400000 numbers

Test #16:

score: 0
Accepted
time: 1191ms
memory: 109328kb

input:

400000 400000
8349 3356 2462 5033 3722 9245 1515 14134 2785 1049 7271 3160 1932 4886 707 4013 1703 1740 5150 6756 2242 864 808 3715 2459 560 2100 74 1323 1191 5196 243 6096 224 4749 1599 4253 2181 674 3239 2183 1064 494 611 1290 2518 4893 2511 1646 4480 5308 7227 1251 8801 2856 2438 6038 4149 2111 1...

output:

254539
332051
348302
337539
264574
26680
108859
369802
354144
271555
6761
74689
134044
84380
336750
318514
92694
258364
177509
185374
267641
11499
120477
114594
81129
119715
12622
246956
7044
172251
146211
53586
160423
328652
86713
120234
1
332759
44517
94408
114688
59086
53329
2852
52545
56392
2411...

result:

ok 400000 numbers

Test #17:

score: 0
Accepted
time: 722ms
memory: 116992kb

input:

500000 500000
429640 265052 139201 292952 485277 448373 374047 197183 296565 140106 191815 352449 300184 342644 482687 114114 22085 463647 438259 4048 411430 387773 110813 182238 41281 490781 87834 201747 340347 359872 235681 415850 376481 396340 244935 32773 286463 50453 255957 96096 252296 331225 ...

output:

1
1
2
2
0
2
2
2
2
2
0
0
2
0
0
0
2
2
0
2
2
0
0
2
2
0
1
0
0
2
0
2
2
0
0
2
2
1
0
2
2
2
0
2
2
0
2
2
0
0
0
2
0
2
2
2
2
0
0
0
1
2
2
0
2
2
2
0
2
2
0
2
0
2
1
0
0
2
2
0
2
2
0
0
0
2
0
0
2
2
0
0
0
0
0
2
0
0
0
2
2
1
0
2
0
0
2
2
2
2
2
0
2
0
1
0
2
0
0
1
2
2
0
0
2
0
0
2
2
2
0
2
1
0
1
0
0
0
0
0
2
2
0
2
1
2
0
2
0
2
...

result:

ok 500000 numbers

Test #18:

score: 0
Accepted
time: 1240ms
memory: 115008kb

input:

500000 500000
5725 157618 64996 264238 267278 196465 62175 89532 15951 21320 23855 328926 232774 80785 69805 79388 175390 20192 82113 32337 55183 274348 56420 52599 282952 65277 165300 46296 206192 195128 259738 315588 19569 111775 54460 139992 72869 211874 58044 2989 617 101150 298817 22966 52931 1...

output:

446066
4
226526
262427
437573
130451
0
1
16
0
94
0
0
2
0
4
14
0
0
1
224520
0
346334
2
182195
360994
1
87499
1
17
4
0
1630
343063
324057
24
214524
0
4
181833
140
256273
0
214115
250601
1
311213
0
25460
25
0
3
0
12823
15428
0
303420
0
9
0
169417
0
0
386174
169779
201231
32545
1
1
290278
17
3
4
1
1
0
1...

result:

ok 500000 numbers

Test #19:

score: 0
Accepted
time: 1443ms
memory: 112248kb

input:

500000 500000
16788 17513 15418 29588 7650 50342 68083 29239 20538 64439 22061 76938 46644 3395 55467 22820 29548 144558 42916 3445 34972 68788 83097 88105 97320 68759 28612 7143 21440 93849 44159 116268 26393 29155 10485 14825 49113 41058 12572 6815 34329 11535 103471 58915 865 4738 182770 11615 29...

output:

91091
467368
279048
207098
109657
141629
22
1
223300
256257
228280
0
315800
144994
0
157691
19730
0
151054
136438
207204
200227
51140
402378
87294
1
168352
91843
379635
13
309249
179987
306693
165609
291902
120630
91493
172086
84004
44
194741
260598
119272
98807
119439
59637
74443
12299
42999
177110...

result:

ok 500000 numbers

Test #20:

score: 0
Accepted
time: 1512ms
memory: 110388kb

input:

500000 500000
3982 813 2681 7659 4600 140 3798 638 22083 7960 5159 557 12256 5585 3694 2076 5431 4702 3618 6771 6557 811 8694 272 4341 7370 10177 1863 1778 17993 1548 15914 5686 581 300 7742 139 5953 79 13349 1262 2099 399 2174 7277 4965 2455 9603 7215 7652 10625 5698 1026 3608 8877 12822 2271 5782 ...

output:

303558
14819
165361
343659
191337
197830
186178
20053
239149
278903
229029
358762
184215
19821
185307
216443
283932
111968
243118
54411
120285
467364
460740
151349
253040
4527
214772
29510
135326
347884
129611
32117
180215
5059
198854
150642
184715
58566
330785
84813
26773
39593
126003
237675
145143...

result:

ok 500000 numbers

Test #21:

score: 0
Accepted
time: 19ms
memory: 108352kb

input:

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

output:

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

result:

ok 30000 numbers

Test #22:

score: 0
Accepted
time: 52ms
memory: 111228kb

input:

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

output:

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

result:

ok 50000 numbers

Test #23:

score: 0
Accepted
time: 81ms
memory: 118144kb

input:

100000 100000
0 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 9...

output:

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

result:

ok 100000 numbers

Test #24:

score: 0
Accepted
time: 214ms
memory: 132020kb

input:

200000 200000
0 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 9...

output:

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

result:

ok 200000 numbers

Test #25:

score: 0
Accepted
time: 254ms
memory: 144532kb

input:

300000 300000
0 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 9...

output:

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

result:

ok 300000 numbers

Test #26:

score: 0
Accepted
time: 471ms
memory: 156688kb

input:

400000 400000
0 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 9...

output:

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

result:

ok 400000 numbers

Test #27:

score: 0
Accepted
time: 440ms
memory: 169336kb

input:

500000 500000
0 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 9...

output:

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

result:

ok 500000 numbers

Test #28:

score: 0
Accepted
time: 598ms
memory: 169524kb

input:

500000 500000
0 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 9...

output:

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

result:

ok 500000 numbers

Test #29:

score: 0
Accepted
time: 82ms
memory: 107780kb

input:

100000 56279
53160 71963 47079 62788 32389 61447 81717 45453 77549 46397 18066 93998 2500 35522 18204 8293 75363 54916 67831 55341 19427 85719 24033 59109 11799 18751 51683 77900 44827 18258 76715 80155 34171 25296 724 94794 56411 40806 78994 78258 35213 52697 92751 37963 23118 66251 57756 2168 8637...

output:

0
81
19
0
67
0
0
0
0
0
0
0
81
0
0
0
0
0
0
0
0
16
0
105
0
0
0
0
0
0
0
255
0
0
0
11
0
0
0
0
0
140
0
0
0
16
0
0
0
0
0
0
0
0
0
0
23
24
17
0
0
0
12
0
0
70
23
0
0
0
0
23
0
11
0
0
19
0
0
0
0
12
20
17
11
67
0
20
19
0
17
0
0
0
0
23
0
0
20
0
0
0
141
20
12
0
0
0
0
65
19
23
19
19
0
23
19
0
0
0
11
0
17
103
0
17
...

result:

ok 56279 numbers

Test #30:

score: 0
Accepted
time: 144ms
memory: 108296kb

input:

100000 56279
3092 4156 7293 3603 8192 1887 8403 2200 8396 32698 300 15000 5485 4525 1008 14928 2261 12871 6337 6883 12311 8154 18250 15846 11127 36679 40681 19800 24580 1936 6279 41952 13606 6637 1251 9025 4148 12389 17345 17640 22773 1912 23697 12964 2784 37638 42883 205 4510 7792 15617 25807 11821...

output:

940
78887
61895
4
77686
16886
8453
40420
30140
0
37743
0
81895
5656
28092
11239
0
1
10235
14842
102
50586
1
84899
25124
13905
34886
13307
11
0
29269
91801
17408
1322
3
41840
18378
0
0
2
24
91201
25880
8973
0
56006
5590
0
86
0
16769
260
0
42139
0
0
73169
75882
59407
43907
20253
2
52470
32154
47268
73...

result:

ok 56279 numbers

Test #31:

score: 0
Accepted
time: 203ms
memory: 107232kb

input:

100000 100000
11420 23608 54161 27284 6493 19312 39122 34358 4434 8409 32082 37414 21920 42810 39079 58151 14086 6814 17674 324 26070 11080 19439 3393 13093 30993 6705 7052 16961 2938 59280 22017 13021 30081 9312 3461 21144 31008 34466 12524 61486 3796 9683 7702 15129 13200 3918 1260 2739 43619 677 ...

output:

36194
44852
1
18149
589
45366
0
67635
1
0
18916
1
105
36212
1
0
13
77383
23
29209
0
0
0
21384
0
20418
0
1118
0
36983
0
59784
0
36070
54379
54
4
11
49080
67068
2867
170
19013
0
21952
31773
57310
219
31684
10000
55386
0
49330
3
46484
19164
16369
34934
32304
0
2
79751
32603
16
33629
53518
39042
27666
6...

result:

ok 100000 numbers

Test #32:

score: 0
Accepted
time: 313ms
memory: 110120kb

input:

200000 200000
44294 42242 5425 120962 102223 194807 124118 17631 171550 19750 105170 70369 126528 13819 166312 59665 22710 75350 148843 68641 132876 125385 166366 66486 103986 117490 123561 190283 15576 19561 166876 156936 113170 35727 8882 100996 94902 133022 194466 83479 33843 75006 175708 67506 2...

output:

0
2
0
1
329
1
1
0
1
1
0
0
1
0
0
13
0
1
1
0
3
13
8
1
1
0
1
3
0
0
3
3
10
0
8
14
0
1
3
3
0
1
8
0
0
8
0
4
0
14
0
11
0
1
8
1
0
1
1
0
3
8
11
0
1
1
0
1
0
0
0
1
0
10
0
0
2
0
0
2
10
0
0
1
0
1
0
2
0
1
1
1
1
1
8
1
8
3
0
0
0
1
8
8
1
1
1
502
0
371
1
0
0
9
8
1
8
1
1
1
1
0
0
0
1
1
0
0
3
0
2
1
0
0
0
1
1
0
4
0
1
1
0...

result:

ok 200000 numbers

Test #33:

score: 0
Accepted
time: 483ms
memory: 108056kb

input:

200000 200000
37050 23095 8101 10621 6855 7123 2489 36470 23912 15791 9163 3808 36237 5548 7763 49 6006 636 20560 7402 11713 7268 24432 2847 11701 13418 1610 17328 40291 1918 2490 88444 18730 13105 50 11764 15877 4628 7362 18389 18823 11584 13236 43955 9745 1829 58884 7350 11075 11907 16778 19832 94...

output:

18268
143401
87441
92005
184501
116694
100154
39371
60351
93812
0
20683
107379
20668
0
171001
81029
112188
1004
0
63243
174901
125995
81652
32325
0
118193
48277
40107
20
59336
59991
148501
0
133497
179101
77966
36711
75809
88373
42662
13662
157201
0
34645
128396
1
75814
77652
178201
30967
128396
403...

result:

ok 200000 numbers

Test #34:

score: 0
Accepted
time: 655ms
memory: 117056kb

input:

500000 500000
334972 440108 237541 474470 262183 19416 471112 18896 54681 391096 396993 282901 479723 111608 197403 464493 491149 55626 376194 389537 323171 1656 234471 334590 291696 401021 289295 376493 163697 55612 223933 45606 394077 287726 50428 39800 300923 267743 5571 427171 5361 200125 400338...

output:

0
1
0
0
0
2
0
0
0
1
29
0
0
0
0
0
27
0
2
0
0
2
0
7
2
22
0
0
0
0
1
0
2
0
0
0
1
0
0
0
1
0
7
0
27
2
0
0
0
0
0
7
0
0
0
0
0
0
0
0
0
0
34
22
0
0
0
0
0
0
0
0
0
0
0
25
0
0
0
1
0
1
0
0
0
1
440
0
27
7
0
0
2
1
0
0
0
0
0
0
0
0
0
0
0
30
0
1
0
0
0
1
0
0
1
0
30
0
2
0
1
2
0
0
1
0
343
0
1
0
0
0
0
0
0
0
0
7
0
0
1
26
0...

result:

ok 500000 numbers

Test #35:

score: 0
Accepted
time: 1333ms
memory: 113200kb

input:

500000 500000
191473 150719 112349 37750 4115 38305 72580 83506 133814 15875 103065 57191 94144 24411 160769 96013 49730 89291 78118 92745 26140 93068 91569 16675 80292 12335 1536 15899 8328 70550 62064 94319 1823 227487 1221 137095 51968 2656 3579 112889 67561 48213 61768 2412 46734 47014 47234 945...

output:

15
250787
0
188095
374907
228670
218377
7
1
109034
399879
218337
224485
56
178000
150995
407985
0
226654
175775
284982
147812
4563
301803
169502
388751
6
25637
124522
1
318457
80900
70091
332523
8
0
364060
0
390
201699
103967
8
281208
301165
398977
228017
0
0
15045
0
39453
294041
7276
0
30540
221460...

result:

ok 500000 numbers

Test #36:

score: 0
Accepted
time: 1286ms
memory: 112288kb

input:

500000 500000
50741 18134 65548 19483 65028 14602 41391 145669 19378 48486 36971 45703 35803 18595 37434 174278 79042 12169 170125 63790 9920 3215 17943 33539 80234 66487 40175 42517 33335 116368 46512 239683 5653 36190 1299 1049 71262 62974 35240 12931 37476 66058 94577 11287 20904 19077 51261 2026...

output:

0
272462
214575
14
345001
193121
249383
45
221662
447501
60548
147872
30
67742
0
97
59182
123472
38
222664
12
2
213
271966
381501
0
394501
42246
461001
394001
149468
0
46028
79549
30588
298995
7928
269457
0
24039
187
217102
303493
69964
331501
34762
171828
130141
0
303494
122093
75593
6077
329500
47...

result:

ok 500000 numbers

Test #37:

score: 0
Accepted
time: 775ms
memory: 111592kb

input:

500000 256685
61530 121654 14521 45522 502 31140 71410 42659 32939 6700 10050 3329 29386 86294 5319 81417 61614 40401 21675 4022 6466 792 37284 5690 13698 8385 26906 39910 24392 44026 873 28903 20461 30231 668 17290 46125 44831 2340 15027 25158 14287 2419 12362 6695 12063 5507 18359 49822 4185 4469 ...

output:

165628
767
117362
287000
140648
204358
258294
32766
245694
326201
269497
60600
319201
244991
212760
357001
288401
95333
0
233786
9204
36409
76874
119491
50303
158532
45519
63281
394101
181170
82548
54060
211360
204344
181131
167027
31805
86663
46286
412301
388501
223270
279298
354201
158569
207154
1...

result:

ok 256685 numbers

Test #38:

score: 0
Accepted
time: 510ms
memory: 111324kb

input:

500000 125750
2717 42287 16271 30962 27703 15285 19392 16334 23315 1245 34330 1371 1406 160 23247 5424 17993 30856 18476 38321 6908 7369 19715 36848 133 21467 12055 34696 6138 14316 17689 23372 14558 37875 9398 12711 17688 4101 39976 19922 1160 12534 11943 31945 19174 10737 14012 28504 18812 21195 4...

output:

242001
165001
299001
164001
78
468000
217001
71512
334001
87979
215001
118001
26
420001
374001
124001
8
83946
136001
85975
222001
44304
79879
150001
137001
125001
113001
74705
35406
177001
32587
86982
90994
232001
232001
223001
82951
125001
85974
38480
87983
127001
71542
191001
171001
256001
58104
1...

result:

ok 125750 numbers

Test #39:

score: 0
Accepted
time: 1161ms
memory: 109772kb

input:

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

output:

35901
131101
11701
110401
449401
130601
141801
295701
235901
79301
234901
324301
177301
406601
113101
103501
55001
492701
177801
230201
118001
91601
353201
257201
89701
371001
270101
171401
80701
241101
227601
174101
50001
223201
57501
97101
231101
172301
252601
339601
183701
157301
206601
173001
12...

result:

ok 500000 numbers

Test #40:

score: 0
Accepted
time: 969ms
memory: 106960kb

input:

500000 500000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

79501
254701
60301
199801
375001
234601
225601
53701
30001
141301
399901
225601
231001
75901
191701
170701
408001
12601
232801
189901
286801
168301
84601
303001
184801
388801
17401
94801
151501
29401
319201
123901
117301
333001
35101
16201
364201
45601
78601
211201
138001
45001
283201
302401
399001
...

result:

ok 500000 numbers

Test #41:

score: 0
Accepted
time: 1004ms
memory: 109448kb

input:

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

output:

79501
254701
60301
199801
375001
234601
225601
53701
30001
141301
399901
225601
231001
75901
191701
170701
408001
12601
232801
189901
286801
168301
84601
303001
184801
388801
17401
94801
151501
29401
319201
123901
117301
333001
35101
16201
364201
45601
78601
211201
138001
45001
283201
302401
399001
...

result:

ok 500000 numbers

Test #42:

score: 0
Accepted
time: 999ms
memory: 109820kb

input:

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

output:

3071
272501
215001
25501
345001
194001
249501
33001
222001
447501
80001
151001
37501
85001
14501
38001
79001
129001
35501
223001
33001
27501
43501
272001
381501
1381
394501
68001
461001
394001
152501
1801
70501
93501
61001
299001
48501
269501
15001
58001
40501
217501
303501
86501
331501
63501
173501...

result:

ok 500000 numbers

Test #43:

score: 0
Accepted
time: 456ms
memory: 111844kb

input:

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

output:

165901
0
119001
287001
141401
204401
258301
0
245701
326201
269501
0
319201
245001
212801
357001
288401
22101
0
233801
0
0
48701
121101
57801
158901
0
38101
394101
181301
0
0
211401
204401
181301
167301
2201
0
0
412301
388501
223301
279301
354201
158901
207201
170801
277901
0
238001
0
356301
287001
...

result:

ok 256685 numbers

Test #44:

score: 0
Accepted
time: 347ms
memory: 110284kb

input:

500000 125750
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14394 15 16 17 18 19 12976 21 22 23 24 25 26 27 28 29 30 31 5326 33 34 35 36 37 38 39 40 41 42 43 44 45 46 11157 48 49 50 51 52 53 54 55 1146 9456 58 59 60 61 9024 63 64 65 66 67 68 69 70 71 72 73 74 6997 76 77 78 79 80 81 82 83 84 85 14340 87 88 89 1004...

output:

242001
165001
299001
164001
21001
468000
217001
72001
334001
88001
215001
118001
22001
420001
374001
124001
18001
84001
136001
86001
222001
49001
80001
150001
137001
125001
113001
75001
43001
177001
41001
87001
91001
232001
232001
223001
83001
125001
86001
45001
88001
127001
72001
191001
171001
2560...

result:

ok 125750 numbers

Test #45:

score: 0
Accepted
time: 349ms
memory: 109864kb

input:

500000 125750
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4329 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 2407 81 82 83 84 85 86 87 88 89 90 91 92 93 94 3681 96...

output:

242001
165001
299001
164001
21001
468000
217001
72001
334001
88001
215001
118001
22001
420001
374001
124001
18001
84001
136001
86001
222001
49001
80001
150001
137001
125001
113001
75001
43001
177001
41001
87001
91001
232001
232001
223001
83001
125001
86001
45001
88001
127001
72001
191001
171001
2560...

result:

ok 125750 numbers

Test #46:

score: 0
Accepted
time: 631ms
memory: 116452kb

input:

500000 500000
50000 50001 50002 50003 50004 50005 50006 50007 50008 50009 50010 50011 50012 50013 50014 50015 50016 50017 50018 50019 50020 50021 50022 50023 50024 50025 50026 50027 50028 50029 50030 50031 50032 50033 50034 50035 50036 50037 50038 50039 50040 50041 50042 50043 50044 50045 50046 5004...

output:

0
20000
0
0
389401
40000
0
177101
0
0
105700
186201
99101
383501
0
5101
0
472701
80400
121401
0
0
272201
0
0
301001
170101
0
0
0
120000
0
10000
3701
0
30000
0
110000
130000
247900
120000
70300
0
0
0
0
0
0
156901
0
90700
120000
110000
0
17500
0
0
80000
237501
0
290401
0
0
150000
0
0
110000
0
240000
4...

result:

ok 500000 numbers

Test #47:

score: 0
Accepted
time: 460ms
memory: 117052kb

input:

500000 500000
357789 354459 209291 42802 235212 430234 258316 47323 308567 403280 394337 479522 197662 18366 205187 96095 490008 389442 16922 58329 259551 82281 122593 251737 261425 235639 200622 96115 377729 131579 467121 309313 11214 131193 386160 360902 102146 151100 96506 91713 299674 144415 428...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
148
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 500000 numbers

Test #48:

score: 0
Accepted
time: 274ms
memory: 117048kb

input:

500000 500000
389990 389991 389992 389993 389994 389995 389996 389997 389998 389999 390000 390001 390002 390003 390004 390005 390006 390007 390008 390009 390010 390011 390012 390013 390014 390015 390016 390017 390018 390019 390020 390021 390022 390023 390024 390025 390026 390027 390028 390029 390030...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 500000 numbers

Test #49:

score: 0
Accepted
time: 368ms
memory: 116936kb

input:

500000 500000
445445 445446 445447 445448 445449 445450 445451 445452 445453 445454 445455 445456 445457 445458 445459 445460 445461 445462 445463 445464 445465 445466 445467 445468 445469 445470 445471 445472 445473 445474 445475 445476 445477 445478 445479 445480 445481 445482 445483 445484 445485...

output:

0
0
0
0
141230
0
0
0
0
173210
0
0
0
0
0
0
0
0
0
0
0
0
0
0
145741
0
154716
0
185185
150240
0
0
0
0
0
0
0
0
0
0
0
0
94225
0
0
0
0
0
0
0
0
0
0
140140
174196
0
95095
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
90796
0
0
0
90090
0
0
0
0
0
0
0
0
155155
115115
0
0
0
0
96661
0
0
0
0
155155
0
0
97280
9...

result:

ok 500000 numbers

Test #50:

score: 0
Accepted
time: 209ms
memory: 116508kb

input:

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

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 256685 numbers

Test #51:

score: 0
Accepted
time: 274ms
memory: 117224kb

input:

500000 125750
384384 384385 384386 384387 384388 384389 384390 384391 384392 384393 384394 384395 384396 384397 384398 40250 384400 384401 384402 384403 384404 384405 384406 384407 384408 384409 100729 384411 384412 384413 384414 384415 384416 384417 384418 384419 384420 384421 384422 384423 384424 ...

output:

0
48
108
0
0
7148
37
0
113
37
0
30
0
4354
557
37
0
0
0
0
37
0
37
48
0
0
30
0
0
37
0
0
0
63
37
48
0
37
0
0
0
0
0
48
0
70
0
0
37
0
0
0
0
0
0
70
0
0
0
0
491
6932
0
0
0
6461
37
665
0
0
0
0
48
0
30
0
0
0
0
108
30
113
63
37
30
108
0
37
48
37
37
0
113
30
0
0
113
0
48
48
30
0
48
113
0
0
0
0
0
113
610
113
0
...

result:

ok 125750 numbers

Test #52:

score: 0
Accepted
time: 206ms
memory: 116940kb

input:

500000 125750
205712 205713 205714 205715 205716 205717 205718 205719 205720 205721 205722 205723 205724 205725 205726 205727 205728 205729 205730 205731 205732 205733 205734 336674 205736 205737 205738 205739 205740 205741 205742 205743 205744 205745 205746 205747 205748 205749 205750 205751 205752...

output:

0
0
0
0
0
40543
0
0
0
0
0
0
0
30912
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
0
0
0
0
0
2
0
0
0
0
2
0
0
0
0
0
0
0
89
0
0
0
0
0
0
0
0
33395
0
0
0
33371
0
30831
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
7057
0
344
0
0
330
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
33228
0
0
89
33251
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 125750 numbers

Test #53:

score: 0
Accepted
time: 720ms
memory: 134284kb

input:

500000 500000
599 899 1199 1499 1799 2099 2399 2699 2999 3299 3599 3899 4199 4499 4799 5099 5399 5699 5999 6299 6599 6899 7199 7499 7799 8099 8399 8699 8999 9299 9599 9899 10199 10499 10799 11099 11399 11699 11999 12299 12599 12899 13199 13499 13799 14099 14399 14699 14999 15299 15599 15899 16199 16...

output:

299
299
299
299
299
0
0
299
299
299
0
299
0
299
299
0
0
299
299
0
299
299
299
299
0
299
0
299
299
299
299
0
0
299
0
0
299
299
299
299
299
299
299
299
0
299
299
0
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
0
299
0
299
299
299
299
0
299
299
0
29...

result:

ok 500000 numbers

Test #54:

score: 0
Accepted
time: 743ms
memory: 136212kb

input:

500000 500000
999 1499 1999 2499 2999 3499 3999 4499 4999 5499 5999 6499 6999 7499 7999 8499 8999 9499 9999 10499 10999 11499 11999 12499 12999 13499 13999 14499 14999 15499 15999 16499 16999 17499 17999 18499 18999 19499 19999 20499 20999 21499 21999 22499 22999 23499 23999 24499 24999 25499 25999 ...

output:

0
499
499
499
499
0
0
499
499
499
0
499
0
499
499
0
0
499
499
0
499
499
499
499
0
499
0
499
499
499
499
0
0
499
0
0
499
499
499
499
499
499
499
499
0
0
499
0
499
499
499
499
499
499
0
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
0
0
499
0
499
499
499
499
0
499
499
0
0
499
0
0
...

result:

ok 500000 numbers

Test #55:

score: 0
Accepted
time: 737ms
memory: 137788kb

input:

500000 500000
1399 2099 2799 3499 4199 4899 5599 6299 6999 7699 8399 9099 9799 10499 11199 11899 12599 13299 13999 14699 15399 16099 16799 17499 18199 18899 19599 20299 20999 21699 22399 23099 23799 24499 25199 25899 26599 27299 27999 28699 29399 30099 30799 31499 32199 32899 33599 34299 34999 35699...

output:

0
699
699
699
699
0
0
699
699
699
0
699
0
699
0
0
0
699
0
0
699
699
699
0
0
699
0
0
699
0
699
0
0
699
0
0
699
699
699
699
699
699
0
699
0
0
699
0
699
699
699
699
699
699
0
699
699
699
699
0
699
699
699
699
699
699
699
699
699
699
699
699
0
0
699
0
699
699
699
699
0
699
699
0
0
699
0
0
699
699
699
69...

result:

ok 500000 numbers

Test #56:

score: 0
Accepted
time: 714ms
memory: 138836kb

input:

500000 500000
999 1499 1999 2499 2999 3499 3999 4499 4999 5499 5999 6499 6999 7499 7999 8499 8999 9499 9999 10499 10999 11499 11999 12499 12999 13499 13999 14499 14999 15499 15999 16499 16999 17499 17999 18499 18999 19499 19999 20499 20999 21499 21999 22499 22999 23499 23999 24499 24999 25499 25999 ...

output:

499
0
0
499
0
0
0
499
499
0
499
499
499
499
0
499
499
499
499
499
499
0
499
0
0
0
0
499
0
0
0
499
499
499
499
0
499
0
499
499
499
0
0
0
0
0
0
0
0
0
0
499
499
0
0
0
499
499
0
499
499
0
499
499
0
499
499
499
0
0
499
0
0
0
0
0
0
499
499
0
0
0
499
499
0
499
499
0
0
0
499
499
0
499
0
0
0
0
499
499
0
0
0
...

result:

ok 500000 numbers

Test #57:

score: 0
Accepted
time: 686ms
memory: 141684kb

input:

500000 500000
1399 2099 2799 3499 4199 4899 5599 6299 6999 7699 8399 9099 9799 10499 11199 11899 12599 13299 13999 14699 15399 16099 16799 17499 18199 18899 19599 20299 20999 21699 22399 23099 23799 24499 25199 25899 26599 27299 27999 28699 29399 30099 30799 31499 32199 32899 33599 34299 34999 35699...

output:

699
0
0
699
0
0
0
699
0
0
699
0
699
0
0
699
699
0
699
699
0
0
0
0
0
0
0
0
0
0
0
0
699
699
699
0
699
0
699
699
699
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
699
0
699
0
0
699
699
0
0
0
699
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
699
0
699
0
0
0
0
0
699
0
699
0
0
0
0
0
699
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
699
0
...

result:

ok 500000 numbers

Test #58:

score: 0
Accepted
time: 671ms
memory: 145812kb

input:

500000 500000
1399 2099 2799 3499 4199 4899 5599 6299 6999 7699 8399 9099 9799 10499 11199 11899 12599 13299 13999 14699 15399 16099 16799 17499 18199 18899 19599 20299 20999 21699 22399 23099 23799 24499 25199 25899 26599 27299 27999 28699 29399 30099 30799 31499 32199 32899 33599 34299 34999 35699...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
269
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
501
0
...

result:

ok 500000 numbers

Test #59:

score: 0
Accepted
time: 670ms
memory: 134472kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

299
299
299
299
299
0
0
299
299
299
0
299
0
299
299
0
0
299
299
0
299
299
299
299
0
299
0
299
299
299
299
0
0
299
0
0
299
299
299
299
299
299
299
299
0
299
299
0
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
0
299
0
299
299
299
299
0
299
299
0
29...

result:

ok 500000 numbers

Test #60:

score: 0
Accepted
time: 657ms
memory: 135936kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

0
499
499
499
499
0
0
499
499
499
0
499
0
499
499
0
0
499
499
0
499
499
499
499
0
499
0
499
499
499
499
0
0
499
0
0
499
499
499
499
499
499
499
499
0
0
499
0
499
499
499
499
499
499
0
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
0
0
499
0
499
499
499
499
0
499
499
0
0
499
0
0
...

result:

ok 500000 numbers

Test #61:

score: 0
Accepted
time: 637ms
memory: 137716kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

0
699
699
699
699
0
0
699
699
699
0
699
0
699
0
0
0
699
0
0
699
699
699
0
0
699
0
0
699
0
699
0
0
699
0
0
699
699
699
699
699
699
0
699
0
0
699
0
699
699
699
699
699
699
0
699
699
699
699
0
699
699
699
699
699
699
699
699
699
699
699
699
0
0
699
0
699
699
699
699
0
699
699
0
0
699
0
0
699
699
699
69...

result:

ok 500000 numbers

Test #62:

score: 0
Accepted
time: 602ms
memory: 138936kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

499
0
0
499
0
0
0
499
499
0
499
499
499
499
0
499
499
499
499
499
499
0
499
0
0
0
0
499
0
0
0
499
499
499
499
0
499
0
499
499
499
0
0
0
0
0
0
0
0
0
0
499
499
0
0
0
499
499
0
499
499
0
499
499
0
499
499
499
0
0
499
0
0
0
0
0
0
499
499
0
0
0
499
499
0
499
499
0
0
0
499
499
0
499
0
0
0
0
499
499
0
0
0
...

result:

ok 500000 numbers

Test #63:

score: 0
Accepted
time: 554ms
memory: 141360kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

699
0
0
699
0
0
0
699
0
0
699
0
699
0
0
699
699
0
699
699
0
0
0
0
0
0
0
0
0
0
0
0
699
699
699
0
699
0
699
699
699
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
699
0
699
0
0
699
699
0
0
0
699
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
699
0
699
0
0
0
0
0
699
0
699
0
0
0
0
0
699
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
699
0
...

result:

ok 500000 numbers

Test #64:

score: 0
Accepted
time: 523ms
memory: 145800kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
269
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
501
0
...

result:

ok 500000 numbers

Test #65:

score: 0
Accepted
time: 718ms
memory: 122724kb

input:

500000 500000
599 899 1199 1499 1799 2099 2399 2699 2999 3299 3599 3899 4199 4499 4799 5099 5399 5699 5999 6299 6599 6899 7199 7499 7799 8099 8399 8699 8999 9299 9599 9899 10199 10499 10799 11099 11399 11699 11999 12299 12599 12899 13199 13499 13799 14099 14399 14699 14999 15299 15599 15899 16199 16...

output:

299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
...

result:

ok 500000 numbers

Test #66:

score: 0
Accepted
time: 721ms
memory: 124392kb

input:

500000 500000
999 1499 1999 2499 2999 3499 3999 4499 4999 5499 5999 6499 6999 7499 7999 8499 8999 9499 9999 10499 10999 11499 11999 12499 12999 13499 13999 14499 14999 15499 15999 16499 16999 17499 17999 18499 18999 19499 19999 20499 20999 21499 21999 22499 22999 23499 23999 24499 24999 25499 25999 ...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #67:

score: 0
Accepted
time: 725ms
memory: 126148kb

input:

500000 500000
1399 2099 2799 3499 4199 4899 5599 6299 6999 7699 8399 9099 9799 10499 11199 11899 12599 13299 13999 14699 15399 16099 16799 17499 18199 18899 19599 20299 20999 21699 22399 23099 23799 24499 25199 25899 26599 27299 27999 28699 29399 30099 30799 31499 32199 32899 33599 34299 34999 35699...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #68:

score: 0
Accepted
time: 738ms
memory: 127144kb

input:

500000 500000
999 1499 1999 2499 2999 3499 3999 4499 4999 5499 5999 6499 6999 7499 7999 8499 8999 9499 9999 10499 10999 11499 11999 12499 12999 13499 13999 14499 14999 15499 15999 16499 16999 17499 17999 18499 18999 19499 19999 20499 20999 21499 21999 22499 22999 23499 23999 24499 24999 25499 25999 ...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #69:

score: 0
Accepted
time: 625ms
memory: 129788kb

input:

500000 500000
1399 2099 2799 3499 4199 4899 5599 6299 6999 7699 8399 9099 9799 10499 11199 11899 12599 13299 13999 14699 15399 16099 16799 17499 18199 18899 19599 20299 20999 21699 22399 23099 23799 24499 25199 25899 26599 27299 27999 28699 29399 30099 30799 31499 32199 32899 33599 34299 34999 35699...

output:

699
699
699
699
699
699
699
699
0
0
699
0
699
0
699
699
699
0
699
699
0
0
0
699
0
699
0
0
0
699
0
0
699
699
699
699
699
0
699
699
699
699
699
0
0
699
0
699
699
699
0
0
699
699
0
699
0
699
699
699
0
699
699
699
699
0
0
699
699
0
699
0
0
699
0
699
0
0
0
699
0
699
0
699
699
699
0
699
0
699
0
699
0
699
...

result:

ok 500000 numbers

Test #70:

score: 0
Accepted
time: 456ms
memory: 134100kb

input:

500000 500000
1399 2099 2799 3499 4199 4899 5599 6299 6999 7699 8399 9099 9799 10499 11199 11899 12599 13299 13999 14699 15399 16099 16799 17499 18199 18899 19599 20299 20999 21699 22399 23099 23799 24499 25199 25899 26599 27299 27999 28699 29399 30099 30799 31499 32199 32899 33599 34299 34999 35699...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
69...

result:

ok 500000 numbers

Test #71:

score: 0
Accepted
time: 753ms
memory: 122820kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
...

result:

ok 500000 numbers

Test #72:

score: 0
Accepted
time: 763ms
memory: 124328kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #73:

score: 0
Accepted
time: 773ms
memory: 125832kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #74:

score: 0
Accepted
time: 767ms
memory: 126876kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #75:

score: 0
Accepted
time: 596ms
memory: 129868kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

699
699
699
699
699
699
699
699
0
0
699
0
699
0
699
699
699
0
699
699
0
0
0
699
0
699
0
0
0
699
0
0
699
699
699
699
699
0
699
699
699
699
699
0
0
699
0
699
699
699
0
0
699
699
0
699
0
699
699
699
0
699
699
699
699
0
0
699
699
0
699
0
0
699
0
699
0
0
0
699
0
699
0
699
699
699
0
699
0
699
0
699
0
699
...

result:

ok 500000 numbers

Test #76:

score: 0
Accepted
time: 360ms
memory: 134096kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
699
0
0
0
0
69...

result:

ok 500000 numbers

Test #77:

score: 0
Accepted
time: 766ms
memory: 134604kb

input:

500000 500000
300 600 900 1200 1500 1800 2100 2400 2700 3000 3300 3600 3900 4200 4500 4800 5100 5400 5700 6000 6300 6600 6900 7200 7500 7800 8100 8400 8700 9000 9300 9600 9900 10200 10500 10800 11100 11400 11700 12000 12300 12600 12900 13200 13500 13800 14100 14400 14700 15000 15300 15600 15900 1620...

output:

299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
...

result:

ok 500000 numbers

Test #78:

score: 0
Accepted
time: 815ms
memory: 136052kb

input:

500000 500000
500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500 10000 10500 11000 11500 12000 12500 13000 13500 14000 14500 15000 15500 16000 16500 17000 17500 18000 18500 19000 19500 20000 20500 21000 21500 22000 22500 23000 23500 24000 24500 25000 25500 ...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #79:

score: 0
Accepted
time: 853ms
memory: 137572kb

input:

500000 500000
700 1400 2100 2800 3500 4200 4900 5600 6300 7000 7700 8400 9100 9800 10500 11200 11900 12600 13300 14000 14700 15400 16100 16800 17500 18200 18900 19600 20300 21000 21700 22400 23100 23800 24500 25200 25900 26600 27300 28000 28700 29400 30100 30800 31500 32200 32900 33600 34300 35000 3...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #80:

score: 0
Accepted
time: 866ms
memory: 138520kb

input:

500000 500000
500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500 10000 10500 11000 11500 12000 12500 13000 13500 14000 14500 15000 15500 16000 16500 17000 17500 18000 18500 19000 19500 20000 20500 21000 21500 22000 22500 23000 23500 24000 24500 25000 25500 ...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #81:

score: 0
Accepted
time: 954ms
memory: 141648kb

input:

500000 500000
700 1400 2100 2800 3500 4200 4900 5600 6300 7000 7700 8400 9100 9800 10500 11200 11900 12600 13300 14000 14700 15400 16100 16800 17500 18200 18900 19600 20300 21000 21700 22400 23100 23800 24500 25200 25900 26600 27300 28000 28700 29400 30100 30800 31500 32200 32900 33600 34300 35000 3...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #82:

score: 0
Accepted
time: 1047ms
memory: 145804kb

input:

500000 500000
700 1400 2100 2800 3500 4200 4900 5600 6300 7000 7700 8400 9100 9800 10500 11200 11900 12600 13300 14000 14700 15400 16100 16800 17500 18200 18900 19600 20300 21000 21700 22400 23100 23800 24500 25200 25900 26600 27300 28000 28700 29400 30100 30800 31500 32200 32900 33600 34300 35000 3...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #83:

score: 0
Accepted
time: 804ms
memory: 134576kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
...

result:

ok 500000 numbers

Test #84:

score: 0
Accepted
time: 804ms
memory: 135972kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #85:

score: 0
Accepted
time: 836ms
memory: 137652kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #86:

score: 0
Accepted
time: 880ms
memory: 138960kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers

Test #87:

score: 0
Accepted
time: 887ms
memory: 141500kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #88:

score: 0
Accepted
time: 989ms
memory: 145756kb

input:

500000 500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
699
...

result:

ok 500000 numbers

Test #89:

score: 0
Accepted
time: 765ms
memory: 146064kb

input:

500000 500000
500000 499999 499998 499997 499996 499995 499994 499993 499992 499991 499990 499989 499988 499987 499986 499985 499984 499983 499982 499981 499980 499979 499978 499977 499976 499975 499974 499973 499972 499971 499970 499969 499968 499967 499966 499965 499964 499963 499962 499961 499960...

output:

299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
299
...

result:

ok 500000 numbers

Test #90:

score: 0
Accepted
time: 750ms
memory: 146080kb

input:

500000 500000
500000 499999 499998 499997 499996 499995 499994 499993 499992 499991 499990 499989 499988 499987 499986 499985 499984 499983 499982 499981 499980 499979 499978 499977 499976 499975 499974 499973 499972 499971 499970 499969 499968 499967 499966 499965 499964 499963 499962 499961 499960...

output:

499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
499
...

result:

ok 500000 numbers