QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#690087#8188. Halve & MergeqiuzxAC ✓421ms9564kbC++202.7kb2024-10-30 20:13:102024-10-30 20:13:10

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 8056kb

input:

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

output:

1

result:

ok 1 number(s): "1"

Test #2:

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

input:

5 7
4 3 5 2 1
2 4
2 1
1 3
1 1
2 4
1 4
1 5

output:

3
1
3
5

result:

ok 4 number(s): "3 1 3 5"

Test #3:

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

input:

2 2
2 1
2 1
1 2

output:

2

result:

ok 1 number(s): "2"

Test #4:

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

input:

25 25
21 20 19 12 11 17 22 16 24 1 13 7 14 9 2 5 8 3 4 23 15 25 18 10 6
2 4
2 11
1 10
1 22
1 8
2 1
1 11
2 10
2 1
1 6
1 11
2 2
1 22
1 21
1 4
1 1
1 12
2 23
2 19
2 4
2 11
1 6
1 19
1 7
1 16

output:

17
25
3
21
5
21
25
13
9
7
20
9
16
2
19

result:

ok 15 numbers

Test #5:

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

input:

50 50
40 46 9 20 17 44 43 11 14 15 25 38 48 36 19 35 23 6 16 30 5 42 47 8 3 2 27 41 31 24 50 4 49 34 37 33 26 32 39 1 29 12 18 10 45 7 13 21 28 22
1 10
2 5
1 18
1 50
1 32
2 29
2 33
1 11
1 31
2 23
1 35
1 3
1 47
2 9
2 13
1 15
2 16
1 46
1 40
2 16
1 22
1 35
2 8
1 16
2 25
1 19
1 12
1 8
2 49
1 17
2 25
1 1...

output:

15
6
22
4
18
48
23
28
31
12
41
42
25
23
40
43
37
33
40
39
37
1
47
11
36
34
17

result:

ok 27 numbers

Test #6:

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

input:

75 75
7 29 18 60 15 31 34 53 43 63 38 54 9 5 50 28 74 68 55 21 67 35 19 8 26 40 47 75 10 56 44 25 52 39 58 3 30 62 64 16 42 1 73 49 45 4 13 66 69 37 32 61 20 57 11 41 65 51 22 24 27 36 12 17 70 48 6 72 14 46 33 59 71 2 23
1 48
1 71
2 43
1 31
1 11
1 4
2 44
2 71
2 21
1 27
1 15
2 6
1 69
1 48
2 57
1 17
...

output:

66
33
51
34
49
37
60
52
72
13
71
33
12
50
43
14
69
71
47
57
17
6
33
15
3
46
63
9
66
7
54
70
41
53
28
27
49
5
40
19
27
14
42
7
24
15
54

result:

ok 47 numbers

Test #7:

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

input:

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

output:

31
42
87
5
34
74
58
32
50
59
28
43
1
46
23
18
4
48
90
35
4
2
98
20
99
32
91
43
22
23
81
66
46
30
22
31
22
21
72
45
95
11
26
6
4
42
53
11
35
45
85
64
2
70
43

result:

ok 55 numbers

Test #8:

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

input:

5000 5000
4273 4131 1283 3216 1735 1507 4834 576 1708 3554 2183 3309 2559 2685 937 4262 3644 459 2106 4310 2101 3240 1764 2671 2532 1241 2443 4283 1578 314 2828 3513 4542 3656 4399 673 1317 4916 2367 110 4406 3410 3661 453 1221 4473 2191 503 2649 3838 4904 1239 120 2027 4443 2546 1012 4360 49 1267 5...

output:

479
3346
4797
3082
3200
1792
2157
383
1090
3223
1162
264
81
154
4643
3418
3526
3445
3142
1105
28
1981
1008
1829
1036
2218
4022
748
1683
1866
1304
1998
4303
4286
3368
3215
1408
3510
1783
3617
2063
4227
3641
4511
465
2018
4018
375
1591
3507
3019
1270
1051
2354
2727
3659
3550
1660
2677
4095
1881
1908
1...

result:

ok 5000 numbers

Test #9:

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

input:

5000 5000
2529 3862 4114 4780 4184 2787 3081 1575 4740 2944 4813 2626 901 4649 518 4782 1180 2166 3693 4678 4795 4194 2308 1442 3087 4467 4016 283 3664 3017 4756 218 3796 888 3715 4251 4698 329 4371 2533 755 1549 4658 3154 3670 1228 2337 1598 1406 3468 2302 2352 4204 1471 3133 2072 4484 767 2152 419...

output:

251
28
4495
4896
1141
4312
1376
4247
3934
1980
1218
423
3810
1573
3229
4363
3820
99
3706
2898
1179
1907
1016
3341
970
3254
3945
782
1557
1350
4618
4651
4503
2924
2366
1646
343
839
1336
3035
1653
3478
681
1140
3403
3182
2598
2953
4960
1717
4244
1824
1578
3194
2413
159
4437
3983
1747
1477
3584
2692
19...

result:

ok 5000 numbers

Test #10:

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

input:

5000 5000
1849 4447 3474 1988 2793 3570 3480 3416 4492 2781 3060 2257 1324 3186 3438 2923 4160 3193 3960 642 2555 4712 3421 4019 4597 4759 1480 2855 601 4782 1993 1253 4471 3737 1936 109 1838 4436 3760 2547 3204 596 87 3370 4704 780 480 1580 3018 3783 2016 1513 1609 2101 4264 919 3386 1843 1486 4024...

output:

3547
2510
3389
1761
2170
536
4664
3173
3428
4495
2321
3913
4849
771
3521
3717
1921
90
4377
3792
3982
1984
1331
895
398
958
744
4336
1571
2905
283
1247
1217
397
2718
3323
2169
3927
2097
2632
3116
3612
2794
1950
4761
4919
3750
1213
125
2343
2993
829
1090
1713
2612
4439
3825
1147
102
1490
1826
1084
144...

result:

ok 5000 numbers

Test #11:

score: 0
Accepted
time: 244ms
memory: 9344kb

input:

200000 200000
179452 184566 70496 25045 45839 40048 152780 4407 43919 144186 96868 104482 96217 61207 142227 165786 26564 9980 22512 90283 87997 159485 151301 130070 192792 194726 169304 28217 69023 192199 108110 53151 69453 55703 102598 39287 85763 193001 104872 74888 53143 159465 199469 145888 374...

output:

93207
9021
71900
82003
153245
113222
25525
32537
148606
165234
125924
45534
88410
188086
54063
29701
49503
66055
140254
130909
183032
64616
98512
114336
197868
33906
187784
150293
61702
100105
19633
108843
194306
43885
187790
188925
199564
195593
2753
73806
100166
59078
36608
92116
25731
161812
6620...

result:

ok 179941 numbers

Test #12:

score: 0
Accepted
time: 182ms
memory: 9272kb

input:

200000 200000
200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960...

output:

84758
22690
194521
5022
86410
138360
59853
21000
146445
129840
46724
93858
178680
194135
73210
132759
33127
190582
105257
51794
165685
125016
38632
105194
90881
199969
115326
28163
22451
21840
194510
113146
85600
25489
71086
119580
78067
39184
32526
118171
68180
76240
175892
64782
160231
70859
12344...

result:

ok 179995 numbers

Test #13:

score: 0
Accepted
time: 169ms
memory: 9564kb

input:

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

output:

129762
118204
20139
111845
177485
89999
133168
116320
128466
39374
169413
82277
119919
146693
79240
24610
162719
181442
160726
182506
46939
19477
39229
105659
114378
80079
66669
131863
131942
181547
92552
22331
151355
91847
13563
138084
192407
159742
138547
73296
24582
107117
135709
185723
123350
12...

result:

ok 180032 numbers

Test #14:

score: 0
Accepted
time: 167ms
memory: 9340kb

input:

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

output:

167031
2441
127126
9513
146467
148262
82286
126756
68387
187679
43394
7255
16555
19110
85468
186382
5467
66573
168021
76513
103417
163500
86075
21300
161513
112015
23656
191588
29444
179201
165035
172436
31666
32003
192339
191493
138196
172722
175540
71660
173143
79993
26118
151940
176813
79321
1623...

result:

ok 179889 numbers

Test #15:

score: 0
Accepted
time: 185ms
memory: 9564kb

input:

200000 200000
500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 42...

output:

169460
140325
152920
154691
32289
106659
614
11726
150310
165749
75209
196234
156633
162387
197113
198080
89920
11591
58026
180567
89990
62353
20957
136005
163635
19534
132122
28171
169495
2214
92146
99350
155416
34182
169579
64678
134942
199439
97443
141066
61367
145032
133827
190792
46227
86102
95...

result:

ok 180028 numbers

Test #16:

score: 0
Accepted
time: 339ms
memory: 9420kb

input:

200000 200000
167000 22333 69778 136014 80748 53945 67197 129431 117636 115752 145623 69609 21458 81635 121160 174051 195086 117171 84533 80565 82356 22818 183426 140146 103589 6050 100582 114171 27825 190738 162789 32685 194490 118044 8679 39249 108970 72167 49381 118664 111629 67447 157896 51360 9...

output:

147311
9135
135319
131487
86609
126469
46494
5425
70320
35072
145414
51972
13693
176549
173442
29000
55191
169457
192221
51694
176514
35497
183414
78079
9852
85057
135897
104694
153427
75778
163192
17838
51946
129083
108651
51650
112278
190034
128265
131877
25722
163417
143941
9532
87378
2014
181406...

result:

ok 99937 numbers

Test #17:

score: 0
Accepted
time: 216ms
memory: 9564kb

input:

200000 200000
200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960...

output:

87707
132102
84050
148974
178467
79535
74903
108706
174111
117487
60084
20911
145011
42657
68886
70342
102983
10304
166733
143386
180258
165226
98597
151774
154408
106423
97395
29512
181570
21790
45086
77611
112722
120902
68075
111853
26163
4278
49842
199
140786
198940
164225
133197
31014
29314
1770...

result:

ok 100168 numbers

Test #18:

score: 0
Accepted
time: 180ms
memory: 9248kb

input:

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

output:

51565
184368
40161
157018
196334
28348
31648
53872
137673
152787
20068
106425
187569
184915
149606
35196
184996
11484
152562
117491
187257
136028
110360
142816
145737
196655
84191
137091
118886
108041
71186
62172
179273
158724
145256
48999
164355
76340
55836
96488
199226
63611
188608
167904
154207
1...

result:

ok 100135 numbers

Test #19:

score: 0
Accepted
time: 174ms
memory: 9340kb

input:

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

output:

151406
180165
147104
21376
48867
49511
136713
36135
152999
54460
145066
114960
95199
137607
81296
134018
150668
60135
1511
11275
112547
169436
41360
177817
11166
82013
28334
111750
60636
185662
46446
98357
150125
2910
183705
101978
30368
164455
48167
148371
42580
94476
143427
96949
130337
19839
1671...

result:

ok 100321 numbers

Test #20:

score: 0
Accepted
time: 223ms
memory: 9272kb

input:

200000 200000
500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 42...

output:

69324
190807
93098
117459
52420
161026
89186
96367
35328
185892
30857
41889
81549
99018
59815
56708
5977
3787
193576
51436
14818
20750
75384
33937
174973
129423
199243
14864
162806
15473
59960
122917
636
170610
717
10830
27455
89072
58199
35001
74008
123829
93016
116856
55800
145174
69366
108051
671...

result:

ok 100134 numbers

Test #21:

score: 0
Accepted
time: 367ms
memory: 9284kb

input:

200000 200000
117195 122588 112594 30950 70254 167442 145510 170926 8727 53072 191218 155982 39098 42702 72476 91138 44374 58295 71215 3356 112580 157848 35986 174458 74403 127570 61103 772 55760 108454 114506 2181 49697 46202 171205 174249 53190 68028 150066 6095 21026 186485 108313 169345 182661 1...

output:

189281
97744
20610
179725
185805
150814
87556
119947
13424
25408
129816
59355
36482
32640
10896
95430
174891
102945
66475
137954
163752
85110
76467
77638
65937
167837
36196
104588
161662
152914
85277
104027
135721
128521
143880
177850
130495
137558
23478
6210
15376
194491
88116
181632
13922
78658
32...

result:

ok 19938 numbers

Test #22:

score: 0
Accepted
time: 233ms
memory: 9344kb

input:

200000 200000
200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960...

output:

96559
16472
112805
41291
27837
36912
119407
184844
48012
27986
41874
68147
122651
53687
164666
171229
139994
135284
45472
104786
185396
107173
65701
197472
119413
100641
143077
54599
119403
99030
23577
46310
136366
25240
133284
13307
156808
145385
78561
179642
112391
79125
67964
175137
172607
193128...

result:

ok 19962 numbers

Test #23:

score: 0
Accepted
time: 177ms
memory: 9416kb

input:

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

output:

92236
37898
116693
62362
81207
197106
82697
149894
184751
88169
62032
90708
151638
131923
134810
181292
148900
88446
161501
100016
164150
165953
133629
154710
23500
46051
183264
121305
195993
187258
65027
123547
119701
177958
45496
20082
43575
137897
162294
173150
8125
47622
113261
81984
113170
1692...

result:

ok 19730 numbers

Test #24:

score: 0
Accepted
time: 180ms
memory: 9352kb

input:

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

output:

154859
111243
52166
69638
31632
103287
131291
70771
29884
59249
90955
135363
40016
172254
44381
123331
10483
94548
78332
58231
71947
151935
30499
121728
74158
188793
43566
25257
43570
43136
113125
6732
169256
128537
86929
105971
152123
140189
61029
195226
44206
143607
160154
49865
189695
1670
70117
...

result:

ok 20051 numbers

Test #25:

score: 0
Accepted
time: 239ms
memory: 9344kb

input:

200000 200000
500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 42...

output:

25210
139045
64301
117627
86158
100949
143836
155789
17016
130725
44802
137050
116581
41219
166333
154630
26057
97839
98622
27139
157113
152331
94021
32798
75447
176251
156669
167789
60661
37432
7155
53363
98811
38700
164223
69663
188595
1912
117920
6492
96185
112410
149924
98593
140773
185332
10013...

result:

ok 20019 numbers

Test #26:

score: 0
Accepted
time: 421ms
memory: 9284kb

input:

200000 200000
117195 122588 112594 30950 70254 167442 145510 170926 8727 53072 191218 155982 39098 42702 72476 91138 44374 58295 71215 3356 112580 157848 35986 174458 74403 127570 61103 772 55760 108454 114506 2181 49697 46202 171205 174249 53190 68028 150066 6095 21026 186485 108313 169345 182661 1...

output:

191582
53163
88128
51903
16679
18822
56562
28025
45497
95472
160346
564
21296
68359
197277
121759
82936
95552
135280
184422
162984
168414
54939
123307
37967
161244
96018
58231
159621
90326
10013
137356
90627
163876
154581
41370
75553
153329
145567
131900
19516
31590
140283
37563
6110
35612
193663
29...

result:

ok 20164 numbers

Test #27:

score: 0
Accepted
time: 245ms
memory: 9332kb

input:

200000 200000
200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960...

output:

194970
153590
198068
116234
152033
58458
29454
37152
69093
128122
47400
171959
166845
143351
136108
53972
67717
193072
11743
48525
119620
28597
140322
131288
101108
142573
55282
119810
98952
135452
27221
133111
10654
157701
145668
171284
118806
1230
24850
149469
186905
83020
77827
152351
71104
44001...

result:

ok 19882 numbers

Test #28:

score: 0
Accepted
time: 180ms
memory: 9284kb

input:

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

output:

66695
1727
36269
144607
54030
138332
85930
93321
60838
112201
13126
181503
136994
199855
2579
68655
41762
26134
106122
144621
189428
65406
188751
53043
99884
155890
158773
148050
61724
76567
122746
143953
194642
9202
38843
103688
18634
27421
172596
187264
151655
10544
5449
55956
189964
123791
132050...

result:

ok 20118 numbers

Test #29:

score: 0
Accepted
time: 177ms
memory: 9340kb

input:

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

output:

113563
89977
142935
97894
54656
103244
192486
153131
155468
109650
104526
95158
183182
35905
192297
125488
188792
50629
197881
102455
49542
118877
89974
26187
27728
164327
47650
191678
95235
79111
130908
71306
144862
58035
84797
175972
47791
155641
128570
39958
152970
190625
66795
22127
184165
14182...

result:

ok 19916 numbers

Test #30:

score: 0
Accepted
time: 255ms
memory: 9276kb

input:

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

output:

95519
150724
70326
22898
3234
67530
161478
66321
143490
179229
117595
167801
34577
63172
189273
131990
38866
60475
2103
97573
61535
198621
126089
108804
90755
90510
21133
21907
146122
52928
135243
153233
133086
166450
103709
7903
153526
186338
16149
188985
193199
124366
55287
160347
148022
78439
179...

result:

ok 19948 numbers

Test #31:

score: 0
Accepted
time: 249ms
memory: 9248kb

input:

200000 200000
5000 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4...

output:

94942
85041
48477
59378
110167
185615
188328
124747
141542
169102
40869
26928
101945
89286
48972
59117
130554
86627
37928
185778
123592
59407
50245
169077
103202
133870
14975
56752
71702
65869
172190
180028
13133
67393
1444
81258
60432
35560
90269
122815
167987
41469
134393
87238
146112
44919
92540
...

result:

ok 19877 numbers

Test #32:

score: 0
Accepted
time: 239ms
memory: 9348kb

input:

200000 200000
5000 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4...

output:

89051
167231
175518
50141
69624
136759
166230
75611
112100
6934
141286
70821
31636
67546
160381
58764
174726
156540
121512
126403
13384
69370
1680
103055
18618
16508
190383
91107
78052
194879
172518
32904
79818
199534
61080
44853
168002
178792
67514
58246
47740
188216
87049
38599
29171
196544
113970...

result:

ok 99983 numbers

Test #33:

score: 0
Accepted
time: 195ms
memory: 9308kb

input:

200000 200000
5000 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4...

output:

28955
113481
78655
184817
65093
98762
9205
102223
9984
176601
57156
25532
68109
3594
8655
93181
141791
28351
69018
78819
76938
175163
24343
169682
131409
156162
107225
139982
31111
100470
120451
104536
79982
145464
120314
162083
119115
180277
35662
22801
97712
65421
138140
8201
189055
140712
87726
9...

result:

ok 179777 numbers

Test #34:

score: 0
Accepted
time: 412ms
memory: 9268kb

input:

200000 200000
200000 173712 196057 87910 169876 145257 98247 199604 175190 86311 187273 49834 158873 156248 104503 182054 134590 132906 188796 163335 109597 72044 142097 9281 180156 177222 108280 14886 119661 184232 178729 32204 17342 108342 41000 93151 34601 26756 19097 15462 16174 82163 22334 1436...

output:

144676

result:

ok 1 number(s): "144676"

Test #35:

score: 0
Accepted
time: 417ms
memory: 9268kb

input:

200000 200000
200000 115727 190774 197045 170177 76889 48986 195605 193609 174437 99297 136832 107507 33676 3620 13648 84462 51512 171549 165764 155824 20728 52954 101715 148281 95958 38983 30769 35782 65692 37226 60488 146112 123018 121346 108790 141798 140416 84435 70341 6751 13434 62060 80868 766...

output:

45233
1792
191870
184361
27898
70226
107948
131115
163875
121857
127222
104373
78975
195848
76707
95252
56712
176131
130955
55305
167465
189669
151271
34808
181520
7583
192119
185118
189417
193612
49049
46599
105125
7082
148058
177929
100552
103205
104481
42403
109992
69161
101563
111
25730
111634
1...

result:

ok 66687 numbers

Test #36:

score: 0
Accepted
time: 421ms
memory: 9304kb

input:

200000 200000
200000 69272 117601 57523 99811 87082 14225 61151 84310 115695 79003 6704 2309 4113 102326 109982 106450 161289 95326 22853 43264 51677 75514 26907 36233 41404 54157 71676 90480 24287 54632 88084 37608 44539 20746 1969 3209 3631 72473 11779 5597 1511 5 141544 152474 145453 104047 15518...

output:

40364
16406
51805
139353
125530
171957
107529
130447
131278
191660
74110
40192
19381
11759
124727
178969
39080
45348
177693
35958
39383
74578
85337
22697
24380
6439
30608
49337
96333
13916
104828
53484
51657
131383
30127
31620
153145
43673
66331
146039
184024
199359
127080
56501
175535
12910
23498
1...

result:

ok 99974 numbers

Test #37:

score: 0
Accepted
time: 408ms
memory: 9356kb

input:

200000 200000
200000 140435 120092 137395 17428 101335 193675 154134 57463 115783 121103 193212 188714 193049 137745 67181 118207 140864 35527 124515 93104 106515 111657 179224 18454 142458 168049 178785 122128 132366 192038 58162 164212 196426 189342 91898 131027 1492 295 549 1476 86669 176525 1902...

output:

5456
67084
25204
69514
192106
190243
84336
133996
173841
99172
73706
187572
38717
94875
68081
58649
28960
181597
177413
4277
106616
192292
77194
175860
99443
2649
100567
48236
42220
184401
128387
82474
122650
91810
176342
134937
125108
197935
54240
40480
94379
111652
64704
27653
47980
5014
120725
16...

result:

ok 119880 numbers

Test #38:

score: 0
Accepted
time: 413ms
memory: 9532kb

input:

200000 200000
200000 111107 49746 77379 18209 19017 25937 37710 72528 14597 39601 5212 21842 29605 42110 85572 148952 152540 187753 194059 178172 184469 191607 196716 190297 149750 159057 167000 113686 53051 54669 27235 27484 38177 51561 63773 75900 84841 140467 36534 73992 89090 159151 127704 15050...

output:

70328
12539
124681
81989
11141
58924
95418
74495
144837
76039
69800
92573
93190
131442
140815
175043
3823
106148
79498
44699
121144
193475
22363
151849
16238
42312
161758
110699
131070
144335
11234
121813
33004
149240
141843
95764
118492
13388
113328
1791
54917
1623
194903
169841
160077
156530
21370...

result:

ok 149944 numbers

Test #39:

score: 0
Accepted
time: 407ms
memory: 9336kb

input:

200000 200000
200000 199788 199978 183946 191214 73054 167232 71179 90484 105757 130670 141355 143430 154256 163773 168601 170611 193221 196950 199763 141993 53867 112904 131054 137270 166531 45075 45812 62735 86818 98716 103371 147223 155262 181433 185011 189719 191079 26664 82141 97983 106169 1074...

output:

173692
59015
155796
158152
105616
99986
85704
79495
91092
129353
6798
31497
41904
195755
8931
23454
140709
74627
43371
45907
8730
45410
174032
181120
131140
56184
25730
17946
111365
87868
9154
89073
131946
12433
28139
102521
73668
1977
31789
46414
198866
339
17460
86164
83669
75716
136031
143626
160...

result:

ok 163608 numbers

Test #40:

score: 0
Accepted
time: 353ms
memory: 9340kb

input:

200000 200000
200000 199913 199915 199918 199925 199935 199936 199937 199940 199946 194091 195613 195773 195986 197127 197724 197904 197937 198059 198411 198416 198456 198581 198812 185269 189444 191724 192300 193063 193700 194178 194301 194859 196202 196261 196316 196400 196431 196896 197065 197653...

output:

186352
138054
168352
75643
30194
83012
17209
51593
185803
95200
189747
76263
54097
150878
75006
79158
166406
153787
186039
35534
148108
20751
191373
17072
102521
15655
150385
87021
135221
31868
4338
109414
52102
132436
86836
31089
110833
70906
63318
77917
136871
59506
181103
178834
140796
1906
12056...

result:

ok 195989 numbers