QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#557440#7480. 对数据结构的爱yoy68100 ✓677ms372424kbC++142.1kb2024-09-11 09:44:452024-09-11 09:44:46

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 5
Accepted
time: 277ms
memory: 372416kb

input:

1000000 200000 998244353
-999999942 -999999943 -999999940 -999999957 -999999926 -999999949 -999999996 -999999924 -999999926 -999999990 -999999974 -999999968 -999999939 -999999974 -999999975 -999999941 -999999916 -999999956 -999999990 -999999911 -999999944 -999999926 -999999915 -999999961 -999999981 ...

output:

-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-999999949926857
-9999999499...

result:

ok 200000 numbers

Test #2:

score: 5
Accepted
time: 668ms
memory: 372420kb

input:

1000000 200000 826523
38590 43092 32374 38420 36539 42728 38207 36631 42522 33999 38450 41197 32338 41935 38033 39605 42396 32306 42782 39315 32028 39687 34431 31706 39780 36757 43097 33484 38963 41437 35793 42367 34062 33226 30375 41032 30626 40860 42663 39182 30828 43043 31581 36902 37022 35558 41...

output:

133247
134185
299429
583237
376515
314869
345926
189913
469511
215752
381897
621937
7614402
755019
714552
-4830958
519750
93875
555848
200444
783477
-17925522
479168
7946
573343
608419
234633
2160535
379034
361124
570836
460341
288971
218727
802637
343234
-5503244
52628
541126
725952
1525
366349
378...

result:

ok 200000 numbers

Test #3:

score: 5
Accepted
time: 589ms
memory: 370132kb

input:

1000000 200000 52947
54144 97034 65781 84297 75035 9940 8721 34599 57146 83305 42427 87994 79326 81121 70995 79317 48758 14622 36400 57310 55212 72268 65558 75982 84358 42855 49863 99339 84245 12358 6711 43915 76374 52008 45173 25609 63414 75193 28490 35403 45143 65130 77861 33454 27577 99029 62265 ...

output:

34458
161502
-1575593
-7967049
116063
171495
-388569
-3958022
46011
219925
-4144898
-2110519
301709
301899
68309
56608
-7137518
-3131427
106106
101960
-575660
149501
-1802545
67332
-695133
201682
219055
-1114228
-1340578
60313
159173
123345
-917907
-3603675
-964739
51864
-3527454
-1832635
-4676753
-...

result:

ok 200000 numbers

Test #4:

score: 5
Accepted
time: 659ms
memory: 370160kb

input:

1000000 200000 1000
436 533 442 200 -71 362 557 -14 -225 645 -24 485 89 509 114 123 -207 -294 659 563 7 225 -192 645 537 -200 390 -170 433 2 -19 526 375 140 170 -213 296 581 165 468 -120 409 132 -81 209 76 670 -234 584 364 456 -263 40 309 -167 -48 506 501 599 344 -186 234 481 631 615 26 82 -34 -304 ...

output:

1426
755
820
359
-64800
22
1020
413
20419
942
979
267
164
-4157
-15490
17
55505
13115
-63119
598
34435
977
842
449
-275
-8880
213
18622
-27023
447
897
2492
100
27761
739
18024
-293
147
362
3750
-9973
530
700
454
46980
-1155
-14531
-46656
52
660
975
-4847
838
-12493
616
371
551
4903
3386
23415
-22676...

result:

ok 200000 numbers

Test #5:

score: 5
Accepted
time: 456ms
memory: 370160kb

input:

1000000 200000 1000
-133037 -216785 -44631 -268277 -410414 -341681 -117278 -35739 -444750 -70536 -399578 -393370 -101121 -416894 -136971 -306746 -152715 -146640 -407933 -88756 -312535 -276581 -54375 -428747 -429834 -34632 -167867 -342740 -312461 -346197 -223356 -374812 -206111 -450571 -87392 -453134...

output:

-49843940945
-79623669677
-82121855040
-14076688165
-78992074367
-33725504461
-106413063260
-46184669825
-35703107903
-22211108210
-1387461870
-52212927775
-1539905425
-17380210586
-3647096323
-116458615417
-44567474020
-22034131007
-45255279886
-29940838738
-36583089018
-30426554215
-63121773699
-4...

result:

ok 200000 numbers

Test #6:

score: 5
Accepted
time: 492ms
memory: 370312kb

input:

1000000 200000 1000
16018 10808 22155 13375 15196 11057 23122 4461 5191 7872 10637 17128 10477 8718 16594 3121 23021 6821 4523 15734 15353 14726 1947 21263 22593 15831 17004 12734 11056 17533 16933 6016 1824 8237 12935 23871 8372 1452 4529 8375 20253 2180 15175 9868 4594 15540 22841 18532 14442 8096...

output:

576556152
164902715
441244633
656542499
321106063
127668611
843984794
430395737
437959286
275857539
862921798
129997095
340711055
313393616
190131942
874444433
906708079
655544793
723219625
14047010
183186970
246597810
336575452
828834851
558325952
1241135015
263946889
220170886
301611327
102014226
...

result:

ok 200000 numbers

Test #7:

score: 5
Accepted
time: 622ms
memory: 372204kb

input:

1000000 200000 1000
-101336831 -172535581 -177545351 -129791576 -114254159 -114966821 -127214789 -131319681 -112619541 -129080548 -154090587 -87121294 -118490718 -131357194 -161796360 -178357440 -96192905 -101139546 -166071962 -165411207 -144607490 -126760914 -134002646 -87425508 -138679036 -1125608...

output:

-1459724588888
-1140941893017
-1163904597479
-1464623992946
-668005675924
-928190894451
7353516075
57912012003
3294306736
-614064469729
-1588162696378
-1563521287044
-2177866264687
-1229966143133
431988836990
-581051568386
-655407386980
-688818910308
-665203310679
-1074224682221
-1015868912410
-1152...

result:

ok 200000 numbers

Test #8:

score: 5
Accepted
time: 518ms
memory: 372208kb

input:

1000000 200000 1000
3250028 12198241 5578019 11975883 10402375 9317568 6320945 9165154 9249543 12170304 6683139 11992093 7830375 6329521 12495317 2950009 9770386 2764244 5175284 4267504 733310 9862323 11901335 7521083 11243660 4227977 6114026 3614174 2769538 10958987 3407318 4623239 11923194 734441 ...

output:

365687756080
726916388011
966491281508
186033758713
34196289836
687619766251
983475398788
54479491482
310163374653
232497230618
119292963120
830201704605
8527931571
68110891002
146228997930
748354644015
381479816748
147421890733
470353949897
198017813711
805950736000
702502121348
270690232730
426245...

result:

ok 200000 numbers

Test #9:

score: 5
Accepted
time: 456ms
memory: 372328kb

input:

1000000 200000 1000000
-462 -517 -448 236 -476 -408 255 120 -309 -32 632 -677 311 -311 -620 -152 650 706 82 550 61 602 -253 399 -842 -796 -824 -591 -637 -582 -817 -751 -516 -741 -848 -731 -703 -465 -230 -272 56 -267 -145 -378 -470 -57 16 -463 -532 -118 -535 117 -157 203 -133 -245 -86 -113 119 -128 -...

output:

703848
-707036
-821044
-539187
-828765
184668
-942266
-740659
-1217756
473524
-436438
-340491
-472958
-2074798
637118
-1042705
253431
-2478583
200501
-4816068
-4708963
-447085
-1915307
445160
-2896856
-2377160
-2947827
-2381832
-2061839
-3147931
-1131708
-3262927
-1919164
-1042587
-286403
-2391566
-...

result:

ok 200000 numbers

Test #10:

score: 5
Accepted
time: 498ms
memory: 370352kb

input:

1000000 200000 1000000
44 14 38 22 50 22 11 5 34 6 7 27 29 11 20 23 23 47 4 44 13 26 1 21 17 42 35 45 40 20 11 4 0 5 4 46 40 20 31 8 36 26 35 31 4 2 38 3 45 26 48 33 44 39 20 11 35 35 25 48 15 30 46 26 11 19 20 14 12 19 39 6 49 26 6 30 27 14 36 15 42 15 29 14 3 41 42 4 15 44 37 17 39 39 30 38 0 27 4...

output:

677907
881151
571084
595872
369113
134539
771373
380206
924980
393306
948729
561746
750734
131808
386345
262404
699514
560980
13977
137189
841710
762415
948748
250518
916668
623048
710341
260559
106592
670049
583108
126540
296910
564351
358535
145641
708718
940986
937981
632866
290122
781046
405023
...

result:

ok 200000 numbers

Test #11:

score: 5
Accepted
time: 602ms
memory: 372208kb

input:

1000000 200000 1000000
108852 118952 125529 120449 101804 122709 120932 116964 115390 121048 104022 122149 104458 104890 102667 106266 113063 108974 110570 118578 121545 121277 108550 125107 105128 125155 114736 122068 105866 108745 101369 105030 109431 113820 109215 111397 124826 123782 114652 1062...

output:

-2061102
-33168
-492421
650753
789371
-12789697
150908
-10733698
-2321743
741203
378038
510835
211279
356692
-33813686
564808
-9884757
57747
-208807
531554
-16298577
726871
799141
73179
-18894776
-605251
-58224231
-23085629
-30772326
-23216080
-441044
828818
-716942
-31471580
983861
908228
-91391
35...

result:

ok 200000 numbers

Test #12:

score: 5
Accepted
time: 495ms
memory: 372404kb

input:

1000000 200000 1000000
2896601 -11826303 -45831564 8418375 -14140525 -24984388 9047604 40740113 -6539937 -34935738 40866726 -15748721 -22810524 43447169 15385485 -43390522 74810537 -37813044 4318392 65299733 33917256 71720815 -20755043 29693372 -47374316 6851370 45294238 -12491614 9958443 30368414 -...

output:

-6507442775202
-38107304694231
-11272006713888
-18764654378818
-27212558946918
-17294577254916
-17404693080437
-58692891366906
-51681693938839
-44655421803394
-33934678880491
-5947476003325
-3393897050151
-11213833485441
-48201700404371
-44056901717930
-31694539098719
-39151340273625
-3871124739547
...

result:

ok 200000 numbers

Test #13:

score: 5
Accepted
time: 677ms
memory: 372196kb

input:

1000000 200000 1000000
57337506 118142911 183430867 33291768 1035409 192836196 83223004 153991695 139076402 159760698 102417581 218543531 9270035 102347734 149733164 63271561 99162133 89680611 12036722 177871001 130836875 142956602 12804456 142562516 128785680 111087453 170676508 120164754 204775891...

output:

-104491550908
555100210901
319906968152
1053632701947
107401940538
222353939311
-73670941279
82480013647
526244634497
378006556735
-54534461732
413355077284
763571075781
7207807689
190273998781
413643243014
473987636468
-767662481447
151821053833
-521528729694
-50083564975
167120144933
349538959001
...

result:

ok 200000 numbers

Test #14:

score: 5
Accepted
time: 443ms
memory: 372408kb

input:

1000000 200000 1000000000
-566 -599 -287 174 373 -699 -738 -395 -423 -306 -181 359 89 -207 -577 -384 -143 139 -475 -153 444 -582 -268 475 458 459 439 -74 328 420 -177 -354 48 -122 274 362 -421 429 -737 -73 468 -248 -26 -628 -47 -143 298 39 -704 -703 104 -434 -246 -320 386 -256 -600 280 377 306 377 3...

output:

-137397337
-54933414
-38991467
-98712387
-83484390
-42050930
-32162929
-18759886
-199140115
-127486893
-145941194
-96387015
-64265081
-13059546
-180281417
-14847157
-124000084
-46251457
-43007961
-169245299
-127886041
-72476917
-124334924
-52174122
-50005215
-32790076
-74512464
-86893647
-85304666
-...

result:

ok 200000 numbers

Test #15:

score: 5
Accepted
time: 496ms
memory: 372208kb

input:

1000000 200000 1000000000
365 182 51 408 460 339 174 365 17 548985485 305 440 128 74 209 343 394 312 360 690213199 345 225 106 8 226 155 452 477 125 134071934 58 234 148 156 59 10 335 257 367 728408840 187 55 93 228 459 446 149 488 188 946070825 56 6 489 450 476 64 289 141 71 620718378 248 450 394 5...

output:

507952552
492058167
685369734
649733164
962593216
444373440
603293668
544801794
722058516
821049864
788931788
392360251
242750387
896890883
411825738
262344495
807996209
728201377
958036559
513336287
717313835
561477779
803547032
206818124
246437855
102997336
667328164
493669190
824453483
785563896
...

result:

ok 200000 numbers

Test #16:

score: 5
Accepted
time: 478ms
memory: 372236kb

input:

1000000 200000 1000000000
293516 37431 44193 268000 170558 58418 151247 47336 -31285 -115653 153168 190554 234196 -4687 138772 48119 263731 -124922 132466 -98388 181576 118741 16936 276296 244317 39798 25161 263817 136939 213380 207177 243916 195588 -4895 -77402 -87027 202240 39779 250552 99453 4849...

output:

542611908
426940220
234032350
905529472
971485320
464334138
372361513
844087922
354092420
354449228
668518873
373714336
626958977
302092531
233388871
14577051
695952769
780283666
735026147
248995299
63181427
205163444
77727382
864803576
887109000
892389606
602088800
816303822
322808276
683446230
750...

result:

ok 200000 numbers

Test #17:

score: 5
Accepted
time: 493ms
memory: 372424kb

input:

1000000 200000 1000000000
-7713295 -5841823 -7139052 31107245 -28692984 -16552615 -30056045 -49963926 -53310256 25885653 106620794 91226494 90318246 75738290 -35651283 -21050315 35545512 -30521717 -14784651 13875463 19772553 -39040896 1295270 1794479 -74661555 -25579807 -27729517 -45336086 -7160640 ...

output:

-66789498526
-99539729042
-12624783495
-76661651268
-73961802583
-44259245901
-304456444
-13792825797
-106447243109
-111734795514
-95175779339
-49083446353
-13875168018
-59587147412
-44093815884
-7762416909
-82032763382
-33988777794
-7860660623
-90204287599
-3235705372
-32366745835
-21828958631
-293...

result:

ok 200000 numbers

Test #18:

score: 5
Accepted
time: 498ms
memory: 370160kb

input:

1000000 200000 1000000000
-19077771 -33879659 -43128797 -19036826 -29804439 -20417402 -32638623 -24856800 -36573588 -37401236 -33713471 -27377388 -23027709 -23450579 -29042159 -23404422 -22321173 -31836901 -33563606 -41230080 -42208291 -37109737 -22239454 -24202980 -35420318 -36072817 -39484388 -212...

output:

-88970197291
-732581798030
-499040029132
-221675244869
-764028064513
-36663990114
-114311673981
-83144876026
-84249670992
-374518344189
149775598
-21069992741
-836071160522
-224662158025
-182251687157
-79014734656
-147328365806
-45550202876
-553265035517
-188495282623
-370151319097
-750125986074
212...

result:

ok 200000 numbers

Test #19:

score: 5
Accepted
time: 499ms
memory: 370280kb

input:

1000000 200000 1000000000
8064863 8070583 10005663 3338707 4196834 7371925 11399193 761673 12082075 6119418 5773998 8068031 10383625 3754108 9116526 2291405 11737276 10353691 4592539 103838 4927107 10219889 7001171 670174 5583640 2050393 1203812 2861518 1930331 6022263 2290409 3955494 5572015 122985...

output:

847274972
6374726
315896716
606538744
154137923
155753563
556044793
-382570227
504431167
119608956
126776401
-560777550
990146464
93504002
643459061
873184413
521759042
91042834
897127258
677917705
414790539
509928546
603690927
672895184
136469727
171970015
186091471
945991391
-309359235
904354650
1...

result:

ok 200000 numbers

Test #20:

score: 5
Accepted
time: 443ms
memory: 372384kb

input:

1000000 200000 46148
593857636 590907880 260230707 386822617 102354280 239077993 333148907 79341375 518666353 543523089 643620984 680608535 672170087 192885161 406530942 499680480 406852036 -27751136 240934132 267475901 -30762378 -21633031 668225203 168788233 339309786 230478778 313123456 52272337 2...

output:

-24074505937158
-25183307529162
-29847048034628
-29364013914791
-21079203422774
-20961889911576
-21294637299825
-21107081726159
-19568276681177
-21300443927531
-21165705016601
-24396331508113
-21229579111498
-27547759468540
-28639796922506
-24170022395451
-24057976633440
-23888485112651
-21320087198...

result:

ok 200000 numbers