QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#104478#2984. 奇怪的背包HuangHanSheng100 ✓546ms7516kbC++141.3kb2023-05-10 20:21:372023-05-10 20:21:41

詳細信息

Test #1:

score: 10
Accepted
time: 5ms
memory: 3688kb

input:

1 1000 367567200
11206338
178515360 228159360 326741904 27650700 356378880 229459230 366234264 341676608 107671200 42105362 50658080 271873602 143160160 204989400 142528680 311977116 297288180 82328246 345454200 261119320 245044800 98006832 187742016 35166285 329139360 31056450 148680728 277399404 2...

output:

0
1
0
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
1
1
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
1
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
0
1
0
0
1
1
0
0
0
0
1
0
1
1
0
0
...

result:

ok 1000 lines

Test #2:

score: 10
Accepted
time: 2ms
memory: 3472kb

input:

5 1000 9
7 4 6 1 3
1 7 3 6 1 6 6 3 4 6 3 6 3 6 6 6 3 5 1 6 6 8 2 3 6 3 6 3 6 3 8 6 3 6 3 7 6 7 2 4 5 6 3 3 6 6 2 8 6 6 6 6 2 3 6 8 6 3 5 6 3 6 6 1 6 3 1 3 1 6 5 4 8 5 4 6 3 3 8 4 2 3 6 4 6 6 6 6 4 3 4 2 6 6 2 2 3 6 3 3 6 1 4 2 4 3 8 3 3 6 3 6 8 2 6 3 6 6 4 1 7 6 6 3 3 3 2 3 5 3 6 3 4 8 3 6 5 7 6 2 6...

output:

28
28
31
31
28
31
31
31
28
31
31
31
31
31
31
31
31
28
28
31
31
28
28
31
31
31
31
31
31
31
28
31
31
31
31
28
31
28
28
28
28
31
31
31
31
31
28
28
31
31
31
31
28
31
31
28
31
31
28
31
31
31
31
28
31
31
28
31
28
31
28
28
28
28
28
31
31
31
28
28
28
31
31
28
31
31
31
31
28
31
28
28
31
31
28
28
31
31
31
31
...

result:

ok 1000 lines

Test #3:

score: 10
Accepted
time: 2ms
memory: 3496kb

input:

10 1000 180
90 30 60 22 42 120 12 64 72 122
72 116 60 30 75 114 178 60 30 90 20 64 150 32 42 40 96 60 150 72 126 48 24 82 15 135 175 135 4 46 84 12 140 60 108 90 106 138 107 45 108 20 90 90 144 135 144 90 54 45 84 90 90 36 30 108 132 72 126 40 90 120 120 138 6 96 135 108 60 42 80 92 60 60 20 90 30 1...

output:

1008
896
1020
990
0
979
880
1020
990
992
896
896
990
896
979
896
1006
1020
990
1008
980
1006
1006
880
0
0
0
0
896
880
1006
1006
896
1020
1008
992
880
979
0
0
1008
896
992
992
1008
0
1008
992
980
0
1006
992
992
1008
990
1008
1006
1008
980
896
992
1020
1020
979
979
1006
0
1008
1020
979
896
896
1020
10...

result:

ok 1000 lines

Test #4:

score: 10
Accepted
time: 2ms
memory: 3628kb

input:

10 1000 240
160 72 175 176 200 120 110 30 168 180
139 36 45 150 90 110 180 120 84 200 45 81 180 80 48 180 120 165 200 60 100 120 96 140 186 220 48 96 75 80 96 128 37 109 80 152 201 150 220 120 50 120 96 224 30 140 159 24 80 96 40 90 218 30 150 120 216 120 105 106 160 180 164 29 90 40 80 60 70 32 120...

output:

448
840
512
896
896
880
960
1020
840
989
512
448
960
992
896
960
1020
512
989
960
936
1020
896
936
784
936
896
896
512
992
896
872
448
448
992
870
448
896
936
1020
880
1020
896
872
896
936
448
894
992
896
989
896
772
896
896
1020
894
1020
512
772
992
960
822
448
896
989
992
960
880
872
1020
880
512
...

result:

ok 1000 lines

Test #5:

score: 10
Accepted
time: 2ms
memory: 3760kb

input:

1000 1000 2520
168 900 324 1960 1188 140 1260 270 648 2160 264 1084 675 938 810 2016 1512 1940 2268 2380 48 840 1406 600 630 320 1680 720 1212 2100 60 150 1701 1764 882 2400 1197 1060 1470 945 2205 1800 342 1015 952 420 738 1788 940 2125 1728 1050 735 560 1530 960 2250 2128 1610 336 252 756 2450 235...

output:

901489894
479515696
67303588
913527975
24335078
175306409
827684517
660284514
140140613
978937944
20498212
978937944
160385324
978937944
901489894
242732303
596713808
797748071
160385324
511660465
542130889
479515696
596713808
370861246
520772629
140140613
913527975
24335078
17535119
660284514
32299...

result:

ok 1000 lines

Test #6:

score: 10
Accepted
time: 1ms
memory: 3584kb

input:

1000 1000 7560
3920 5040 4340 2100 6720 570 2505 3465 3280 1272 6300 3456 3555 5760 1755 3528 7056 3780 2520 4380 2430 5136 1890 748 189 1800 3152 3015 540 4095 4023 4820 840 357 1078 5568 7155 1680 1620 5740 378 6172 4760 3612 5520 5736 7371 5754 1854 4800 5320 288 3375 6675 3240 2748 336 7182 1845...

output:

197590025
184808427
283643658
184808427
469202037
195267538
330613897
75841961
624390675
474490550
57259447
413552266
300892963
880323938
720062292
936767682
474490550
330613897
763039665
469202037
885159787
634657819
57259447
300892963
409484166
469202037
184808427
201992091
894862430
177504393
184...

result:

ok 1000 lines

Test #7:

score: 10
Accepted
time: 2ms
memory: 3756kb

input:

1000 1000 998244353
488163840 397705084 819881309 455571721 207258005 831475659 560522390 357847145 332060828 553098693 112440901 100263170 848691240 60701739 56574786 530311460 295361503 252606447 643427660 824274503 816153844 71736859 742746765 784819218 130507371 613127014 248175536 970211223 936...

output:

688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
688423209
...

result:

ok 1000 lines

Test #8:

score: 10
Accepted
time: 35ms
memory: 3588kb

input:

1000 1000 551350800
229451040 282432150 66798270 80651802 171474030 176172360 395218278 222022125 328053726 381811500 375772800 437717280 107581950 34739276 492102000 376390476 208143936 292307400 451268400 423877168 197250592 463332870 410269860 457927008 102102000 324635220 253293040 102731496 116...

output:

554963151
36199689
337607582
915819274
155774298
89192657
839303366
424175928
282557978
35076250
443996596
726319312
36199689
1444020
182330275
674390918
466833246
350707357
874819443
295803258
94785805
17021969
603928839
446129080
558558224
845712801
708843683
969292157
629165045
374172376
57375489...

result:

ok 1000 lines

Test #9:

score: 10
Accepted
time: 546ms
memory: 7516kb

input:

1000000 1000000 698377680
417661920 16046070 415257920 153238800 528349120 441187448 420904530 175772520 137021768 82214055 654729075 168770628 33124296 595181730 230426196 302640936 27390960 290345160 655848270 53155179 82722640 121272288 276321104 492972480 666717220 332636150 345199296 77576184 9...

output:

878604874
388944238
341045210
834581564
57111005
873720762
206838954
432915025
496040869
870002776
57111005
655825229
287436218
749989411
333294393
698897273
932689778
826756567
333597530
539591576
378432866
667883804
527746707
698682808
73799899
566074637
65847158
215672895
497871310
79819854
51293...

result:

ok 1000000 lines

Test #10:

score: 10
Accepted
time: 510ms
memory: 7404kb

input:

1000000 1000000 735134400
553424256 729053325 438105122 493253280 413748720 403108992 271905984 648960312 681080400 394529265 266316050 137012265 178578400 250262064 406949400 399278880 727564200 74977650 46602270 664448400 528623466 282744000 42814704 173114172 311689152 167076000 196828975 1067227...

output:

654587406
61406295
382929471
427518437
74208983
664621536
769706440
997577868
168287571
17346296
982760163
150430053
998948277
771310436
761696172
682116865
1087148
329544745
326662052
469537584
431824349
979061664
823002117
230096410
316153630
466163246
399385007
444004477
363772494
362762117
21248...

result:

ok 1000000 lines