QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#41381#4401. Prizesmax100 ✓2091ms404180kbC++233.0kb2022-07-30 04:29:202022-07-30 04:29:22

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 989ms
memory: 254132kb

input:

500000 64682 64681 100000
46115
470589
209303
2979
473162
343535
79503
299539
404621
102085
237721
279170
392890
165201
441593
456314
218991
358478
86614
410800
159785
169761
95368
285837
297549
370283
378974
26449
444381
39320
149913
404523
144109
174828
263837
49847
468694
478535
152644
216598
301...

output:

422989 414496 290928 388223 160563 301045 470257 259625 222733 231286 345214 169817 435263 277447 386014 210139 455433 225855 264772 199736 355788 288506 233893 146148 454958 267562 498596 183745 352665 151125 266374 43142 9414 204593 212097 311775 25324 300764 6643 94847 396968 428563 311355 255767...

result:

ok good job!

Test #2:

score: 0
Accepted
time: 1051ms
memory: 255472kb

input:

500000 90967 90966 100000
122547
312039
290084
118442
352297
175176
294396
496975
127062
90539
132654
408480
493670
419897
53432
141795
264165
60368
473480
5634
253119
64236
85346
422987
28583
262389
111931
271291
13577
415079
132797
256502
76402
265607
11274
289667
398726
32021
302401
410650
369760...

output:

3090 193269 3028 186608 498475 64618 82114 231445 7541 329983 134623 235591 70401 18906 403427 280451 146897 355174 160090 144279 193430 332022 488244 228900 80781 84465 218682 27818 6035 368489 155673 440755 443926 241570 193717 143661 374105 56616 323329 95909 337798 20531 236329 28564 437244 4969...

result:

ok good job!

Test #3:

score: 0
Accepted
time: 1003ms
memory: 222608kb

input:

500000 68287 68286 100000
273928
229768
65518
144983
311611
494773
489379
439644
467893
456131
430188
247387
485565
272285
474827
476962
338340
365804
344570
390867
390170
456217
43185
447057
385874
305750
107742
230530
259907
252254
280920
16831
45761
185191
117450
55891
175190
255615
35904
14855
2...

output:

242387 146602 170589 196742 270393 272971 277513 290951 335954 339454 343790 360585 408863 410420 416115 435584 462604 475865 106115 141534 208403 209977 237211 239423 262337 296002 322708 452430 483541 74367 118980 156994 257460 419650 336953 360548 369080 222228 264307 433002 210925 330758 346781 ...

result:

ok good job!

Test #4:

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

input:

500000 63976 63975 100000
230132
63748
303785
13497
431672
370351
360004
412191
378555
409703
485802
218204
475692
27602
220794
398856
89157
166559
116145
350738
277404
196706
40307
118602
171802
378360
389092
485168
224465
383516
33147
322617
254917
274019
57283
272241
216098
421952
489927
75641
40...

output:

210552 1449 107945 111424 204315 244893 252875 260986 300480 376032 453571 480811 497883 40773 118404 168162 204997 217368 256288 293187 301850 320642 393149 424098 438104 82457 99285 197733 238722 270472 298802 448813 478712 134521 193706 216617 225182 402014 434002 110514 134779 140337 206218 2111...

result:

ok good job!

Test #5:

score: 0
Accepted
time: 1034ms
memory: 225816kb

input:

500000 87673 87672 100000
151599
456749
347511
703
348209
260440
488627
416030
419890
408089
83617
120781
133411
374231
460689
211838
137587
252914
392401
321583
55161
335205
334340
4527
14086
142229
197076
17695
262896
258702
273353
51181
10968
366799
324067
299421
281975
7236
420627
92324
299845
1...

output:

51300 4033 19229 42291 51583 74889 91845 101922 156054 189433 271298 306341 321237 338533 407800 407895 415653 427525 444649 474491 483318 486608 3297 17686 83949 141292 210462 226340 250587 330387 333267 420201 54995 72768 115579 151338 189275 191069 358089 378821 148934 213901 332993 352617 443599...

result:

ok good job!

Test #6:

score: 0
Accepted
time: 1151ms
memory: 231256kb

input:

500000 77912 77911 100000
270576
129318
366297
25873
179787
473782
221947
331327
209469
412992
410608
286179
37554
355546
297085
420463
496948
223036
122019
151250
478469
468136
19073
318549
398897
364415
23730
407160
26064
436939
30150
336421
375149
131841
58480
259944
117641
414831
64311
336164
31...

output:

210887 26617 47747 65697 66936 111706 450513 209286 394458 330203 400826 372367 31977 188117 451749 243217 243665 490312 377213 17878 400064 451432 326862 393825 482110 79427 338802 25540 420037 427346 463407 343913 166743 374407 365280 324697 419374 203244 461047 50003 96053 191816 119601 246607 14...

result:

ok good job!

Test #7:

score: 0
Accepted
time: 1114ms
memory: 230128kb

input:

500000 77688 77687 100000
433011
472346
395389
187114
436024
138403
189990
398859
136147
195283
331183
46789
19828
335128
387768
442181
65556
72327
318927
462834
421288
227912
37067
387794
145879
258896
185861
356020
202881
490952
443694
95413
137215
137239
112863
481338
167802
304239
309781
391976
...

output:

176419 131882 292285 412347 35390 329939 362286 381302 111814 156219 373863 151412 9722 429048 172713 204978 273121 20522 237666 311400 297105 443479 290480 237978 358105 376930 474574 326538 492305 172116 390969 157831 223728 34874 85371 24933 163517 347566 217598 426614 62652 222554 310810 419414 ...

result:

ok good job!

Test #8:

score: 0
Accepted
time: 1133ms
memory: 229544kb

input:

500000 70973 70972 100000
449081
8094
7358
89457
426121
454508
470543
485236
63347
441977
422774
88672
243638
499709
170209
157788
229166
106888
228931
289706
435222
496384
381579
323479
499140
1511
385050
44171
413854
248273
352221
305112
24289
277461
391744
395003
85800
396455
355110
186446
285096...

output:

449195 92100 139432 170991 324408 359470 431734 453335 131622 396138 62857 262646 18454 494280 516 248742 268964 246698 365411 49116 205579 441872 268796 478761 494550 118545 212775 270875 135573 466197 434345 228269 238351 328689 52558 54000 308679 406044 73730 344036 113837 58520 429984 164637 287...

result:

ok good job!

Test #9:

score: 0
Accepted
time: 935ms
memory: 222564kb

input:

500000 66403 66402 100000
297237
432967
138046
88503
315699
372893
55309
335404
127581
165919
247543
254268
285147
289728
275281
44427
94393
302830
489861
429097
425153
11083
439096
414157
386411
152968
394984
46119
149177
369378
413029
198215
134317
366218
281170
465540
39702
367778
247925
64320
86...

output:

294428 15990 17602 26152 111146 152620 178549 183834 238198 242546 321012 339735 346708 376658 413417 417544 452229 473786 60747 77238 79427 104166 114904 115479 131820 179383 250265 263956 267255 271077 297839 351735 354076 356662 387161 392460 409205 444258 450844 145593 169170 317852 361618 40460...

result:

ok good job!

Test #10:

score: 0
Accepted
time: 953ms
memory: 223772kb

input:

500000 82328 82327 100000
280281
366446
183709
14447
442815
440473
121531
103568
472324
479656
337467
424742
474404
340302
269686
457628
230012
484228
422877
10759
156759
66102
130428
307888
123685
460634
235321
98667
93133
489886
479420
34961
352500
322001
129001
121871
135775
235639
100221
221760
...

output:

185494 36690 75237 90854 133402 145889 181174 187429 212224 294313 337250 368772 463947 481099 87374 138798 246616 456169 460527 13866 37615 56902 208445 213934 226717 250052 324069 421150 445974 9243 230858 300790 339912 360627 385009 436936 58689 99545 110599 182902 257794 315009 341634 402221 426...

result:

ok good job!

Test #11:

score: 0
Accepted
time: 904ms
memory: 221800kb

input:

500000 53948 53947 100000
287984
258934
272973
481182
131565
217198
34714
463056
337977
495727
310042
26372
320480
231799
249741
340990
365501
267377
460708
248843
285777
172137
492784
201463
213559
259528
461602
235849
398717
25475
241699
451061
188952
251790
83551
169967
335575
209367
55705
6381
2...

output:

490646 30912 58228 66900 141370 162271 168493 209420 220299 356934 368448 383176 402234 408329 426848 450187 472144 256224 419416 102019 345445 382142 494560 72417 247314 272686 290707 316488 316528 331074 460961 489786 61238 12765 18976 89792 129110 145977 305883 340153 393563 98854 122766 161729 2...

result:

ok good job!

Test #12:

score: 0
Accepted
time: 1013ms
memory: 225040kb

input:

500000 77935 77934 100000
38748
422564
39441
105430
38474
225464
237519
121832
72613
477531
321661
29181
307418
314049
120252
261006
88761
17726
492112
460837
55199
354114
417097
133271
231933
436973
110894
478550
291976
50101
38774
316091
306160
121826
315769
361823
82990
188508
124574
13093
235123...

output:

423149 92225 92574 136846 180268 180932 192694 225485 232151 258860 261363 263307 278429 288537 359086 371909 399857 432427 456530 477335 497074 16389 166449 184539 292962 381527 471775 8113 24371 136137 201017 210563 479798 19305 41199 159700 176684 262158 278238 17363 182374 283422 51135 162369 17...

result:

ok good job!

Subtask #2:

score: 25
Accepted

Test #13:

score: 25
Accepted
time: 1150ms
memory: 254636kb

input:

500000 88721 177440 100000
30974
23891
211201
125199
180489
387190
218020
498838
230147
307989
484136
257785
353027
304420
311738
169842
334090
486070
126212
328609
174959
368840
238722
418092
488389
226349
427271
457322
332454
12958
197530
264474
355717
482774
221286
282148
216441
266659
213750
628...

output:

63742 11431 300071 157785 268420 71772 84553 267656 174540 21500 451751 82419 58833 165916 94199 78203 263216 146169 306934 50728 338250 199716 469441 135516 133967 123248 375309 17045 459156 413018 49645 73720 188292 322328 493921 152164 219927 140202 236207 266137 180568 32077 371348 66876 354136 ...

result:

ok good job!

Test #14:

score: 0
Accepted
time: 1019ms
memory: 252760kb

input:

500000 50267 100532 100000
68723
142685
445548
215087
478634
201362
177405
373123
227456
161487
276716
452818
230715
466238
250886
368974
77152
493722
129115
154402
319190
170867
27898
338290
170229
428001
62611
19188
164329
435154
128
358453
137653
430592
160391
407392
125236
320137
27945
393135
17...

output:

71019 495557 31730 116065 88378 303281 100690 375513 399886 191425 467776 333920 329290 14772 76952 27872 409419 154816 362396 408615 364034 455915 146139 56273 450037 424683 327232 385588 134811 499210 495342 81995 301341 243738 7518 121857 431344 232635 155628 226209 161465 497460 38422 126619 489...

result:

ok good job!

Test #15:

score: 0
Accepted
time: 1030ms
memory: 224180kb

input:

500000 67604 135206 100000
269046
235003
144646
314602
323547
204450
484229
26672
78499
602
110738
117079
125630
408912
188317
256853
71590
365703
370008
194267
342683
400737
369194
127912
96314
269751
219125
431887
398790
200053
279314
365797
187505
75025
48264
492515
387506
13267
80948
378737
1106...

output:

304557 5586 6636 42912 71664 101299 114759 120173 146621 149822 150901 160942 177329 196673 306329 337562 402073 35015 142984 152276 197274 220830 479358 408887 470924 51245 240462 324738 145716 299772 371829 28815 32783 133870 171466 178128 179512 452341 37841 45562 89423 99659 116507 218908 228337...

result:

ok good job!

Test #16:

score: 0
Accepted
time: 1110ms
memory: 225968kb

input:

500000 90109 180216 100000
153893
273609
184853
157428
466683
457867
343783
259618
87262
260826
466902
41972
482221
496695
293976
300490
455874
320279
314574
128316
280220
2566
383716
351629
219577
29212
26631
73182
458601
318651
105942
60715
392339
265615
387177
110713
319395
336826
483543
70790
36...

output:

215050 19446 40604 54328 58729 78956 126474 206155 214663 230127 251476 285173 303094 330406 378280 493479 24400 98444 122190 196356 288984 310010 20962 65098 88444 323735 344925 351467 485613 137226 172595 172626 437720 9734 99615 114348 139319 161302 167745 169641 195480 223182 226856 229537 27920...

result:

ok good job!

Test #17:

score: 0
Accepted
time: 1018ms
memory: 224604kb

input:

500000 74321 148640 100000
477030
412534
57969
357009
116485
327483
437765
67781
471780
418080
308252
138279
338053
95055
275789
97204
386829
122048
57181
436136
222481
395950
352928
73438
250800
184259
16097
398913
456107
105407
39764
116186
80552
65160
316601
284871
313136
414498
414938
343247
310...

output:

85810 56701 140828 146174 212415 322066 351948 404885 55013 70070 71133 72469 86073 101910 158833 164178 213941 337845 424242 122024 440534 445051 15752 37555 39601 45490 53868 64585 206524 212451 279542 337547 345052 364015 390713 408118 431126 466658 480253 276713 399383 12243 20402 79371 95558 14...

result:

ok good job!

Test #18:

score: 0
Accepted
time: 1112ms
memory: 229572kb

input:

500000 54262 108522 100000
150680
169780
208423
114492
398775
47217
58682
258733
452080
54148
451364
196867
75350
134397
51280
339529
475503
166592
224426
358444
423175
366761
49422
400504
398619
18773
429051
59685
291626
145365
261042
445752
234123
21931
318295
94503
388014
414710
346782
466751
205...

output:

348556 146589 205582 221656 249128 492809 195934 206910 319077 175113 226168 349185 140953 179590 2067 477415 463382 216732 34723 119761 25291 421309 15015 104719 431870 12987 294441 398951 31436 329745 134042 387372 202883 377081 212275 9827 152208 110900 204562 1136 488227 220503 357778 395349 971...

result:

ok good job!

Test #19:

score: 0
Accepted
time: 1276ms
memory: 232960kb

input:

500000 81364 162726 100000
321857
75911
117294
148668
322025
103777
419430
187082
374875
230927
338513
433399
305556
363405
457801
70917
297078
386374
322110
76493
189187
21851
453679
296595
389232
386129
310835
432013
450769
74142
284176
90713
430145
142503
212302
384600
157386
490862
201498
415387...

output:

170008 7720 142119 379154 387737 388339 95069 297454 160377 438979 341476 155114 183857 270016 65202 192505 190447 388001 491157 134067 381828 291771 6304 190035 212236 260044 276457 148999 129861 165561 212793 360660 2631 250251 177381 47615 71057 178382 157019 227398 328371 419342 421994 423887 64...

result:

ok good job!

Test #20:

score: 0
Accepted
time: 1341ms
memory: 232464kb

input:

500000 84343 168684 100000
92159
3025
19095
171545
269452
230103
428411
105653
130154
107687
352956
242321
444883
277419
59579
326919
4318
292812
326242
108917
253600
261383
320680
353469
283662
437811
470379
170617
46289
454830
253014
4165
381169
328908
493243
143442
265851
59330
347945
264421
2460...

output:

17746 18894 180905 262116 291449 292021 397859 326573 473204 177744 230546 463055 54826 82047 131353 339924 56308 117212 450018 161773 196921 459956 297546 114559 93847 361368 9831 206851 394189 62953 263311 435432 31191 282611 12308 359583 473522 375306 388882 374547 407175 439659 24180 336625 6990...

result:

ok good job!

Test #21:

score: 0
Accepted
time: 1182ms
memory: 231516kb

input:

500000 88757 177512 100000
445069
77200
391318
333565
435416
362966
141662
45522
355791
256039
214614
450379
170016
467327
282215
243533
183175
463770
163579
461662
317411
261187
253905
468654
231023
3749
90566
45210
343865
165800
136852
383910
367984
413623
325053
41177
298566
351228
15540
262375
2...

output:

2084 5815 63082 107198 129565 158632 184396 191779 358841 442458 450288 470955 93001 103737 267206 352732 463821 94004 95138 188562 412921 440544 446128 449 16710 41075 95594 115581 168567 207268 254553 276304 367094 380719 397258 469141 60628 98450 371914 480224 483499 185563 164447 194506 310761 3...

result:

ok good job!

Test #22:

score: 0
Accepted
time: 1160ms
memory: 231368kb

input:

500000 96344 192686 100000
195205
422258
407338
9779
476600
35329
336839
237680
366318
378932
386654
353800
118734
312717
156858
133692
72221
189109
391324
145763
38629
330117
404936
68820
255606
431020
392503
176884
178395
275064
488090
130311
314587
217628
462496
28966
425413
116762
437176
468713
...

output:

198418 24971 47481 65271 161964 359791 361016 362251 419045 439209 439941 481152 38227 40624 106976 132372 152048 160855 237988 315212 396031 21140 267195 382643 475776 143538 167641 178517 188084 251663 287474 365258 459435 473149 213029 351646 433528 16318 95940 159911 222862 297122 401220 4203 93...

result:

ok good job!

Test #23:

score: 0
Accepted
time: 1144ms
memory: 229428kb

input:

500000 62967 125932 100000
228958
294130
161634
80333
361275
345422
393334
286611
311452
453264
275215
289266
452502
447517
458518
295775
420774
426985
410788
79249
309720
61573
250760
5587
481312
161015
303445
8961
463259
24340
331413
237498
488929
475822
425952
251105
487129
230062
368282
264038
1...

output:

385478 94041 111997 166724 224751 228866 260510 282876 296484 368886 369728 19393 161843 189395 289387 388663 161493 40160 153993 179989 194267 196715 219520 324595 430536 433827 438372 445300 451974 460100 498069 56770 67241 83300 158709 219738 222205 228027 228468 260054 271812 13108 20656 63315 2...

result:

ok good job!

Test #24:

score: 0
Accepted
time: 1184ms
memory: 231732kb

input:

500000 94830 189658 100000
104237
453576
334546
43320
88991
174623
80118
405142
341990
225030
164655
136865
106241
208562
67332
289772
379828
245569
190369
136859
196296
376390
298773
202031
129266
220643
477229
76909
267607
412545
178338
100575
280161
390719
280691
294766
490870
175723
312546
47683...

output:

468866 45240 139670 158118 164637 214562 253876 308196 365161 394646 476713 482199 46584 123971 193862 287694 303065 376094 379303 483563 27495 62183 101214 117233 140865 182240 204347 219754 298349 324857 398810 434961 52166 186881 280482 85089 150235 293654 367769 412710 144779 159347 226976 23349...

result:

ok good job!

Subtask #3:

score: 19
Accepted

Test #25:

score: 19
Accepted
time: 690ms
memory: 243580kb

input:

500000 200 199 40000
76296
130139
291501
292412
139543
433345
372726
451574
18315
465578
324564
477223
237354
81532
65170
465332
342130
9670
193303
193680
129668
149532
268907
89969
398275
356210
324593
433492
482232
466692
135343
433758
102545
287283
432859
351864
305769
489532
101532
450535
295762...

output:

20242 414878 185020 125537 353357 496468 308518 188057 254952 120898 414314 11748 435424 326112 345902 271794 473882 337923 135188 438050 45188 88306 260313 116954 457474 435919 366460 431766 397351 392326 178950 199724 227083 282259 70917 121346 109196 193669 242154 12225 466790 155481 287973 15749...

result:

ok good job!

Test #26:

score: 0
Accepted
time: 677ms
memory: 242920kb

input:

500000 200 199 40000
83785
150667
304961
267635
97760
385201
77226
6522
352645
72592
427133
30755
100574
359648
403948
394809
425453
115868
11287
351385
494434
245106
58157
395180
326236
277135
359592
13569
76251
45366
172378
122783
216597
466130
284420
342613
471698
380682
92490
79264
241049
54038
...

output:

107095 98656 106791 304190 196877 423284 60540 204253 341441 59196 240332 29151 433366 290562 22079 64655 213528 72009 364851 443801 202553 8696 9763 456384 397249 125804 414847 223082 446791 174 461813 451655 292806 308476 264153 244973 167889 101629 244034 183440 234960 246613 494471 130935 20773 ...

result:

ok good job!

Test #27:

score: 0
Accepted
time: 541ms
memory: 210952kb

input:

500000 200 199 40000
94863
498513
460682
411416
360517
309831
253717
325019
496632
255803
130770
289206
181204
74729
481723
293737
94126
307214
342974
448321
17084
433126
387809
279606
251781
65795
125269
129465
433572
219622
11806
179248
367117
84640
114067
122590
4140
116015
77759
392439
408930
10...

output:

290210 13677 35769 47059 165077 168027 176688 270672 279783 306911 343625 391557 400057 414959 415081 440862 151634 199678 280120 346715 347089 375494 400288 8963 35908 94311 282778 307415 351175 360073 388253 435414 455204 479167 37575 68800 82774 94563 107484 199042 220771 351419 450702 61287 7404...

result:

ok good job!

Test #28:

score: 0
Accepted
time: 507ms
memory: 210892kb

input:

500000 200 199 40000
460896
356428
214577
150748
16877
1635
258267
370689
262538
369939
466845
415822
304104
329494
6035
489031
48344
181107
61121
4048
156120
273134
234110
418870
101454
330401
45460
74853
175589
44170
192108
214802
482345
120910
76381
307448
204387
170471
187255
20694
494550
351800...

output:

262885 26405 33465 109300 177257 239523 331260 366136 385797 37590 108867 135661 316123 410294 444912 448625 59584 215945 253871 268791 316190 339845 353095 393136 94463 108679 114874 203802 293705 316808 424117 432025 480808 56 15562 59412 101559 135825 277921 342707 363522 422294 451322 455357 468...

result:

ok good job!

Test #29:

score: 0
Accepted
time: 531ms
memory: 212136kb

input:

500000 200 199 40000
472275
149661
377034
488618
186507
171592
345983
124571
76807
5855
300138
80553
340257
185587
378146
311401
334561
194922
182638
104826
420776
448537
393232
195734
347470
219413
82586
185915
58528
404731
329285
300479
342445
115864
230618
360114
281628
86760
203158
212935
376440...

output:

356081 2312 5142 17063 68796 124218 164757 176269 207040 210445 236388 237483 250983 375117 413120 430554 17788 42183 89310 212434 224800 243336 319967 362871 384114 5093 32277 69993 121863 141579 213566 276531 355985 486858 15360 45383 47201 86987 240157 267940 285231 319361 331848 392581 16907 104...

result:

ok good job!

Test #30:

score: 0
Accepted
time: 604ms
memory: 219084kb

input:

500000 200 199 40000
457235
436089
312892
490957
247950
207946
50653
437012
325088
141386
319878
207087
398253
383132
11996
402164
409233
443227
294400
242006
327126
10129
244769
232885
165818
291514
332036
352883
406737
63191
380159
208131
327008
61194
18237
223687
413010
160943
426911
162568
18875...

output:

35725 15183 103768 142193 151681 156748 241619 307544 75760 351937 154434 337186 343344 194524 145963 462630 257139 7330 131588 103384 171959 186069 401939 282828 153029 226536 271825 372225 166004 273141 303746 327265 46297 166544 265437 449256 379130 485597 82283 357232 434764 218423 412094 109652...

result:

ok good job!

Test #31:

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

input:

500000 200 199 40000
498222
451076
484997
74171
344510
119552
181399
378715
468521
103237
143923
10760
103036
353626
331913
232159
181090
14984
85005
467731
200014
74750
304897
488094
80862
428792
303440
325833
70112
301252
111208
109820
23216
97480
361786
424164
357979
22040
249278
329701
472798
13...

output:

352301 50228 356177 33442 54227 83927 184774 335718 242991 410874 105746 478655 282065 284118 318234 494185 139187 440527 242743 272019 313856 497489 171779 100050 252784 304506 473379 494637 162619 458685 355976 411506 38102 446292 440095 257752 351579 386968 202564 338308 489690 153916 243324 2785...

result:

ok good job!

Test #32:

score: 0
Accepted
time: 653ms
memory: 219620kb

input:

500000 200 199 40000
235229
335906
185851
155252
476682
68595
44502
499901
403010
120212
365527
365904
165512
445297
44401
416812
282314
301556
484290
469265
250037
184042
387456
226812
371932
410610
263086
279108
442354
371814
37100
77190
202799
118817
250469
478086
307786
11617
132836
304380
25170...

output:

457551 33120 164955 290894 292076 348991 310606 409181 333664 121606 215704 256615 495421 429337 415023 285951 314619 493051 199707 414483 483873 273848 291088 411774 74615 39651 374861 47465 92053 236892 447138 454153 199386 240655 402888 468407 474057 421805 77165 483798 80 331242 381356 109132 16...

result:

ok good job!

Test #33:

score: 0
Accepted
time: 562ms
memory: 216688kb

input:

500000 200 199 40000
27113
326978
70968
474916
390195
217639
467929
292659
58323
454399
169213
185253
114409
287912
251420
281315
94695
326310
237316
424237
79688
285918
43312
65978
450176
255930
425562
242907
198847
77977
135410
122795
349710
416624
428899
314932
135513
464911
286182
28508
268649
1...

output:

99685 14630 89362 115217 133486 142120 156418 223484 263734 352805 352881 379086 419699 432969 438351 453894 25308 27427 71547 144381 146110 185536 340190 449218 14614 132192 174093 241111 241632 444679 97517 321276 398944 442345 215381 215788 358921 401545 2607 51799 110783 129365 152534 157241 173...

result:

ok good job!

Test #34:

score: 0
Accepted
time: 594ms
memory: 216824kb

input:

500000 200 199 40000
158367
3349
98725
462635
71709
384166
328253
132679
334131
433401
352051
9045
188775
366068
218093
90403
193264
359869
432442
263881
154277
470908
470355
200679
36628
399310
359036
163322
404722
42891
12614
147023
421373
479199
71619
182994
443724
120532
217367
134309
221302
310...

output:

184569 64682 71548 91691 107853 159961 255246 282144 304117 363817 416919 495851 25871 85005 134274 278953 284149 327755 338910 342628 381499 397926 408424 44255 54577 60836 164743 218314 325841 23889 77509 198286 198517 201735 234282 242628 255841 256445 274213 290381 354791 362344 373058 379862 46...

result:

ok good job!

Test #35:

score: 0
Accepted
time: 553ms
memory: 216760kb

input:

500000 200 199 40000
487441
36354
395955
6882
385179
368092
7896
377902
329818
287628
224290
27427
439352
326593
43030
180557
361665
163
8128
233496
22632
367138
126510
64436
351877
190302
145137
17783
209795
411209
255585
72497
161599
407307
216969
128706
67358
261184
268088
304573
63115
386332
827...

output:

485685 16879 34251 46664 100899 121308 129613 167449 193963 197749 252661 262432 274757 293638 298251 300081 351439 391057 419411 464217 95136 139273 214606 304574 316778 474610 168470 182736 299471 349526 356124 382347 409012 415606 420061 446458 479262 15966 96942 104502 120133 128573 147231 15966...

result:

ok good job!

Test #36:

score: 0
Accepted
time: 524ms
memory: 216808kb

input:

500000 200 199 40000
234051
59729
19849
414190
183195
238559
189881
256369
97803
379735
363604
391055
490274
186114
46653
230044
14075
437112
279313
141334
478372
146753
310018
305921
464449
475813
132149
290804
21707
51493
249658
15019
151386
494305
468781
444714
318658
179510
283604
351846
110675
...

output:

410090 13158 20711 38497 45628 72353 127782 159629 419620 443181 455085 14478 37855 63330 110210 125602 129029 222410 229313 264097 298331 337693 413366 45068 126874 190700 233322 303613 469398 47945 51214 131972 141700 173620 208648 248415 250183 288447 368057 400422 457351 467687 20307 110813 1419...

result:

ok good job!

Subtask #4:

score: 22
Accepted

Test #37:

score: 22
Accepted
time: 1679ms
memory: 392680kb

input:

1000000 1000 999 100000
678746
439069
32542
85937
936926
284219
461661
203235
533462
940676
230275
621140
780674
254931
562355
229273
201341
493976
358955
963527
880412
91220
474599
160086
698841
591551
718276
844558
39859
765917
34722
401724
219774
443004
682244
545401
968419
968020
354030
411187
1...

output:

545967 706162 53597 107558 776536 230611 572458 293457 390487 241653 638541 42868 433774 438059 293014 739962 25440 503383 628342 573629 887812 909797 805385 862282 382785 706534 190319 439139 648412 626240 131005 848982 269684 840650 376086 933701 18720 749474 336321 160119 795534 671698 201133 610...

result:

ok good job!

Test #38:

score: 0
Accepted
time: 1663ms
memory: 392864kb

input:

1000000 1000 999 100000
530144
36744
762893
712555
181981
816257
634992
419372
362279
817260
80801
697008
163211
900947
207310
862766
871091
388529
304808
574011
609949
509094
682125
781230
431445
517909
578411
288003
874415
410542
327673
607230
278208
956997
60166
842448
708661
562761
996349
382922...

output:

95498 889615 960323 436119 268907 878076 506332 704874 156497 67827 745845 203785 930852 891171 111021 389493 512868 480450 704804 985356 427544 771792 987920 534755 390890 820863 819565 664577 291796 963733 65362 76637 833989 747732 553794 727554 980477 63319 4035 692108 638253 898078 315136 558195...

result:

ok good job!

Test #39:

score: 0
Accepted
time: 1298ms
memory: 328816kb

input:

1000000 1000 999 100000
184414
849676
938006
927343
390133
327580
229110
507237
712311
8816
414520
114671
637641
82050
586607
523821
775429
139792
129360
175687
202474
801377
53523
281419
268534
488983
371227
294280
754555
448802
474939
391153
68307
762784
972243
245396
471656
982894
891252
945526
5...

output:

277025 98015 191938 430038 491289 533982 647427 666341 727175 803085 883077 897949 966440 967051 61408 225100 274387 427456 461165 469167 664081 728489 780374 803512 18455 139878 197456 221214 238703 325257 348287 475732 726045 816557 843019 955552 24411 47126 47999 53254 150402 282646 291555 353588...

result:

ok good job!

Test #40:

score: 0
Accepted
time: 1322ms
memory: 329052kb

input:

1000000 1000 999 100000
279950
249721
597292
449885
16559
173928
771422
461514
392390
935006
401814
270115
877076
38286
665465
238399
632929
179581
685305
910549
211998
608701
352060
872741
888320
701449
144650
551823
899287
53420
994085
608934
941044
730655
818001
379877
176374
592364
165476
704855...

output:

842070 61244 171129 176856 228913 232392 472501 644365 706069 844180 900175 936090 999835 9479 12365 54660 101413 235308 255594 377411 572241 582814 614617 770149 785502 890963 898196 899710 53289 59314 272721 307028 452958 633258 665138 714690 895897 919302 994485 35160 35533 67286 135416 303599 34...

result:

ok good job!

Test #41:

score: 0
Accepted
time: 1272ms
memory: 329028kb

input:

1000000 1000 999 100000
20291
14699
561360
480484
286821
851537
642046
340254
362763
85475
567413
791788
145352
893579
253840
568256
281056
600506
834619
722257
570033
739505
158527
142792
475867
834583
85573
692242
107763
238427
749609
945275
238413
468714
75532
903433
452471
189579
134021
196949
2...

output:

831483 65234 100734 109866 202435 313544 369772 377592 494337 654344 722680 731460 751379 846431 851905 869187 887847 846856 994513 120520 6885 16089 389373 466483 100125 853254 44775 265029 332925 516394 711537 758496 768679 851121 902114 101620 193813 194742 257490 445056 499615 527400 692947 7173...

result:

ok good job!

Test #42:

score: 0
Accepted
time: 1537ms
memory: 343872kb

input:

1000000 1000 999 100000
79586
680985
105418
485822
250996
367398
927624
781485
911744
133593
352104
588258
914821
421528
538901
315958
275633
856427
5509
935195
913751
92920
619111
848814
663965
45219
344279
165968
865619
154854
900710
774023
872807
340764
497215
631438
911663
879056
918477
890010
3...

output:

74982 84832 309869 791834 943915 964452 135723 204106 279963 244780 906069 41073 847384 564868 909131 65092 313416 371138 656253 814166 424439 512238 844843 958833 318576 343447 544950 346750 528104 973353 520479 592730 771247 319514 249104 22110 453198 842420 256349 892382 939711 656866 700254 7224...

result:

ok good job!

Test #43:

score: 0
Accepted
time: 1517ms
memory: 344340kb

input:

1000000 1000 999 100000
864268
381722
137834
585983
418961
493735
111546
74594
3531
508504
383125
609419
708077
928352
762197
141167
174341
418962
107812
631708
84967
770802
568509
276991
376328
909246
85244
453348
203444
298108
478742
824330
149959
297025
840543
296938
691263
894733
491791
319919
8...

output:

664618 37707 202105 466070 742398 891858 391174 462955 977879 985622 425609 899944 36802 121343 314905 315724 434810 364973 986524 861623 268661 524493 589742 289489 222185 86027 236417 395552 772548 88987 145327 509163 704569 324130 478017 462649 833742 54136 415619 212703 390076 664024 510162 6629...

result:

ok good job!

Test #44:

score: 0
Accepted
time: 1591ms
memory: 343940kb

input:

1000000 1000 999 100000
845169
885017
493118
865999
3330
999692
653381
608408
419452
799529
98306
295418
755923
442503
85146
52116
980435
452773
633069
998249
788034
527181
418057
380217
158464
23015
364569
275325
675030
381121
889352
891866
203541
14657
69958
428476
4927
853670
908949
664221
936648...

output:

498695 4585 124871 138676 865873 971471 990585 771298 935802 63490 502177 106700 556971 623707 663016 190965 523261 556995 725340 708015 543388 614244 739519 320862 324672 53714 539839 621522 715849 538193 593769 486096 502372 941071 45803 764919 782316 707767 294928 246156 432047 548332 129446 4221...

result:

ok good job!

Test #45:

score: 0
Accepted
time: 1417ms
memory: 340132kb

input:

1000000 1000 999 100000
582602
618937
427880
217239
896256
608317
42018
91716
145269
277504
94008
601157
503365
892936
294525
477654
286441
721652
14541
805171
315688
615193
950960
232416
430226
299443
690527
317106
303199
277200
283069
268869
650167
725195
788623
817992
647261
671722
426903
453937
...

output:

389549 61427 83544 100191 193655 205149 309989 312077 574350 637422 750917 872282 893364 934622 968485 998885 114140 299029 696555 34651 43123 188330 194151 292886 310872 418561 428217 466040 658040 907385 979937 27500 28295 221450 394991 496399 851004 968986 345252 408034 503245 906291 11856 98452 ...

result:

ok good job!

Test #46:

score: 0
Accepted
time: 1427ms
memory: 340176kb

input:

1000000 1000 999 100000
761086
125560
807519
496861
197173
671162
286468
361527
420830
337089
99902
928320
527383
162932
540385
255275
952224
668471
897966
186547
575192
315130
399856
441499
876295
462690
556218
167574
711101
146911
914260
296451
432034
722939
27102
687771
200204
636114
525983
59197...

output:

380028 205689 301731 424400 533754 556764 565458 607603 611322 626443 735823 867877 972483 76627 369184 380176 396493 464962 552989 655914 754595 779530 956179 76143 270142 412620 498878 533339 603332 615629 671508 848736 903987 5921 205943 213466 312900 341190 463728 467521 593356 709062 803792 858...

result:

ok good job!

Test #47:

score: 0
Accepted
time: 1448ms
memory: 340004kb

input:

1000000 1000 999 100000
700422
705984
742655
297368
991331
273447
971924
235042
288410
226105
751213
71757
552545
234328
777224
460184
747354
483278
77275
960232
145343
677496
979573
598317
294693
762557
214101
155814
368037
345816
214266
272277
6667
461234
109578
330628
355557
16281
696921
633114
6...

output:

507406 29879 90990 99754 120333 221358 280929 334948 361510 381110 384022 419462 518409 788692 816421 936783 958310 189820 216833 315233 35044 143475 156087 193854 210749 315223 336035 402421 599417 616596 684448 273953 296442 467843 534807 870918 901100 993279 205920 243559 112443 138452 183511 262...

result:

ok good job!

Test #48:

score: 0
Accepted
time: 1435ms
memory: 340044kb

input:

1000000 1000 999 100000
294979
912636
954626
984835
432393
676651
323592
496950
442003
287176
988897
310588
517194
868410
42913
165122
231552
13998
103334
502710
396538
590023
630061
530055
980426
628250
446184
451072
276133
424200
328584
26687
392134
766381
197139
174221
564083
149136
481705
457343...

output:

628359 13031 79875 210053 219333 278141 436262 459224 464060 610892 723049 765666 787475 823176 847609 894561 74990 182269 973008 200891 263069 305056 380070 693338 779539 780134 127044 130801 189740 199670 230666 270515 290920 299397 358111 409548 431674 515186 742346 842759 854527 902264 919563 96...

result:

ok good job!

Subtask #5:

score: 24
Accepted

Test #49:

score: 24
Accepted
time: 2003ms
memory: 404180kb

input:

1000000 91074 91073 100000
844855
360256
604500
520288
3402
603913
199722
732526
574997
429775
182518
190073
386932
693624
254661
333433
557929
350362
247817
201441
960948
519977
461212
493412
852908
455639
732827
432452
320916
223796
413293
969300
617038
438432
2369
51283
908991
374139
410798
19612...

output:

827995 196444 835457 100266 922715 142913 297340 524911 950490 582786 741644 863505 805244 984882 24755 930891 884867 861271 531596 648132 338218 46845 847717 595175 12717 326481 377840 588017 813334 995758 603487 25306 578153 332196 711148 800636 39897 846372 614206 907492 415320 957601 361674 2575...

result:

ok good job!

Test #50:

score: 0
Accepted
time: 2017ms
memory: 404088kb

input:

1000000 85406 85405 100000
243967
952129
483179
427670
241063
673465
936850
819488
932267
432087
168570
75516
427761
708350
579841
56944
327580
291932
619630
977053
424711
862203
360360
723933
64552
550800
399697
549936
425473
413499
431310
248361
149311
199196
247552
227202
676100
694069
347994
988...

output:

817772 657031 55207 421261 893501 135937 750393 440629 311734 700739 420833 514845 773485 235162 434337 863985 194772 516431 556822 285605 430380 294378 871757 809646 399453 929706 390314 165599 628640 110756 872436 719112 744549 97663 634614 689982 998575 157296 636440 644369 82641 825277 301856 24...

result:

ok good job!

Test #51:

score: 0
Accepted
time: 1658ms
memory: 340052kb

input:

1000000 62028 62027 100000
354774
944572
228278
449941
359325
57969
43031
616490
898916
61312
768136
892022
42765
227563
373737
241400
671641
155600
137082
803792
95473
30579
438130
496747
204238
57940
100124
47370
141803
745731
687568
952816
518284
677981
803613
28392
918299
517226
69867
69501
8590...

output:

139210 5819 28197 141356 217791 218071 249425 258220 267754 268784 279533 319556 327494 459808 479262 486044 824367 944310 975717 128244 158580 160054 333526 338443 448368 451790 468094 597994 600403 718557 766810 878931 911656 933163 403506 554205 681281 717184 867155 868536 921551 941583 126254 28...

result:

ok good job!

Test #52:

score: 0
Accepted
time: 1752ms
memory: 343836kb

input:

1000000 97415 97414 100000
453981
477203
689925
857434
241949
91494
993077
34954
605245
874902
893112
881129
576016
404784
870963
602740
1572
569897
624684
792962
189914
558522
191463
49120
326617
360379
162970
903046
277880
985508
419832
756246
978897
958038
74713
370260
67182
710992
829080
535448
...

output:

349880 127200 215476 216803 259233 332403 338013 344620 446207 494333 509803 593058 616296 626565 689721 801696 822069 844783 942183 964379 979652 60841 204341 328778 357916 602894 792905 129783 247469 415965 473265 513025 548375 640440 156359 282073 330190 333474 634719 191833 78588 374879 401042 8...

result:

ok good job!

Test #53:

score: 0
Accepted
time: 1583ms
memory: 339408kb

input:

1000000 54975 54974 100000
96952
319199
205229
785476
392425
909864
205985
81504
109636
164519
589106
373513
308062
898520
41603
88922
939415
189814
67267
237546
983306
247777
949797
339161
315551
248540
137128
344060
336465
199815
730843
44931
403415
657739
689755
660391
67077
940902
804294
104482
...

output:

386504 5130 146587 310119 357931 411057 419761 484305 524221 529126 623466 632078 814714 894227 463337 603961 43651 74525 114694 237452 287039 439535 502017 890509 3550 40272 50109 82753 95703 133742 214659 253108 272022 310689 416805 451392 451512 525666 616951 664344 695408 823140 22878 334199 647...

result:

ok good job!

Test #54:

score: 0
Accepted
time: 2091ms
memory: 357928kb

input:

1000000 93603 93602 100000
590581
384770
986471
380567
941542
676443
800265
713198
618948
485196
793122
992449
102071
504074
882555
246256
810300
783699
191498
938198
981235
862324
82689
856318
830003
553359
194501
448504
13262
81426
659762
358904
334920
884736
624654
360241
520224
491932
756589
684...

output:

148349 85398 229041 460157 493517 616832 384634 253514 677648 83431 108538 319752 927716 983868 312484 956524 274093 354799 545508 626065 52298 728026 948471 446324 895849 433165 30841 423337 356198 136193 449026 147246 666147 624630 373929 364143 879307 505335 633968 693107 326189 583805 223625 415...

result:

ok good job!

Test #55:

score: 0
Accepted
time: 1936ms
memory: 354072kb

input:

1000000 56476 56475 100000
321806
617064
56801
469913
349501
226853
982685
953768
950260
773865
850920
494648
347845
472357
967459
307312
410773
669459
406948
398239
680315
58721
209614
422608
265050
904778
804303
548987
718504
941419
213137
647451
595973
781907
716699
248913
465529
100816
289739
43...

output:

377649 77769 289012 450556 601911 762767 777515 419167 80563 601060 538127 579595 522881 935059 152293 559233 580716 619465 291977 41130 792757 999075 550166 728860 751731 635993 304671 565086 130700 419906 488729 566317 328290 539717 226358 946594 949775 675202 273807 219462 597119 925480 574873 25...

result:

ok good job!

Test #56:

score: 0
Accepted
time: 1957ms
memory: 356400kb

input:

1000000 77761 77760 100000
102141
89521
32208
995357
946428
638388
994079
200096
759506
415117
989818
157285
145299
619468
947456
343707
49714
479293
934090
399241
209616
459583
232400
34280
269169
429394
513182
447184
603
473746
92149
723284
310077
518197
800474
506674
796719
151664
380675
374791
4...

output:

422996 264657 334225 366808 620619 849678 959546 204770 223664 231242 82334 535225 663253 790299 680483 313641 77724 253377 416882 132553 597862 733879 847907 55205 495601 160184 732514 92089 608628 264751 787193 754994 995568 281147 428739 213786 751818 925481 173084 131257 434365 115932 804865 315...

result:

ok good job!

Test #57:

score: 0
Accepted
time: 1853ms
memory: 351856kb

input:

1000000 74966 74965 100000
683534
239091
842267
16017
468005
568280
573610
693011
161069
706082
795227
151601
934006
479774
513858
109101
851525
331377
875016
70381
299813
706417
753015
505672
720335
650876
915187
738727
132896
784656
425639
867644
376143
733308
245383
783527
550113
526907
856694
48...

output:

622629 156822 218323 265188 279955 390219 398137 472923 501471 535025 565793 573085 674349 774210 979990 61944 222657 535813 756925 120476 120791 131487 239032 309508 326896 439600 789882 841393 894918 908005 916927 932111 995484 343950 453150 545184 606539 794007 938896 18660 43125 50491 119056 157...

result:

ok good job!

Test #58:

score: 0
Accepted
time: 1828ms
memory: 350568kb

input:

1000000 65730 65729 100000
389535
782666
938044
721678
849220
701060
181030
52406
234247
790969
174777
437888
55263
195566
435426
928800
69026
168462
766751
672961
454375
175149
710125
383627
736135
711434
433482
836973
541367
953192
986804
693441
444489
287176
517890
131648
879596
119420
264712
351...

output:

109338 17616 59941 278664 359020 411252 417140 457941 461101 480084 487482 491248 501109 883361 894259 944862 959456 25379 116964 147872 249391 268411 423272 453495 604857 703705 851633 925924 936850 152778 241058 257051 374739 509240 554208 783710 784540 811139 828568 863833 159904 438945 470072 94...

result:

ok good job!

Test #59:

score: 0
Accepted
time: 1831ms
memory: 350900kb

input:

1000000 65817 65816 100000
51488
844164
68841
411983
904138
407472
718044
583532
651150
806564
830599
283691
887913
521795
183797
959816
140200
768090
936924
842275
478523
522794
333465
184430
825549
711686
617264
901453
971141
487698
621032
169621
843824
122780
528194
237041
140546
980298
46138
984...

output:

562168 33984 90668 97862 141029 177147 318421 334490 384462 493998 501012 517423 529498 575047 580684 593372 778995 794437 816493 817676 831179 873777 874846 953347 979193 225425 836826 486575 708749 175775 213044 260949 371625 435602 513598 543342 694224 761560 852144 939672 950147 245874 248438 27...

result:

ok good job!

Test #60:

score: 0
Accepted
time: 1854ms
memory: 352760kb

input:

1000000 84524 84523 100000
518841
510059
160070
674927
130615
180721
695363
700479
501744
933738
820766
543469
600830
488190
995734
515877
169413
488120
455582
27902
410480
323699
99289
522373
351735
903291
250384
153
678098
186046
396071
639296
608479
651025
672719
494101
85372
331436
954731
79292
...

output:

861270 1235 2052 71385 88343 128495 162803 206544 353231 400596 497179 523892 550534 635779 675581 708942 903845 956182 66202 127959 189338 487121 642855 646310 748278 36195 109712 109969 195305 286637 299920 326794 471185 486695 522425 555244 578402 725416 778842 843299 962085 116563 196640 269684 ...

result:

ok good job!

Extra Test:

score: 0
Extra Test Passed