QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#332310#8057. Best Carry Player 4ucup-team3031#RE 544ms15684kbC++205.3kb2024-02-19 13:59:562024-02-19 13:59:56

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 9900kb

input:

5
2
1 2
3 4
3
1 0 1
0 1 0
4
1 0 0 1
1 1 1 1
5
123456 114514 1919810 233333 234567
20050815 998244353 0 0 0
10
5 3 5 3 2 4 2 4 1 5
9 9 8 2 4 4 3 5 3 0

output:

5
1
2
467900
29

result:

ok 5 number(s): "5 1 2 467900 29"

Test #2:

score: 0
Accepted
time: 65ms
memory: 11820kb

input:

100000
5
0 1 1 1 1
0 0 1 0 0
5
0 0 0 0 0
1 1 1 0 0
5
0 0 2 1 1
0 2 1 0 1
5
0 0 0 0 0
1 2 1 0 0
5
0 1 0 1 1
0 0 1 1 1
5
2 0 0 0 1
1 0 0 0 3
5
2 0 0 1 1
0 2 1 1 1
5
0 0 0 0 2
0 0 0 0 1
5
0 0 0 0 0
0 1 1 0 0
5
4 0 0 0 0
0 0 0 1 0
5
0 0 0 0 1
2 1 1 0 0
5
0 2 3 0 0
0 0 0 1 0
5
1 1 1 0 1
1 0 1 0 1
5
0 0 0...

output:

2
0
4
0
3
3
3
2
0
0
1
1
3
0
3
0
0
0
0
0
0
0
4
0
4
1
0
2
3
3
1
5
0
0
2
0
0
1
1
0
0
3
5
3
2
2
2
0
1
2
2
2
0
3
0
2
1
1
0
1
0
4
0
0
2
2
0
3
3
0
2
0
1
0
0
1
1
2
0
3
4
0
2
5
0
2
1
0
0
0
3
2
3
0
2
0
4
3
3
0
2
2
0
1
3
1
1
0
0
0
1
0
3
2
2
0
2
1
1
0
1
0
0
2
4
1
3
3
2
2
2
0
2
0
0
2
3
1
3
1
0
2
2
3
0
1
2
0
1
1
...

result:

ok 100000 numbers

Test #3:

score: 0
Accepted
time: 32ms
memory: 11760kb

input:

1000
500
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:

0
1
1
2
2
2
0
0
0
3
1
1
2
0
1
0
1
1
3
0
0
4
3
1
4
4
0
0
2
1
3
3
0
0
1
0
1
1
0
0
2
1
2
0
3
1
3
1
3
4
2
1
1
2
3
0
0
1
2
0
0
1
1
1
1
2
1
2
2
0
2
2
1
1
3
0
0
1
2
0
1
3
0
0
1
1
0
0
1
0
3
1
2
0
0
5
1
1
1
3
1
4
1
0
0
0
0
0
1
3
1
2
1
0
0
0
0
0
1
1
0
4
0
1
1
3
0
1
0
0
2
3
0
1
2
1
1
1
0
3
0
0
3
2
1
1
0
1
0
1
...

result:

ok 1000 numbers

Test #4:

score: 0
Accepted
time: 117ms
memory: 11760kb

input:

100000
5
119777838 337555280 806504015 458289944 321614229
979242871 431783189 423329635 193632121 7339369
5
189264782 667669243 753322761 861814678 224007583
977519325 104432095 940220826 712094722 903574615
5
977791540 278658984 601762324 633391706 36807634
689562032 997406456 118939957 891425821 ...

output:

1377698543
2884329841
1699584169
2132012702
2531472710
2754014935
2585135038
2577893498
2034726862
2303377730
1476887044
2618960687
1626312268
1068946376
600795101
927483202
2151016849
2256729729
2291627593
1751199962
2412405837
1884010446
2553701265
2014856631
848686688
1069641213
2412585811
167144...

result:

ok 100000 numbers

Test #5:

score: 0
Accepted
time: 127ms
memory: 9760kb

input:

50000
10
18209490 798013131 762297136 184230300 323229686 771738936 850827138 201740028 818693101 945688434
101715068 966337103 309026840 698679951 666034197 810411289 841033024 740762082 484989962 19640395
10
608177485 700383507 317699894 982085408 908794603 92931066 880099629 965892642 576147264 9...

output:

5341540062
3811346608
3280168940
4222050470
4327730826
4389011469
5146997799
3799138189
4028437054
3650616128
4267213780
5220650313
3272450503
3560399774
5130261345
4384881302
4681302604
5415587476
2376088103
3344427945
3701410392
3434767065
4969556102
4474318648
4751503347
3701971157
5053000969
397...

result:

ok 50000 numbers

Test #6:

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

input:

5000
100
405163017 116989072 685766112 551211950 862199350 861827829 564364529 922314891 241721254 160976656 891732149 553649064 445152950 859742462 235262967 648909226 943054063 484936253 414150625 995061073 662853643 367723189 348457562 591856009 309322986 450413840 159926452 24214846 79239852 397...

output:

44348367445
47318596151
43893435579
49579921753
48669603728
45875221434
49002488594
53587378598
52208712766
49588253701
50196256163
49596309746
48141429048
49878478140
49036091100
46395088830
42672527744
41761915575
47439675311
47743457344
44672635972
50006245688
49397345810
46906644735
49589049416
...

result:

ok 5000 numbers

Test #7:

score: 0
Accepted
time: 392ms
memory: 11840kb

input:

500
1000
193550719 323493453 457420643 784509248 590688212 53858799 864840302 864699978 833248388 388148011 424847622 153776183 812936693 826657538 546327769 8986082 692715231 409800344 238099504 373879563 776749117 721714043 87525288 267321580 716697878 959194006 945266703 700945389 403532515 62661...

output:

465088900904
505514759606
489135202623
496905462876
484245812646
489774003871
497113250036
495356965473
487989876653
478735387405
492452909500
477359116614
476644416427
496024593454
511879486093
489977997571
487118685797
482393118166
500657058671
495034745130
463481958257
494092548341
498541253420
4...

result:

ok 500 numbers

Test #8:

score: 0
Accepted
time: 479ms
memory: 9900kb

input:

50
10000
553995858 246962428 824402293 323478911 680777105 103832678 585415164 992760839 343503903 178165091 12159583 994935001 342595423 59449818 679792998 816039830 731856694 560299370 549956669 133588429 444088799 47439002 33732378 667849963 779213360 312649757 413654325 204037978 407607851 37016...

output:

4934445638422
5004001488974
4977801387386
4989770542861
4943635086274
4943321860665
4991292690262
4973954855238
4988511939705
5018237958210
4977930376515
4933073917545
4971084263806
4946670696385
4936093052793
5021060989890
4950350493770
4983314449815
4983863160783
5008348159840
4971191273387
495994...

result:

ok 50 numbers

Test #9:

score: 0
Accepted
time: 544ms
memory: 15684kb

input:

5
100000
55467530 650020741 57699590 51967772 504211856 67871962 527800251 879255265 275707965 711280566 612286703 26282254 309510499 1918401 39869854 860668290 361753493 794313666 928775160 911047415 93046944 491539438 414230658 370192146 951557038 97990007 385352159 233363349 16821851 997867917 52...

output:

49811853885925
49898102768915
49899712412574
50041437439141
49960859308453

result:

ok 5 number(s): "49811853885925 49898102768915 ...4 50041437439141 49960859308453"

Test #10:

score: -100
Runtime Error

input:

1
500000
889704374 950018223 920744105 136539883 13949458 99367986 130730288 42613586 166125956 657352532 642534716 229782745 195803762 756158990 891814184 512424712 766825853 128026842 999178366 359139037 835443410 889093206 305756461 487796242 162360521 260591109 47531278 627471500 56697038 350637...

output:


result: