QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#585131#5656. Vittorio Plays with LEGO Brickspokorfanclub#AC ✓8ms4420kbC++171.7kb2024-09-23 19:15:092024-09-23 19:15:09

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3528kb

input:

4 0
2 7 11 13

output:

0

result:

ok single line: '0'

Test #2:

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

input:

4 1
2 7 11 13

output:

3

result:

ok single line: '3'

Test #3:

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

input:

4 100
2 7 11 13

output:

107

result:

ok single line: '107'

Test #4:

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

input:

4 3
2 5 8 11

output:

8

result:

ok single line: '8'

Test #5:

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

input:

294 6
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 44 46 48 50 52 54 56 58 60 62 64 66 68 70 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 157 159 161 163 165 167 169 171 173 175 177 ...

output:

588

result:

ok single line: '588'

Test #6:

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

input:

299 4
21 180 316 466 512 531 671 934 1053 1099 1172 1220 1267 1332 1381 1583 1696 1923 1952 3572 4022 4748 4813 5421 5449 5872 6033 6528 6627 6719 6793 6946 7165 7203 7288 7386 7579 7629 7770 7792 7958 8028 8047 8207 8367 8423 9275 9344 9593 9698 9746 9751 9820 10325 10424 10721 10844 11364 11703 11...

output:

1189

result:

ok single line: '1189'

Test #7:

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

input:

294 5
393135 3577904 5061427 5823192 6548720 7475926 9511723 9524062 9971156 10739460 11561118 13409068 13533915 16670936 19526970 19707605 20719911 21192675 23266760 28157267 29115886 37288768 37728409 43039823 46868936 48145551 49929407 52336370 56304872 57195168 58391542 60810864 62223593 6425057...

output:

1470

result:

ok single line: '1470'

Test #8:

score: 0
Accepted
time: 7ms
memory: 4272kb

input:

295 694
1 3 5 7 9 11 13 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 47 49 51 53 55 57 59 61 63 65 68 70 72 74 76 78 80 83 85 87 89 91 93 95 97 99 101 104 106 108 110 112 114 117 119 121 123 125 127 129 132 134 136 138 140 143 145 147 149 151 153 155 157 159 161 163 165 167 169 172 174 176 178 180 1...

output:

2626

result:

ok single line: '2626'

Test #9:

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

input:

292 681
973 1693 1805 2014 2116 3555 3971 4312 4405 4553 4923 5080 5331 5603 5975 7370 7904 8429 9401 9411 9576 9655 10073 10444 10921 11218 11610 11974 12150 12353 12484 12557 12969 13749 14040 14543 14586 15042 15091 15249 15710 16406 16435 16587 16594 17062 17111 17272 18125 18512 18676 18983 190...

output:

78580

result:

ok single line: '78580'

Test #10:

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

input:

293 365
452008 959506 1017147 1103387 1112710 1180693 1183859 1288450 1372975 1714939 1874932 2021921 2043079 2052838 2221147 2351349 2411577 2741853 2747092 2869822 2952013 3054511 3069178 3102806 3115657 3257701 3384603 3394140 3577114 4077831 4080155 4084715 4180521 4206129 4535063 4943866 497884...

output:

106433

result:

ok single line: '106433'

Test #11:

score: 0
Accepted
time: 7ms
memory: 4292kb

input:

295 118169068
1 3 5 7 10 12 15 17 19 22 24 26 28 30 32 34 36 39 41 43 45 47 50 52 54 56 59 61 64 67 69 72 74 76 78 81 83 86 89 91 94 96 99 101 103 106 109 111 113 116 118 120 122 125 127 129 132 134 136 139 141 145 147 149 151 153 155 157 160 162 164 166 169 171 173 175 177 180 182 184 186 188 191 1...

output:

118171179

result:

ok single line: '118171179'

Test #12:

score: 0
Accepted
time: 7ms
memory: 4416kb

input:

297 109942381
18 152 324 1026 1658 1985 2085 2492 2535 2718 2770 2845 2906 3243 3271 3336 3581 3758 3850 3981 4095 4165 4552 4824 5143 5691 7034 7184 7392 7526 7659 8093 8255 8970 9370 10122 10273 10298 10638 12102 12579 13118 13480 13553 13869 14637 14685 15045 15069 15145 15533 15930 16202 16274 1...

output:

110221681

result:

ok single line: '110221681'

Test #13:

score: 0
Accepted
time: 8ms
memory: 4420kb

input:

300 351970809
111525 460042 1084519 1960815 2494703 2974762 3068580 3158006 3720309 3729270 5564592 5856767 7126284 7453999 8039144 9363868 9688797 9700168 9798529 10390543 10540116 10733062 11303456 11316125 11474372 12327623 12347301 12767339 12833212 13591378 13826782 15221389 15241972 15720123 1...

output:

918528341

result:

ok single line: '918528341'

Test #14:

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

input:

299 7
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 127 129 131 133 135 137 139 141 143 145 147 150 152 154 156 158 160 162 164 166 168 170 172 174 176 ...

output:

640

result:

ok single line: '640'

Test #15:

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

input:

297 0
23 127 264 350 390 731 799 803 836 1128 1215 1418 1686 1706 1747 1808 1864 1904 1914 2202 2250 2541 2700 2787 2810 3033 3255 3333 3352 3422 3489 3698 3773 3856 3918 4127 4134 4150 4206 4238 4273 4301 4430 4447 4547 4649 4670 4871 4937 5052 5073 5101 5240 5392 5752 5806 5814 6017 6156 6251 6281...

output:

0

result:

ok single line: '0'

Test #16:

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

input:

296 7
472790 3230160 7234638 11859643 12456726 18146228 18293448 20619264 25620739 26428530 27518016 30044666 40456979 43531017 48148349 63864530 66410845 72593194 81704361 85399722 85603251 87085750 96931001 96992738 98157244 99602431 102212025 105379544 109934994 118873038 119094591 125561612 1268...

output:

2072

result:

ok single line: '2072'

Test #17:

score: 0
Accepted
time: 7ms
memory: 4392kb

input:

297 764
1 3 5 7 9 11 14 16 18 20 22 25 27 29 31 34 36 38 41 43 45 47 49 51 54 56 59 61 63 65 67 69 72 74 76 78 80 82 84 87 89 91 93 95 98 100 102 104 106 109 111 113 115 117 119 122 124 127 129 131 133 136 138 141 143 145 148 150 152 154 157 159 161 163 165 167 170 172 174 176 178 181 183 185 187 18...

output:

2848

result:

ok single line: '2848'

Test #18:

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

input:

295 415
105 176 278 379 412 446 653 664 727 790 820 834 862 874 1036 1056 1064 1088 1522 1525 1531 1585 1666 1733 1775 1888 1929 1936 2010 2104 2183 2190 2220 2239 2259 2288 2303 2394 2478 2489 2555 2628 2771 2824 3076 3236 3269 3321 3379 3415 3419 3428 3435 3475 3603 3654 3657 3705 3732 3757 3811 4...

output:

28691

result:

ok single line: '28691'

Test #19:

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

input:

293 323
3991044 5841824 7477211 9421755 11178409 13893448 14387416 14712141 15252227 17364776 17654521 18038370 18853589 19703322 20029698 21660128 27560219 30787590 31096794 31105784 31548315 33656949 34116256 36260469 37448189 39303556 43890197 46746613 47850392 51978316 52654859 57037788 58289766...

output:

94383

result:

ok single line: '94383'

Test #20:

score: 0
Accepted
time: 7ms
memory: 4352kb

input:

292 422404824
1 3 5 7 9 12 14 16 18 21 23 25 29 31 33 35 38 40 43 45 47 49 52 54 56 58 60 62 65 67 69 72 74 76 78 80 82 85 87 89 92 94 96 98 101 103 105 107 110 112 114 116 118 121 123 125 128 130 132 134 137 139 141 144 146 148 150 152 156 158 160 163 165 168 170 173 175 177 180 182 184 186 188 191...

output:

422406918

result:

ok single line: '422406918'

Test #21:

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

input:

295 310684070
254 371 488 518 619 729 818 864 1774 1903 2202 2550 3137 3142 3363 3440 4094 4807 4899 5099 5423 5639 5694 6163 6259 6286 6290 6375 6742 6975 7502 7592 7729 7891 7896 8078 8302 8343 8479 8835 8961 8970 9047 9223 9266 9415 9596 9690 9726 9906 9942 10225 10268 10295 10447 10452 10639 112...

output:

310857478

result:

ok single line: '310857478'

Test #22:

score: 0
Accepted
time: 7ms
memory: 4344kb

input:

295 346148700
427993 1094635 1545753 4883224 4950106 5408919 6903323 6997484 7128839 7935958 8045775 9159753 10016651 10419186 10727230 12109024 12802543 13237401 13800762 13974306 16569003 17276465 17308529 17432660 18020947 19304835 19647196 20103511 21536580 25342570 27253192 27698208 28612858 29...

output:

1295044024

result:

ok single line: '1295044024'

Test #23:

score: 0
Accepted
time: 6ms
memory: 4296kb

input:

274 702
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...

output:

3204

result:

ok single line: '3204'

Test #24:

score: 0
Accepted
time: 2ms
memory: 4296kb

input:

298 98
9 25 45 95 140 279 281 283 288 303 462 620 642 657 683 693 1425 1495 1500 1519 1539 1551 1604 1623 1633 1644 1652 1654 1661 1679 1690 1697 1714 1720 1724 1813 1995 2087 2098 2107 2112 2139 2165 2196 2233 2316 2342 2351 2363 2366 2380 2400 2403 2412 2416 2420 2433 2458 2494 2499 2504 2506 2508...

output:

3573

result:

ok single line: '3573'

Test #25:

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

input:

268 5
845 1140 1144 1146 1148 1150 1152 1154 1156 1158 1160 1162 1164 1166 1168 1170 1172 1174 1176 1178 1180 1183 1185 1187 1189 1191 1193 1195 1197 1199 1201 1203 1205 1207 1209 1211 1213 1215 1217 1219 1221 1223 1225 1227 1229 1231 1233 1235 1237 1239 1241 1243 1245 1247 1249 1251 1253 1255 1257 ...

output:

475

result:

ok single line: '475'

Test #26:

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

input:

293 361
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...

output:

2466

result:

ok single line: '2466'

Test #27:

score: 0
Accepted
time: 7ms
memory: 4384kb

input:

285 590
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 45 47 49 51 53 55 57 59 61 63 65 67 69 71 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 ...

output:

2654

result:

ok single line: '2654'

Test #28:

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

input:

271 724
3 16 18 55 57 1268 1270 1272 1274 1276 1278 1280 1282 1284 1286 1288 1290 1292 1294 1296 1298 1300 1302 1304 1306 1308 1310 1312 1314 1316 1318 1320 1322 1324 1326 1328 1330 1332 1334 1336 1338 1340 1342 1344 1346 1348 1350 1352 1354 1356 1358 1360 1362 1364 1366 1368 1370 1372 1374 1376 137...

output:

3602

result:

ok single line: '3602'

Test #29:

score: 0
Accepted
time: 6ms
memory: 4236kb

input:

270 608
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...

output:

2897

result:

ok single line: '2897'

Test #30:

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

input:

281 655
191 376 542 658 722 814 1239 1294 1473 1515 1627 6023 7624 7826 9410 10391 12096 12377 13360 14383 14455 15851 27372 77001 116550 154569 180545 217626 239716 239985 244395 255248 256849 262330 266478 271559 373225 373227 373229 373244 373246 373262 373267 373296 373298 373303 373310 373322 3...

output:

149594

result:

ok single line: '149594'

Test #31:

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

input:

286 422
36668285 163934009 164076791 164170757 164334998 164504881 164509323 164511146 164551986 164605961 164605995 164606151 164606409 164606424 164606504 164606518 164709213 164729954 164729963 164730025 164730029 164730176 164730199 164730201 164730203 164730395 164730600 164730605 164730649 164...

output:

24411

result:

ok single line: '24411'

Test #32:

score: 0
Accepted
time: 2ms
memory: 4352kb

input:

296 305
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...

output:

3557

result:

ok single line: '3557'

Test #33:

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

input:

280 878
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...

output:

17956

result:

ok single line: '17956'

Test #34:

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

input:

272 537
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...

output:

5067

result:

ok single line: '5067'

Test #35:

score: 0
Accepted
time: 8ms
memory: 4372kb

input:

300 5884904
3733 5461 5465 5478 5481 5483 5486 5488 5493 5495 5497 5499 5501 5503 5505 5507 5509 5511 5513 5515 5517 5519 5521 5523 5525 5529 5533 5535 5537 5539 5542 5544 5546 5548 5550 5552 5554 5556 5558 5560 5562 5564 5566 5568 5570 5572 5574 5576 5578 5580 5582 5584 5586 5588 5590 5592 5594 559...

output:

5888105

result:

ok single line: '5888105'

Test #36:

score: 0
Accepted
time: 6ms
memory: 4276kb

input:

268 9276859
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171...

output:

9282255

result:

ok single line: '9282255'

Test #37:

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

input:

270 605610
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 ...

output:

609815

result:

ok single line: '609815'

Test #38:

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

input:

276 1442771
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 185 187 189 191...

output:

1448847

result:

ok single line: '1448847'

Test #39:

score: 0
Accepted
time: 7ms
memory: 4284kb

input:

298 5739224
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 132 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177 179 181 183 185 187 189 191 193 195 197...

output:

14898758

result:

ok single line: '14898758'

Test #40:

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

input:

283 1465718
591685 1504294 2533057 14091669 69745784 143871689 143879732 143931660 143946695 144003280 144106841 144161334 144259172 144277955 144285191 144289534 144351579 144379547 144443553 144545037 144559612 144573358 144584980 144605845 144774752 144860740 145103456 146184763 147749902 1482311...

output:

124406189

result:

ok single line: '124406189'

Test #41:

score: 0
Accepted
time: 7ms
memory: 4412kb

input:

298 8247443
168420873 376005171 376024426 376024610 376025000 376025008 376025010 376025012 376025014 376027434 376424168 376641860 376642235 376642237 376642239 376642241 376642243 376642245 376642247 376642249 376642251 376642253 376642255 376642257 376642259 376642261 376642297 376642403 37664240...

output:

16938659

result:

ok single line: '16938659'

Test #42:

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

input:

297 6557207
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171...

output:

14190768

result:

ok single line: '14190768'

Test #43:

score: 0
Accepted
time: 2ms
memory: 4296kb

input:

276 4232122
1 3 11 13 15 17 3843 3845 3847 3849 3851 3853 3855 3857 3859 3861 3863 3865 3867 3869 3871 3873 3875 3877 3879 3959 3961 3963 58299 64162 64164 64166 64168 64170 64184 64186 64188 64190 64192 64194 64196 64198 64200 64202 64204 64206 64208 64210 64212 64214 64216 64218 64220 64222 64224 ...

output:

16653679

result:

ok single line: '16653679'

Test #44:

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

input:

8 406
1 4 7 9 16 19 22 25

output:

427

result:

ok single line: '427'

Test #45:

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

input:

2 210
7675 18785

output:

420

result:

ok single line: '420'

Test #46:

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

input:

1 215405460
7

output:

215405460

result:

ok single line: '215405460'

Test #47:

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

input:

10 28813140
7469 8829 9628 17154 17543 17775 18030 19916 22983 24168

output:

28829203

result:

ok single line: '28829203'

Test #48:

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

input:

8 158177788
228406661 331296737 359177646 430505606 527041332 536363451 567959579 718378778

output:

601738840

result:

ok single line: '601738840'