QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#543967 | #40. Martian DNA | 5un_xiaomivita_mbox | 100 ✓ | 23ms | 5312kb | C++23 | 857b | 2024-09-01 23:58:15 | 2024-09-01 23:58:16 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
Subtask #1:
score: 16
Accepted
Test #1:
score: 16
Accepted
time: 1ms
memory: 3668kb
input:
100 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 20
output:
22
result:
ok single line: '22'
Test #2:
score: 16
Accepted
time: 0ms
memory: 3672kb
input:
100 40 10 34 39 27 5 37 15 10 36 7 8 24 39 39 16 26 28 29 39 3 19 2 17 0 13 14 33 38 22 30 39 20 4 1 6 39 23 21 12 18 9 31 25 11 32 35 34 27 5 37 15 10 36 7 8 24 39 16 26 28 29 3 19 2 17 0 13 14 33 38 22 30 20 4 1 6 23 21 12 18 9 31 25 11 32 35 34 27 39 5 37 15 10 36 39 39 7 8 24 16 26 18 1 4 1 27 1...
output:
34
result:
ok single line: '34'
Test #3:
score: 16
Accepted
time: 1ms
memory: 3672kb
input:
100 10 10 1 9 5 2 7 4 5 9 0 9 8 3 7 4 8 5 3 9 5 2 9 6 3 8 1 6 1 8 2 5 3 6 3 7 0 1 5 1 4 9 2 5 5 3 4 9 9 1 9 4 6 8 0 4 8 8 4 3 1 7 7 6 3 9 2 8 5 2 4 2 0 0 8 2 5 8 3 6 6 6 7 3 0 5 2 8 4 2 4 5 5 4 6 9 1 9 4 8 6 4 2 10 8 12 1 8 5 13 7 6 6 10 9 12 3 10 4 13 0 6
output:
100
result:
ok single line: '100'
Test #4:
score: 16
Accepted
time: 0ms
memory: 3672kb
input:
100 100 10 50 88 54 56 22 26 74 80 8 6 48 33 30 2 40 94 13 60 59 98 44 32 36 38 64 51 69 65 27 9 90 85 49 99 14 3 12 16 52 78 89 5 57 41 10 28 61 62 76 83 46 34 18 4 81 95 92 55 82 75 17 79 87 37 66 7 0 11 58 77 15 24 23 97 72 73 84 21 39 91 20 96 93 43 1 31 86 71 35 63 67 45 25 70 42 68 19 53 47 29...
output:
impossible
result:
ok single line: 'impossible'
Test #5:
score: 16
Accepted
time: 0ms
memory: 3652kb
input:
100 50 10 34 6 16 0 38 26 33 27 10 42 23 6 12 14 10 3 11 34 6 38 15 33 14 13 45 36 38 39 41 2 0 36 46 6 15 25 8 19 47 5 30 49 27 0 9 17 43 4 49 46 37 14 7 32 40 43 7 35 28 0 16 40 17 26 40 11 7 26 31 22 24 48 8 20 35 18 20 25 5 23 49 36 25 31 47 29 28 39 38 45 41 41 1 19 23 44 0 21 31 24 3 89 28 73 ...
output:
impossible
result:
ok single line: 'impossible'
Test #6:
score: 16
Accepted
time: 0ms
memory: 3656kb
input:
10 10 1 1 4 5 2 7 6 9 0 3 8 3 1
output:
1
result:
ok single line: '1'
Test #7:
score: 16
Accepted
time: 0ms
memory: 3608kb
input:
100 100 10 94 65 80 5 52 58 87 19 51 98 9 6 26 77 12 92 57 39 56 30 43 25 78 67 3 42 28 31 61 40 44 70 59 36 50 1 46 18 68 60 27 64 11 38 69 15 93 82 79 23 7 71 48 0 63 29 4 54 90 2 8 74 32 16 73 53 95 85 91 55 33 75 14 66 84 86 34 83 22 35 21 76 89 37 10 72 62 13 20 96 24 17 88 45 41 49 81 99 97 47...
output:
12
result:
ok single line: '12'
Test #8:
score: 16
Accepted
time: 1ms
memory: 3600kb
input:
100 40 1 39 25 17 2 32 31 23 27 37 16 4 37 24 24 33 5 34 36 0 29 13 7 34 3 37 33 25 38 10 26 31 35 12 10 7 37 30 14 29 11 21 15 26 27 34 17 15 35 1 37 8 16 18 33 35 23 12 30 34 38 26 35 3 4 20 10 15 20 22 28 9 23 18 6 15 11 24 9 17 36 28 8 25 5 4 24 12 1 37 22 26 36 11 25 7 32 7 30 12 19 18 1
output:
1
result:
ok single line: '1'
Test #9:
score: 16
Accepted
time: 0ms
memory: 3688kb
input:
100 10 2 0 3 7 6 0 5 6 9 0 2 6 8 2 6 2 0 1 7 1 2 6 9 9 9 8 3 4 4 0 9 9 3 9 2 2 9 1 6 8 6 6 7 2 9 6 7 4 7 7 5 2 6 8 7 6 5 9 4 4 1 5 3 8 3 9 8 3 6 7 0 5 3 2 8 6 5 5 8 0 9 5 4 3 1 1 1 1 3 9 1 6 7 4 7 7 0 7 4 7 1 7 2 4 1
output:
3
result:
ok single line: '3'
Subtask #2:
score: 24
Accepted
Dependency #1:
100%
Accepted
Test #10:
score: 24
Accepted
time: 1ms
memory: 3684kb
input:
4000 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0...
output:
974
result:
ok single line: '974'
Test #11:
score: 24
Accepted
time: 1ms
memory: 3764kb
input:
4000 11 10 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0...
output:
2419
result:
ok single line: '2419'
Test #12:
score: 24
Accepted
time: 1ms
memory: 3632kb
input:
4000 2500 10 2499 1481 1779 313 2499 1071 2231 571 192 2284 1001 1921 1306 1059 476 2499 1567 1600 1869 935 88 1726 1654 106 160 2499 1038 138 2499 644 1404 1200 572 2030 347 80 1441 1230 2273 1649 2180 1549 658 518 582 7 2499 726 1275 2499 801 1138 1335 2065 1710 1464 1231 1373 31 2244 590 1409 203...
output:
2311
result:
ok single line: '2311'
Test #13:
score: 24
Accepted
time: 1ms
memory: 3632kb
input:
4000 4000 10 3959 2905 2955 1968 2998 709 1458 3021 2579 843 3422 1642 2262 3350 3711 3137 2090 1010 3520 1361 1161 251 3 3353 773 242 1221 2873 3854 1988 2744 1164 2376 1894 3246 3361 2703 3086 432 2839 702 3976 231 659 380 1606 2132 1701 1467 613 2800 796 759 3494 2473 1796 821 417 1024 3499 2573 ...
output:
968
result:
ok single line: '968'
Test #14:
score: 24
Accepted
time: 1ms
memory: 3632kb
input:
4000 1600 10 181 882 718 1238 135 980 286 18 1441 690 1558 646 93 617 797 798 179 694 1266 690 388 872 816 1029 198 430 762 754 522 1059 1032 44 1566 1404 1172 796 358 369 422 398 702 1550 894 1207 720 1084 94 1557 773 245 1021 1458 656 386 1544 703 1173 1279 2 739 1139 58 383 393 305 585 791 15 726...
output:
532
result:
ok single line: '532'
Test #15:
score: 24
Accepted
time: 1ms
memory: 3688kb
input:
4000 10 10 7 9 0 6 9 5 0 8 6 9 6 0 9 7 0 5 7 4 9 8 9 0 3 4 3 2 9 5 3 0 7 7 8 6 6 4 6 0 2 4 2 4 1 2 8 0 5 0 2 8 1 1 7 0 6 7 9 7 0 2 1 5 8 6 8 5 3 3 5 9 4 8 0 4 9 6 1 9 7 8 6 6 9 0 6 1 5 4 5 8 7 0 8 8 9 7 4 0 8 1 8 5 8 4 5 0 8 1 5 4 6 7 7 8 5 7 9 4 7 0 8 7 9 5 0 8 2 2 0 1 4 1 0 6 7 6 0 3 3 4 5 0 6 3 0...
output:
479
result:
ok single line: '479'
Test #16:
score: 24
Accepted
time: 0ms
memory: 3600kb
input:
100 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 20
output:
22
result:
ok single line: '22'
Test #17:
score: 24
Accepted
time: 1ms
memory: 3612kb
input:
100 40 10 34 39 27 5 37 15 10 36 7 8 24 39 39 16 26 28 29 39 3 19 2 17 0 13 14 33 38 22 30 39 20 4 1 6 39 23 21 12 18 9 31 25 11 32 35 34 27 5 37 15 10 36 7 8 24 39 16 26 28 29 3 19 2 17 0 13 14 33 38 22 30 20 4 1 6 23 21 12 18 9 31 25 11 32 35 34 27 39 5 37 15 10 36 39 39 7 8 24 16 26 18 1 4 1 27 1...
output:
34
result:
ok single line: '34'
Test #18:
score: 24
Accepted
time: 0ms
memory: 3604kb
input:
100 10 10 1 9 5 2 7 4 5 9 0 9 8 3 7 4 8 5 3 9 5 2 9 6 3 8 1 6 1 8 2 5 3 6 3 7 0 1 5 1 4 9 2 5 5 3 4 9 9 1 9 4 6 8 0 4 8 8 4 3 1 7 7 6 3 9 2 8 5 2 4 2 0 0 8 2 5 8 3 6 6 6 7 3 0 5 2 8 4 2 4 5 5 4 6 9 1 9 4 8 6 4 2 10 8 12 1 8 5 13 7 6 6 10 9 12 3 10 4 13 0 6
output:
100
result:
ok single line: '100'
Test #19:
score: 24
Accepted
time: 0ms
memory: 3692kb
input:
100 100 10 50 88 54 56 22 26 74 80 8 6 48 33 30 2 40 94 13 60 59 98 44 32 36 38 64 51 69 65 27 9 90 85 49 99 14 3 12 16 52 78 89 5 57 41 10 28 61 62 76 83 46 34 18 4 81 95 92 55 82 75 17 79 87 37 66 7 0 11 58 77 15 24 23 97 72 73 84 21 39 91 20 96 93 43 1 31 86 71 35 63 67 45 25 70 42 68 19 53 47 29...
output:
impossible
result:
ok single line: 'impossible'
Test #20:
score: 24
Accepted
time: 0ms
memory: 3688kb
input:
100 50 10 34 6 16 0 38 26 33 27 10 42 23 6 12 14 10 3 11 34 6 38 15 33 14 13 45 36 38 39 41 2 0 36 46 6 15 25 8 19 47 5 30 49 27 0 9 17 43 4 49 46 37 14 7 32 40 43 7 35 28 0 16 40 17 26 40 11 7 26 31 22 24 48 8 20 35 18 20 25 5 23 49 36 25 31 47 29 28 39 38 45 41 41 1 19 23 44 0 21 31 24 3 89 28 73 ...
output:
impossible
result:
ok single line: 'impossible'
Test #21:
score: 24
Accepted
time: 0ms
memory: 3660kb
input:
10 10 1 1 4 5 2 7 6 9 0 3 8 3 1
output:
1
result:
ok single line: '1'
Test #22:
score: 24
Accepted
time: 0ms
memory: 3668kb
input:
100 100 10 94 65 80 5 52 58 87 19 51 98 9 6 26 77 12 92 57 39 56 30 43 25 78 67 3 42 28 31 61 40 44 70 59 36 50 1 46 18 68 60 27 64 11 38 69 15 93 82 79 23 7 71 48 0 63 29 4 54 90 2 8 74 32 16 73 53 95 85 91 55 33 75 14 66 84 86 34 83 22 35 21 76 89 37 10 72 62 13 20 96 24 17 88 45 41 49 81 99 97 47...
output:
12
result:
ok single line: '12'
Test #23:
score: 24
Accepted
time: 0ms
memory: 3724kb
input:
100 40 1 39 25 17 2 32 31 23 27 37 16 4 37 24 24 33 5 34 36 0 29 13 7 34 3 37 33 25 38 10 26 31 35 12 10 7 37 30 14 29 11 21 15 26 27 34 17 15 35 1 37 8 16 18 33 35 23 12 30 34 38 26 35 3 4 20 10 15 20 22 28 9 23 18 6 15 11 24 9 17 36 28 8 25 5 4 24 12 1 37 22 26 36 11 25 7 32 7 30 12 19 18 1
output:
1
result:
ok single line: '1'
Test #24:
score: 24
Accepted
time: 0ms
memory: 3660kb
input:
100 10 2 0 3 7 6 0 5 6 9 0 2 6 8 2 6 2 0 1 7 1 2 6 9 9 9 8 3 4 4 0 9 9 3 9 2 2 9 1 6 8 6 6 7 2 9 6 7 4 7 7 5 2 6 8 7 6 5 9 4 4 1 5 3 8 3 9 8 3 6 7 0 5 3 2 8 6 5 5 8 0 9 5 4 3 1 1 1 1 3 9 1 6 7 4 7 7 0 7 4 7 1 7 2 4 1
output:
3
result:
ok single line: '3'
Subtask #3:
score: 28
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #25:
score: 28
Accepted
time: 8ms
memory: 4464kb
input:
200000 10 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 ...
output:
99999
result:
ok single line: '99999'
Test #26:
score: 28
Accepted
time: 10ms
memory: 4336kb
input:
200000 2 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1...
output:
49777
result:
ok single line: '49777'
Test #27:
score: 28
Accepted
time: 7ms
memory: 4432kb
input:
200000 11 10 3 10 6 9 4 8 10 0 2 5 7 1 3 10 10 6 9 4 8 0 2 10 5 7 1 3 6 10 9 4 8 0 2 5 7 1 3 6 9 10 4 10 8 10 0 2 5 10 10 7 1 3 6 9 4 8 0 2 5 7 10 10 1 3 6 9 4 8 0 2 10 5 7 1 3 6 10 9 4 8 0 2 10 5 7 1 3 6 9 4 8 10 0 2 5 7 1 3 6 9 4 8 0 10 2 5 7 10 1 3 10 10 6 9 4 8 10 0 2 5 7 1 3 6 10 9 4 8 0 10 2 5...
output:
104
result:
ok single line: '104'
Test #28:
score: 28
Accepted
time: 9ms
memory: 4452kb
input:
200000 11 10 1 0 2 9 8 5 7 3 4 6 1 0 2 9 8 5 7 3 10 4 6 1 0 2 9 8 5 7 3 4 6 1 0 2 9 8 5 10 7 3 4 6 1 0 2 9 10 8 5 7 3 4 10 6 1 10 0 2 9 8 5 7 3 4 10 6 1 0 2 9 8 5 7 3 4 6 10 1 0 2 9 8 5 7 3 10 4 6 1 0 2 9 8 10 5 7 3 4 6 1 0 2 9 8 10 5 7 3 4 6 1 10 0 2 9 8 5 7 3 4 6 1 0 2 9 8 5 7 3 4 6 1 0 2 9 10 8 5...
output:
66497
result:
ok single line: '66497'
Test #29:
score: 28
Accepted
time: 11ms
memory: 4564kb
input:
200000 80000 10 64782 79999 28244 43551 39192 6759 52185 4449 75743 51286 56045 63339 61743 53739 79999 31965 46680 59273 79999 58662 72479 79999 17526 69938 48780 79999 5151 79999 72302 4985 48959 15360 18455 12952 24374 79999 23789 66813 79999 36653 67948 41269 64862 40781 35719 43182 74872 54726 ...
output:
65013
result:
ok single line: '65013'
Test #30:
score: 28
Accepted
time: 8ms
memory: 4460kb
input:
200000 10 10 7 8 7 9 1 8 6 8 0 1 3 1 6 9 0 4 3 8 5 6 2 5 6 5 3 5 1 5 0 1 3 2 7 7 4 1 1 0 4 8 1 7 8 9 9 7 7 4 2 4 1 6 9 7 6 0 9 3 4 8 3 7 5 0 1 3 2 8 3 6 8 3 3 5 6 3 7 0 5 2 8 9 3 8 4 6 2 0 4 0 6 1 3 0 5 1 4 2 3 2 2 0 5 6 5 8 1 2 9 4 2 2 8 8 1 7 9 8 1 7 4 2 6 7 3 0 8 5 2 8 8 2 3 9 2 9 3 8 6 2 8 0 9 4...
output:
200000
result:
ok single line: '200000'
Test #31:
score: 28
Accepted
time: 9ms
memory: 4448kb
input:
200000 100 10 25 3 45 53 13 58 56 22 27 6 63 20 57 60 69 70 21 39 72 50 21 60 97 53 12 9 1 34 23 57 8 89 39 95 90 3 5 4 23 67 76 90 22 85 2 38 83 65 81 45 12 48 39 48 7 7 43 34 30 11 83 95 94 74 29 91 5 52 89 6 58 31 89 58 88 61 68 17 48 29 64 88 28 88 7 56 66 5 16 13 45 61 2 77 63 37 35 42 19 91 24...
output:
impossible
result:
ok single line: 'impossible'
Test #32:
score: 28
Accepted
time: 9ms
memory: 4444kb
input:
200000 200000 10 47384 151075 137676 32559 32390 84987 38148 19218 98253 55335 100080 57554 49838 18910 126000 185315 35076 65073 188467 190288 142304 141861 23359 43240 195539 53164 98919 194510 123034 169005 91361 198612 192007 19749 33802 21927 161168 14400 124968 131471 188990 86930 29856 114493...
output:
85852
result:
ok single line: '85852'
Test #33:
score: 28
Accepted
time: 10ms
memory: 4416kb
input:
200000 8000 10 5270 4725 3069 4025 4956 5380 6399 6021 5232 2147 5904 5823 7560 1456 1518 719 6366 3104 4280 6007 5877 5618 5155 5494 7982 4171 3804 7193 4797 734 4396 4247 1185 7075 7525 6159 5231 4045 6729 4280 2686 4476 7252 6804 524 5818 7006 1898 1454 5743 5581 3504 5593 2419 6238 3358 5110 476...
output:
53262
result:
ok single line: '53262'
Test #34:
score: 28
Accepted
time: 9ms
memory: 4392kb
input:
200000 10 10 8 1 8 5 3 0 4 4 8 0 7 1 5 7 8 8 9 0 9 3 2 8 2 3 1 1 5 2 8 2 8 9 1 3 9 4 2 4 1 9 6 3 0 6 5 2 4 8 4 0 6 5 7 7 3 3 2 7 1 6 1 9 8 2 5 9 3 3 2 0 6 0 8 3 7 3 7 3 5 3 6 8 3 8 2 7 1 9 4 7 0 9 8 9 2 8 8 3 8 2 1 4 7 0 7 4 4 6 1 5 3 9 2 4 7 2 1 3 2 9 3 2 6 5 7 2 5 8 8 6 9 7 3 9 7 4 6 5 6 8 8 4 6 1...
output:
74681
result:
ok single line: '74681'
Test #35:
score: 28
Accepted
time: 0ms
memory: 3740kb
input:
4000 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0...
output:
974
result:
ok single line: '974'
Test #36:
score: 28
Accepted
time: 1ms
memory: 3624kb
input:
4000 11 10 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0...
output:
2419
result:
ok single line: '2419'
Test #37:
score: 28
Accepted
time: 1ms
memory: 3628kb
input:
4000 2500 10 2499 1481 1779 313 2499 1071 2231 571 192 2284 1001 1921 1306 1059 476 2499 1567 1600 1869 935 88 1726 1654 106 160 2499 1038 138 2499 644 1404 1200 572 2030 347 80 1441 1230 2273 1649 2180 1549 658 518 582 7 2499 726 1275 2499 801 1138 1335 2065 1710 1464 1231 1373 31 2244 590 1409 203...
output:
2311
result:
ok single line: '2311'
Test #38:
score: 28
Accepted
time: 1ms
memory: 3632kb
input:
4000 4000 10 3959 2905 2955 1968 2998 709 1458 3021 2579 843 3422 1642 2262 3350 3711 3137 2090 1010 3520 1361 1161 251 3 3353 773 242 1221 2873 3854 1988 2744 1164 2376 1894 3246 3361 2703 3086 432 2839 702 3976 231 659 380 1606 2132 1701 1467 613 2800 796 759 3494 2473 1796 821 417 1024 3499 2573 ...
output:
968
result:
ok single line: '968'
Test #39:
score: 28
Accepted
time: 0ms
memory: 3708kb
input:
4000 1600 10 181 882 718 1238 135 980 286 18 1441 690 1558 646 93 617 797 798 179 694 1266 690 388 872 816 1029 198 430 762 754 522 1059 1032 44 1566 1404 1172 796 358 369 422 398 702 1550 894 1207 720 1084 94 1557 773 245 1021 1458 656 386 1544 703 1173 1279 2 739 1139 58 383 393 305 585 791 15 726...
output:
532
result:
ok single line: '532'
Test #40:
score: 28
Accepted
time: 1ms
memory: 3700kb
input:
4000 10 10 7 9 0 6 9 5 0 8 6 9 6 0 9 7 0 5 7 4 9 8 9 0 3 4 3 2 9 5 3 0 7 7 8 6 6 4 6 0 2 4 2 4 1 2 8 0 5 0 2 8 1 1 7 0 6 7 9 7 0 2 1 5 8 6 8 5 3 3 5 9 4 8 0 4 9 6 1 9 7 8 6 6 9 0 6 1 5 4 5 8 7 0 8 8 9 7 4 0 8 1 8 5 8 4 5 0 8 1 5 4 6 7 7 8 5 7 9 4 7 0 8 7 9 5 0 8 2 2 0 1 4 1 0 6 7 6 0 3 3 4 5 0 6 3 0...
output:
479
result:
ok single line: '479'
Test #41:
score: 28
Accepted
time: 0ms
memory: 3684kb
input:
100 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 20
output:
22
result:
ok single line: '22'
Test #42:
score: 28
Accepted
time: 1ms
memory: 3608kb
input:
100 40 10 34 39 27 5 37 15 10 36 7 8 24 39 39 16 26 28 29 39 3 19 2 17 0 13 14 33 38 22 30 39 20 4 1 6 39 23 21 12 18 9 31 25 11 32 35 34 27 5 37 15 10 36 7 8 24 39 16 26 28 29 3 19 2 17 0 13 14 33 38 22 30 20 4 1 6 23 21 12 18 9 31 25 11 32 35 34 27 39 5 37 15 10 36 39 39 7 8 24 16 26 18 1 4 1 27 1...
output:
34
result:
ok single line: '34'
Test #43:
score: 28
Accepted
time: 0ms
memory: 3592kb
input:
100 10 10 1 9 5 2 7 4 5 9 0 9 8 3 7 4 8 5 3 9 5 2 9 6 3 8 1 6 1 8 2 5 3 6 3 7 0 1 5 1 4 9 2 5 5 3 4 9 9 1 9 4 6 8 0 4 8 8 4 3 1 7 7 6 3 9 2 8 5 2 4 2 0 0 8 2 5 8 3 6 6 6 7 3 0 5 2 8 4 2 4 5 5 4 6 9 1 9 4 8 6 4 2 10 8 12 1 8 5 13 7 6 6 10 9 12 3 10 4 13 0 6
output:
100
result:
ok single line: '100'
Test #44:
score: 28
Accepted
time: 0ms
memory: 3692kb
input:
100 100 10 50 88 54 56 22 26 74 80 8 6 48 33 30 2 40 94 13 60 59 98 44 32 36 38 64 51 69 65 27 9 90 85 49 99 14 3 12 16 52 78 89 5 57 41 10 28 61 62 76 83 46 34 18 4 81 95 92 55 82 75 17 79 87 37 66 7 0 11 58 77 15 24 23 97 72 73 84 21 39 91 20 96 93 43 1 31 86 71 35 63 67 45 25 70 42 68 19 53 47 29...
output:
impossible
result:
ok single line: 'impossible'
Test #45:
score: 28
Accepted
time: 0ms
memory: 3688kb
input:
100 50 10 34 6 16 0 38 26 33 27 10 42 23 6 12 14 10 3 11 34 6 38 15 33 14 13 45 36 38 39 41 2 0 36 46 6 15 25 8 19 47 5 30 49 27 0 9 17 43 4 49 46 37 14 7 32 40 43 7 35 28 0 16 40 17 26 40 11 7 26 31 22 24 48 8 20 35 18 20 25 5 23 49 36 25 31 47 29 28 39 38 45 41 41 1 19 23 44 0 21 31 24 3 89 28 73 ...
output:
impossible
result:
ok single line: 'impossible'
Test #46:
score: 28
Accepted
time: 0ms
memory: 3664kb
input:
10 10 1 1 4 5 2 7 6 9 0 3 8 3 1
output:
1
result:
ok single line: '1'
Test #47:
score: 28
Accepted
time: 0ms
memory: 3688kb
input:
100 100 10 94 65 80 5 52 58 87 19 51 98 9 6 26 77 12 92 57 39 56 30 43 25 78 67 3 42 28 31 61 40 44 70 59 36 50 1 46 18 68 60 27 64 11 38 69 15 93 82 79 23 7 71 48 0 63 29 4 54 90 2 8 74 32 16 73 53 95 85 91 55 33 75 14 66 84 86 34 83 22 35 21 76 89 37 10 72 62 13 20 96 24 17 88 45 41 49 81 99 97 47...
output:
12
result:
ok single line: '12'
Test #48:
score: 28
Accepted
time: 0ms
memory: 3736kb
input:
100 40 1 39 25 17 2 32 31 23 27 37 16 4 37 24 24 33 5 34 36 0 29 13 7 34 3 37 33 25 38 10 26 31 35 12 10 7 37 30 14 29 11 21 15 26 27 34 17 15 35 1 37 8 16 18 33 35 23 12 30 34 38 26 35 3 4 20 10 15 20 22 28 9 23 18 6 15 11 24 9 17 36 28 8 25 5 4 24 12 1 37 22 26 36 11 25 7 32 7 30 12 19 18 1
output:
1
result:
ok single line: '1'
Test #49:
score: 28
Accepted
time: 0ms
memory: 3568kb
input:
100 10 2 0 3 7 6 0 5 6 9 0 2 6 8 2 6 2 0 1 7 1 2 6 9 9 9 8 3 4 4 0 9 9 3 9 2 2 9 1 6 8 6 6 7 2 9 6 7 4 7 7 5 2 6 8 7 6 5 9 4 4 1 5 3 8 3 9 8 3 6 7 0 5 3 2 8 6 5 5 8 0 9 5 4 3 1 1 1 1 3 9 1 6 7 4 7 7 0 7 4 7 1 7 2 4 1
output:
3
result:
ok single line: '3'
Subtask #4:
score: 32
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Test #50:
score: 32
Accepted
time: 15ms
memory: 4776kb
input:
200000 80000 79999 76217 47471 38182 9412 12294 10491 18111 17275 26584 63811 74300 33776 21171 70473 66302 2035 41355 11 42293 8080 25514 36525 36547 37434 54228 58538 75459 53857 61582 65630 50387 1714 3917 60804 72415 1981 5034 58945 65327 79832 28257 58779 39944 54652 2239 16932 44414 24925 1192...
output:
79999
result:
ok single line: '79999'
Test #51:
score: 32
Accepted
time: 13ms
memory: 4808kb
input:
200000 60000 59999 52298 59999 59999 5580 33601 737 57287 21483 21321 15273 21085 37259 27453 51261 37242 12464 59999 14300 43012 9020 42593 18078 34020 26488 59999 15007 44535 59999 18789 54795 5356 6291 12212 24277 51830 8227 914 13689 12697 38074 26299 34662 8549 59999 309 59999 6736 32602 947 28...
output:
66448
result:
ok single line: '66448'
Test #52:
score: 32
Accepted
time: 14ms
memory: 4676kb
input:
200000 60000 20000 43024 34821 34072 4074 59253 54471 16994 57144 41013 57176 50112 7804 18104 50272 4675 44245 53005 38580 21708 45539 25598 34567 25468 35084 38462 18264 4117 47058 59999 59999 38292 35865 24125 59999 22813 4800 51901 11530 31400 45142 10821 59999 29053 4791 5775 33118 26945 38231 ...
output:
66481
result:
ok single line: '66481'
Test #53:
score: 32
Accepted
time: 4ms
memory: 4504kb
input:
200000 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 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 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0...
output:
1
result:
ok single line: '1'
Test #54:
score: 32
Accepted
time: 20ms
memory: 4932kb
input:
200000 100000 80000 53092 62356 81612 56642 19037 11965 95223 19532 76769 12496 49116 4423 56959 9593 7790 77707 74605 98483 88318 68804 15122 82752 85046 57654 59899 76380 87169 778 75279 59894 41886 4167 81833 17098 48157 76008 30868 9450 80573 986 58446 20721 18129 10056 94180 33163 65679 6499 89...
output:
impossible
result:
ok single line: 'impossible'
Test #55:
score: 32
Accepted
time: 23ms
memory: 5312kb
input:
200000 180000 100871 65108 44372 12032 51531 59715 52040 31808 27255 110107 124236 67127 20445 142336 20999 46079 121615 85597 35167 110246 86476 10497 17958 40857 114771 51663 107397 68445 34565 939 104504 139940 20772 176123 140287 85064 157187 9043 9534 178126 108257 131964 108547 177025 6921 253...
output:
106769
result:
ok single line: '106769'
Test #56:
score: 32
Accepted
time: 8ms
memory: 4488kb
input:
200000 8000 7601 1747 1680 2898 7974 6886 5488 2500 2469 3634 5549 2389 3800 2933 1583 4897 6810 6712 3959 3307 7983 4313 7308 5568 7989 3576 278 2151 3518 962 1142 7670 1786 671 4792 7331 3126 7431 369 6936 4487 4290 1218 493 7452 1244 589 3731 4060 2293 7111 2428 1862 6654 3856 2489 4763 7612 3986...
output:
158156
result:
ok single line: '158156'
Test #57:
score: 32
Accepted
time: 14ms
memory: 4612kb
input:
200000 20000 15579 15680 2218 19436 7782 19623 6698 985 19079 10777 16269 4789 19934 17263 8259 4628 7436 13268 14375 15072 16519 4697 16083 333 1399 7988 15366 18912 7362 4039 10374 17945 15500 2872 7601 13377 1371 14104 3047 18287 14109 5334 5116 6915 7132 14590 173 12047 5412 790 10650 16888 1900...
output:
87852
result:
ok single line: '87852'
Test #58:
score: 32
Accepted
time: 8ms
memory: 4448kb
input:
200000 10 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 0 1 5 6 8 9 4 7 3 2 ...
output:
99999
result:
ok single line: '99999'
Test #59:
score: 32
Accepted
time: 9ms
memory: 4508kb
input:
200000 2 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1...
output:
49777
result:
ok single line: '49777'
Test #60:
score: 32
Accepted
time: 10ms
memory: 4396kb
input:
200000 11 10 3 10 6 9 4 8 10 0 2 5 7 1 3 10 10 6 9 4 8 0 2 10 5 7 1 3 6 10 9 4 8 0 2 5 7 1 3 6 9 10 4 10 8 10 0 2 5 10 10 7 1 3 6 9 4 8 0 2 5 7 10 10 1 3 6 9 4 8 0 2 10 5 7 1 3 6 10 9 4 8 0 2 10 5 7 1 3 6 9 4 8 10 0 2 5 7 1 3 6 9 4 8 0 10 2 5 7 10 1 3 10 10 6 9 4 8 10 0 2 5 7 1 3 6 10 9 4 8 0 10 2 5...
output:
104
result:
ok single line: '104'
Test #61:
score: 32
Accepted
time: 9ms
memory: 4376kb
input:
200000 11 10 1 0 2 9 8 5 7 3 4 6 1 0 2 9 8 5 7 3 10 4 6 1 0 2 9 8 5 7 3 4 6 1 0 2 9 8 5 10 7 3 4 6 1 0 2 9 10 8 5 7 3 4 10 6 1 10 0 2 9 8 5 7 3 4 10 6 1 0 2 9 8 5 7 3 4 6 10 1 0 2 9 8 5 7 3 10 4 6 1 0 2 9 8 10 5 7 3 4 6 1 0 2 9 8 10 5 7 3 4 6 1 10 0 2 9 8 5 7 3 4 6 1 0 2 9 8 5 7 3 4 6 1 0 2 9 10 8 5...
output:
66497
result:
ok single line: '66497'
Test #62:
score: 32
Accepted
time: 7ms
memory: 4536kb
input:
200000 80000 10 64782 79999 28244 43551 39192 6759 52185 4449 75743 51286 56045 63339 61743 53739 79999 31965 46680 59273 79999 58662 72479 79999 17526 69938 48780 79999 5151 79999 72302 4985 48959 15360 18455 12952 24374 79999 23789 66813 79999 36653 67948 41269 64862 40781 35719 43182 74872 54726 ...
output:
65013
result:
ok single line: '65013'
Test #63:
score: 32
Accepted
time: 8ms
memory: 4448kb
input:
200000 10 10 7 8 7 9 1 8 6 8 0 1 3 1 6 9 0 4 3 8 5 6 2 5 6 5 3 5 1 5 0 1 3 2 7 7 4 1 1 0 4 8 1 7 8 9 9 7 7 4 2 4 1 6 9 7 6 0 9 3 4 8 3 7 5 0 1 3 2 8 3 6 8 3 3 5 6 3 7 0 5 2 8 9 3 8 4 6 2 0 4 0 6 1 3 0 5 1 4 2 3 2 2 0 5 6 5 8 1 2 9 4 2 2 8 8 1 7 9 8 1 7 4 2 6 7 3 0 8 5 2 8 8 2 3 9 2 9 3 8 6 2 8 0 9 4...
output:
200000
result:
ok single line: '200000'
Test #64:
score: 32
Accepted
time: 9ms
memory: 4448kb
input:
200000 100 10 25 3 45 53 13 58 56 22 27 6 63 20 57 60 69 70 21 39 72 50 21 60 97 53 12 9 1 34 23 57 8 89 39 95 90 3 5 4 23 67 76 90 22 85 2 38 83 65 81 45 12 48 39 48 7 7 43 34 30 11 83 95 94 74 29 91 5 52 89 6 58 31 89 58 88 61 68 17 48 29 64 88 28 88 7 56 66 5 16 13 45 61 2 77 63 37 35 42 19 91 24...
output:
impossible
result:
ok single line: 'impossible'
Test #65:
score: 32
Accepted
time: 13ms
memory: 4464kb
input:
200000 200000 10 47384 151075 137676 32559 32390 84987 38148 19218 98253 55335 100080 57554 49838 18910 126000 185315 35076 65073 188467 190288 142304 141861 23359 43240 195539 53164 98919 194510 123034 169005 91361 198612 192007 19749 33802 21927 161168 14400 124968 131471 188990 86930 29856 114493...
output:
85852
result:
ok single line: '85852'
Test #66:
score: 32
Accepted
time: 10ms
memory: 4412kb
input:
200000 8000 10 5270 4725 3069 4025 4956 5380 6399 6021 5232 2147 5904 5823 7560 1456 1518 719 6366 3104 4280 6007 5877 5618 5155 5494 7982 4171 3804 7193 4797 734 4396 4247 1185 7075 7525 6159 5231 4045 6729 4280 2686 4476 7252 6804 524 5818 7006 1898 1454 5743 5581 3504 5593 2419 6238 3358 5110 476...
output:
53262
result:
ok single line: '53262'
Test #67:
score: 32
Accepted
time: 9ms
memory: 4468kb
input:
200000 10 10 8 1 8 5 3 0 4 4 8 0 7 1 5 7 8 8 9 0 9 3 2 8 2 3 1 1 5 2 8 2 8 9 1 3 9 4 2 4 1 9 6 3 0 6 5 2 4 8 4 0 6 5 7 7 3 3 2 7 1 6 1 9 8 2 5 9 3 3 2 0 6 0 8 3 7 3 7 3 5 3 6 8 3 8 2 7 1 9 4 7 0 9 8 9 2 8 8 3 8 2 1 4 7 0 7 4 4 6 1 5 3 9 2 4 7 2 1 3 2 9 3 2 6 5 7 2 5 8 8 6 9 7 3 9 7 4 6 5 6 8 8 4 6 1...
output:
74681
result:
ok single line: '74681'
Test #68:
score: 32
Accepted
time: 1ms
memory: 3700kb
input:
4000 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0...
output:
974
result:
ok single line: '974'
Test #69:
score: 32
Accepted
time: 1ms
memory: 3668kb
input:
4000 11 10 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0 6 4 10 1 8 2 9 5 7 3 0...
output:
2419
result:
ok single line: '2419'
Test #70:
score: 32
Accepted
time: 1ms
memory: 3696kb
input:
4000 2500 10 2499 1481 1779 313 2499 1071 2231 571 192 2284 1001 1921 1306 1059 476 2499 1567 1600 1869 935 88 1726 1654 106 160 2499 1038 138 2499 644 1404 1200 572 2030 347 80 1441 1230 2273 1649 2180 1549 658 518 582 7 2499 726 1275 2499 801 1138 1335 2065 1710 1464 1231 1373 31 2244 590 1409 203...
output:
2311
result:
ok single line: '2311'
Test #71:
score: 32
Accepted
time: 1ms
memory: 3640kb
input:
4000 4000 10 3959 2905 2955 1968 2998 709 1458 3021 2579 843 3422 1642 2262 3350 3711 3137 2090 1010 3520 1361 1161 251 3 3353 773 242 1221 2873 3854 1988 2744 1164 2376 1894 3246 3361 2703 3086 432 2839 702 3976 231 659 380 1606 2132 1701 1467 613 2800 796 759 3494 2473 1796 821 417 1024 3499 2573 ...
output:
968
result:
ok single line: '968'
Test #72:
score: 32
Accepted
time: 0ms
memory: 3708kb
input:
4000 1600 10 181 882 718 1238 135 980 286 18 1441 690 1558 646 93 617 797 798 179 694 1266 690 388 872 816 1029 198 430 762 754 522 1059 1032 44 1566 1404 1172 796 358 369 422 398 702 1550 894 1207 720 1084 94 1557 773 245 1021 1458 656 386 1544 703 1173 1279 2 739 1139 58 383 393 305 585 791 15 726...
output:
532
result:
ok single line: '532'
Test #73:
score: 32
Accepted
time: 1ms
memory: 3684kb
input:
4000 10 10 7 9 0 6 9 5 0 8 6 9 6 0 9 7 0 5 7 4 9 8 9 0 3 4 3 2 9 5 3 0 7 7 8 6 6 4 6 0 2 4 2 4 1 2 8 0 5 0 2 8 1 1 7 0 6 7 9 7 0 2 1 5 8 6 8 5 3 3 5 9 4 8 0 4 9 6 1 9 7 8 6 6 9 0 6 1 5 4 5 8 7 0 8 8 9 7 4 0 8 1 8 5 8 4 5 0 8 1 5 4 6 7 7 8 5 7 9 4 7 0 8 7 9 5 0 8 2 2 0 1 4 1 0 6 7 6 0 3 3 4 5 0 6 3 0...
output:
479
result:
ok single line: '479'
Test #74:
score: 32
Accepted
time: 0ms
memory: 3604kb
input:
100 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 20
output:
22
result:
ok single line: '22'
Test #75:
score: 32
Accepted
time: 0ms
memory: 3612kb
input:
100 40 10 34 39 27 5 37 15 10 36 7 8 24 39 39 16 26 28 29 39 3 19 2 17 0 13 14 33 38 22 30 39 20 4 1 6 39 23 21 12 18 9 31 25 11 32 35 34 27 5 37 15 10 36 7 8 24 39 16 26 28 29 3 19 2 17 0 13 14 33 38 22 30 20 4 1 6 23 21 12 18 9 31 25 11 32 35 34 27 39 5 37 15 10 36 39 39 7 8 24 16 26 18 1 4 1 27 1...
output:
34
result:
ok single line: '34'
Test #76:
score: 32
Accepted
time: 1ms
memory: 3680kb
input:
100 10 10 1 9 5 2 7 4 5 9 0 9 8 3 7 4 8 5 3 9 5 2 9 6 3 8 1 6 1 8 2 5 3 6 3 7 0 1 5 1 4 9 2 5 5 3 4 9 9 1 9 4 6 8 0 4 8 8 4 3 1 7 7 6 3 9 2 8 5 2 4 2 0 0 8 2 5 8 3 6 6 6 7 3 0 5 2 8 4 2 4 5 5 4 6 9 1 9 4 8 6 4 2 10 8 12 1 8 5 13 7 6 6 10 9 12 3 10 4 13 0 6
output:
100
result:
ok single line: '100'
Test #77:
score: 32
Accepted
time: 0ms
memory: 3724kb
input:
100 100 10 50 88 54 56 22 26 74 80 8 6 48 33 30 2 40 94 13 60 59 98 44 32 36 38 64 51 69 65 27 9 90 85 49 99 14 3 12 16 52 78 89 5 57 41 10 28 61 62 76 83 46 34 18 4 81 95 92 55 82 75 17 79 87 37 66 7 0 11 58 77 15 24 23 97 72 73 84 21 39 91 20 96 93 43 1 31 86 71 35 63 67 45 25 70 42 68 19 53 47 29...
output:
impossible
result:
ok single line: 'impossible'
Test #78:
score: 32
Accepted
time: 0ms
memory: 3612kb
input:
100 50 10 34 6 16 0 38 26 33 27 10 42 23 6 12 14 10 3 11 34 6 38 15 33 14 13 45 36 38 39 41 2 0 36 46 6 15 25 8 19 47 5 30 49 27 0 9 17 43 4 49 46 37 14 7 32 40 43 7 35 28 0 16 40 17 26 40 11 7 26 31 22 24 48 8 20 35 18 20 25 5 23 49 36 25 31 47 29 28 39 38 45 41 41 1 19 23 44 0 21 31 24 3 89 28 73 ...
output:
impossible
result:
ok single line: 'impossible'
Test #79:
score: 32
Accepted
time: 0ms
memory: 3684kb
input:
10 10 1 1 4 5 2 7 6 9 0 3 8 3 1
output:
1
result:
ok single line: '1'
Test #80:
score: 32
Accepted
time: 0ms
memory: 3688kb
input:
100 100 10 94 65 80 5 52 58 87 19 51 98 9 6 26 77 12 92 57 39 56 30 43 25 78 67 3 42 28 31 61 40 44 70 59 36 50 1 46 18 68 60 27 64 11 38 69 15 93 82 79 23 7 71 48 0 63 29 4 54 90 2 8 74 32 16 73 53 95 85 91 55 33 75 14 66 84 86 34 83 22 35 21 76 89 37 10 72 62 13 20 96 24 17 88 45 41 49 81 99 97 47...
output:
12
result:
ok single line: '12'
Test #81:
score: 32
Accepted
time: 0ms
memory: 3680kb
input:
100 40 1 39 25 17 2 32 31 23 27 37 16 4 37 24 24 33 5 34 36 0 29 13 7 34 3 37 33 25 38 10 26 31 35 12 10 7 37 30 14 29 11 21 15 26 27 34 17 15 35 1 37 8 16 18 33 35 23 12 30 34 38 26 35 3 4 20 10 15 20 22 28 9 23 18 6 15 11 24 9 17 36 28 8 25 5 4 24 12 1 37 22 26 36 11 25 7 32 7 30 12 19 18 1
output:
1
result:
ok single line: '1'
Test #82:
score: 32
Accepted
time: 0ms
memory: 3540kb
input:
100 10 2 0 3 7 6 0 5 6 9 0 2 6 8 2 6 2 0 1 7 1 2 6 9 9 9 8 3 4 4 0 9 9 3 9 2 2 9 1 6 8 6 6 7 2 9 6 7 4 7 7 5 2 6 8 7 6 5 9 4 4 1 5 3 8 3 9 8 3 6 7 0 5 3 2 8 6 5 5 8 0 9 5 4 3 1 1 1 1 3 9 1 6 7 4 7 7 0 7 4 7 1 7 2 4 1
output:
3
result:
ok single line: '3'