QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#584488 | #9182. Infinite Race | ZhaoZiLong | 63 | 51ms | 8876kb | C++20 | 1.1kb | 2024-09-23 14:46:38 | 2024-09-23 14:46:38 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 29
Accepted
Test #1:
score: 29
Accepted
time: 0ms
memory: 3648kb
input:
2 1 1
output:
0
result:
ok single line: '0'
Test #2:
score: 29
Accepted
time: 0ms
memory: 3644kb
input:
2 2 1 -1
output:
0
result:
ok single line: '0'
Test #3:
score: 29
Accepted
time: 1ms
memory: 5700kb
input:
2 5 -1 -1 -1 -1 1
output:
0
result:
ok single line: '0'
Test #4:
score: 29
Accepted
time: 8ms
memory: 3672kb
input:
2 200000 1 1 -1 -1 -1 1 -1 1 1 1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 1 -1 -1 -1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 -...
output:
50154
result:
ok single line: '50154'
Test #5:
score: 29
Accepted
time: 8ms
memory: 3648kb
input:
2 200000 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 1 1 1 -1 1 1 1 -1 1 1 1 -1 1 1 1 1 1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 1 -1 1 1 -1 -1 1...
output:
50172
result:
ok single line: '50172'
Test #6:
score: 29
Accepted
time: 8ms
memory: 3660kb
input:
2 200000 1 1 1 1 1 1 1 1 -1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 1 -1 1 -1 1 -1 1 -1 -1 1 1 1 1 1 -1 1 1 1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 1 1 -1 -1 1 1 1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 1 1 1 -1 1 1 1 1 -1 1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 ...
output:
49713
result:
ok single line: '49713'
Test #7:
score: 29
Accepted
time: 8ms
memory: 3596kb
input:
2 200000 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 1 1 -1 1 1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 1 -1 -1 1 1 1 1 -1 -1 1 -1 -1 1 1 -1 1 -1 1 1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 1 -1 1 1 1 -1 1 -1 -1 -1 1 1 -1 1 1 1 -1 1 1 1 1 1 -1 -1 1...
output:
49564
result:
ok single line: '49564'
Test #8:
score: 29
Accepted
time: 1ms
memory: 5632kb
input:
2 100 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 1 1 1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 1 1 1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1
output:
16
result:
ok single line: '16'
Test #9:
score: 29
Accepted
time: 0ms
memory: 3704kb
input:
2 2 1 1
output:
1
result:
ok single line: '1'
Test #10:
score: 29
Accepted
time: 7ms
memory: 3652kb
input:
2 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
199999
result:
ok single line: '199999'
Test #11:
score: 29
Accepted
time: 0ms
memory: 3644kb
input:
2 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
output:
99
result:
ok single line: '99'
Test #12:
score: 29
Accepted
time: 7ms
memory: 5692kb
input:
2 200000 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -...
output:
0
result:
ok single line: '0'
Test #13:
score: 29
Accepted
time: 1ms
memory: 5700kb
input:
2 100 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1
output:
0
result:
ok single line: '0'
Test #14:
score: 29
Accepted
time: 8ms
memory: 3660kb
input:
2 200000 1 1 1 1 1 1 1 1 1 -1 1 1 -1 -1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 -1 1 1 1 1 1 1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 1 1 1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 1 1 -1 -1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 1 -1 -1 1 1 1...
output:
50402
result:
ok single line: '50402'
Test #15:
score: 29
Accepted
time: 0ms
memory: 3592kb
input:
2 100 1 1 1 -1 1 1 1 -1 -1 -1 -1 1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 1 1 1 -1 -1 -1 1 1 1 1 1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 1 1
output:
27
result:
ok single line: '27'
Test #16:
score: 29
Accepted
time: 8ms
memory: 3652kb
input:
2 200000 1 -1 1 -1 -1 -1 1 1 1 1 1 1 -1 -1 1 1 1 -1 1 1 1 -1 1 -1 1 1 1 1 -1 -1 1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 1 1 1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 1...
output:
49885
result:
ok single line: '49885'
Test #17:
score: 29
Accepted
time: 0ms
memory: 3652kb
input:
2 100 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
output:
84
result:
ok single line: '84'
Test #18:
score: 29
Accepted
time: 6ms
memory: 3588kb
input:
2 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
199987
result:
ok single line: '199987'
Test #19:
score: 29
Accepted
time: 0ms
memory: 3580kb
input:
2 4 1 1 1 1
output:
3
result:
ok single line: '3'
Test #20:
score: 29
Accepted
time: 0ms
memory: 3644kb
input:
2 5 1 -1 1 -1 -1
output:
0
result:
ok single line: '0'
Subtask #2:
score: 34
Accepted
Test #21:
score: 34
Accepted
time: 0ms
memory: 3660kb
input:
2 2 1 1
output:
1
result:
ok single line: '1'
Test #22:
score: 34
Accepted
time: 3ms
memory: 3596kb
input:
2 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
199999
result:
ok single line: '199999'
Test #23:
score: 34
Accepted
time: 0ms
memory: 3640kb
input:
2 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
output:
99
result:
ok single line: '99'
Test #24:
score: 34
Accepted
time: 0ms
memory: 3648kb
input:
100 100 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1
output:
1
result:
ok single line: '1'
Test #25:
score: 34
Accepted
time: 33ms
memory: 7876kb
input:
200000 200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...
output:
1
result:
ok single line: '1'
Test #26:
score: 34
Accepted
time: 0ms
memory: 3664kb
input:
200000 1 182487
output:
0
result:
ok single line: '0'
Test #27:
score: 34
Accepted
time: 5ms
memory: 3720kb
input:
3 200000 1 2 1 2 2 2 1 1 1 2 2 2 1 2 2 2 2 1 1 2 2 1 2 2 1 2 2 1 2 1 1 2 2 2 2 2 1 2 2 2 1 1 2 1 1 2 2 1 2 2 1 2 2 1 1 2 2 2 2 2 2 1 2 1 1 1 2 1 1 2 1 1 1 2 1 1 2 2 2 1 1 1 1 2 1 2 2 1 2 1 2 1 2 1 2 2 2 1 2 2 2 1 1 1 1 2 1 1 2 2 2 2 1 2 1 2 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 2 2 2 2 2 2 1 1 1 2 2...
output:
133415
result:
ok single line: '133415'
Test #28:
score: 34
Accepted
time: 9ms
memory: 3704kb
input:
4 200000 3 2 1 3 2 2 2 1 1 1 2 3 3 2 1 1 1 3 1 1 3 3 1 1 3 1 2 2 1 2 1 3 2 2 2 2 1 3 1 1 2 2 3 1 1 3 1 3 1 3 3 2 1 2 3 1 1 1 3 2 1 3 2 2 2 3 1 3 2 3 2 2 3 1 1 3 1 2 2 1 2 1 1 1 1 2 2 1 2 2 1 2 2 1 2 2 3 2 3 2 3 1 3 2 3 2 1 3 3 2 3 3 2 3 3 3 3 3 3 2 3 2 2 1 3 2 3 2 3 2 1 1 2 2 3 2 3 1 1 2 3 2 3 3 2 2...
output:
105734
result:
ok single line: '105734'
Test #29:
score: 34
Accepted
time: 11ms
memory: 3664kb
input:
10 200000 3 4 4 8 3 7 3 6 4 2 8 5 3 6 8 6 9 2 7 5 5 4 4 1 9 3 5 5 1 5 2 1 2 8 2 1 8 5 9 1 3 5 7 4 5 2 8 8 8 5 4 2 8 9 7 3 3 1 8 8 3 5 6 4 2 3 9 5 9 1 3 9 6 8 1 7 4 8 9 2 5 5 8 4 4 3 1 3 4 4 7 2 8 2 8 9 3 9 4 7 1 3 5 2 3 7 2 7 3 6 5 3 1 3 1 4 7 8 7 6 6 5 4 2 9 6 8 1 1 4 5 1 8 3 1 7 6 7 1 3 8 6 2 4 4 ...
output:
57864
result:
ok single line: '57864'
Test #30:
score: 34
Accepted
time: 16ms
memory: 3660kb
input:
30 200000 18 9 9 18 3 26 1 17 16 14 17 29 13 1 18 27 19 17 29 2 27 27 4 15 15 16 24 12 19 13 17 23 15 5 25 10 26 23 19 17 22 17 3 15 12 2 5 24 7 20 25 25 25 13 13 18 7 8 27 3 23 8 9 11 27 7 12 4 11 9 4 15 20 26 8 22 9 20 20 20 24 19 25 5 12 27 28 11 16 14 16 20 16 28 6 29 1 16 24 11 19 18 21 9 2 14 ...
output:
31054
result:
ok single line: '31054'
Test #31:
score: 34
Accepted
time: 24ms
memory: 3588kb
input:
203 200000 100 186 4 75 56 130 181 36 161 3 191 32 73 58 164 195 30 33 131 124 53 99 135 140 1 124 29 89 16 34 161 152 54 188 65 43 181 28 83 169 160 47 44 59 145 195 79 27 176 18 179 144 11 195 36 85 169 90 146 93 73 66 11 155 133 63 90 108 107 90 137 65 143 120 154 94 86 202 122 17 56 71 84 179 11...
output:
11485
result:
ok single line: '11485'
Test #32:
score: 34
Accepted
time: 35ms
memory: 3648kb
input:
4000 200000 2985 3407 1143 3560 1007 1855 1639 590 2231 1529 1435 3586 1692 2369 3019 1377 331 3435 1266 2126 2560 3319 295 303 892 360 3487 2092 2712 3029 626 672 228 3846 493 3026 1981 1196 2227 1411 1463 3677 1658 714 630 860 3156 2080 2963 1977 2485 2147 2792 2299 371 1559 2848 2324 3115 851 347...
output:
2483
result:
ok single line: '2483'
Test #33:
score: 34
Accepted
time: 44ms
memory: 6612kb
input:
50000 200000 41213 30997 8619 41861 41316 30105 15006 5065 11015 16985 31909 37042 39467 40487 19883 28554 27460 15459 25824 13158 13066 35584 18001 12362 2818 25831 41729 38972 7193 37946 26803 47535 24225 38582 11225 18966 7044 30591 39076 47171 26818 48011 43377 14636 38329 19199 26087 4199 27793...
output:
708
result:
ok single line: '708'
Test #34:
score: 34
Accepted
time: 51ms
memory: 7684kb
input:
200000 200000 152734 110923 16496 149622 42618 139250 114608 26400 7774 14830 41079 28404 141560 75920 122036 159829 188426 1794 58069 67219 56319 87589 152026 49931 198814 121631 50352 35306 149116 96622 76915 32475 19261 145376 171230 135192 9951 12008 120134 56675 9658 365 164993 86997 101564 463...
output:
355
result:
ok single line: '355'
Test #35:
score: 34
Accepted
time: 46ms
memory: 8760kb
input:
200000 200000 27246 74011 14368 132003 132822 73717 178219 138282 64714 1226 87554 9175 85526 136668 35925 137518 192376 7331 5282 114513 109561 15792 123812 27275 103776 150744 63065 44068 41587 8571 164073 70684 31713 126280 129481 127543 74628 53503 157457 53412 48385 118805 190850 61145 759 6632...
output:
353
result:
ok single line: '353'
Test #36:
score: 34
Accepted
time: 51ms
memory: 7752kb
input:
200000 200000 38946 72672 90488 178872 198147 148517 21120 135564 141486 146690 158535 117398 53985 61630 32324 166488 191602 182605 17450 10007 44955 2832 164706 106964 73485 47865 180127 177432 153405 118096 34895 53548 1579 27202 181777 187006 169313 126798 137850 77449 194252 194736 143109 17519...
output:
371
result:
ok single line: '371'
Test #37:
score: 34
Accepted
time: 0ms
memory: 3640kb
input:
100 100 92 24 44 6 56 47 78 13 79 24 86 40 7 40 3 33 1 63 9 82 73 40 4 92 88 1 9 77 24 27 22 74 55 26 49 99 64 28 20 49 62 11 78 10 69 76 93 96 18 65 20 2 91 4 81 61 41 29 18 3 93 6 31 7 91 58 78 46 56 69 92 46 96 36 22 84 4 8 62 64 61 38 91 2 87 46 27 63 35 55 10 7 74 60 73 45 83 94 40 70
output:
7
result:
ok single line: '7'
Test #38:
score: 34
Accepted
time: 0ms
memory: 3704kb
input:
100 100 26 26 11 16 83 11 16 16 11 26 11 16 11 16 26 16 11 16 99 16 11 26 26 11 16 27 26 11 16 11 11 11 11 16 26 92 16 16 11 26 16 11 26 16 16 26 16 16 11 11 26 16 26 11 11 26 1 11 2 11 11 11 11 16 16 16 26 11 11 80 16 26 16 26 26 11 11 26 16 35 26 26 26 38 11 11 11 16 16 16 26 16 20 11 26 26 16 26 ...
output:
46
result:
ok single line: '46'
Test #39:
score: 34
Accepted
time: 21ms
memory: 8876kb
input:
200000 200000 29665 27299 91359 91359 29665 91359 91359 91359 91359 29665 27299 27299 29665 23871 91359 91359 29665 91359 27299 27299 91359 29665 27299 37574 91359 29665 91359 52912 91359 27299 29665 27299 27299 27299 27299 29665 30652 91359 29665 29665 91359 29665 27299 81391 27299 91359 27299 2966...
output:
95191
result:
ok single line: '95191'
Test #40:
score: 34
Accepted
time: 0ms
memory: 3644kb
input:
100 100 66 66 8 8 45 45 97 97 58 58 34 34 71 71 20 69 69 54 54 53 53 43 43 88 88 34 34 76 76 74 74 62 62 42 42 50 50 89 89 66 66 44 44 56 56 96 96 33 33 15 20 15 24 24 12 12 64 64 46 46 21 21 15 15 92 99 99 68 41 87 87 64 64 17 17 73 73 58 44 66 58 92 92 68 68 51 49 49 52 6 49 52 7 7 71 71 50 50 95 95
output:
45
result:
ok single line: '45'
Test #41:
score: 34
Accepted
time: 46ms
memory: 8876kb
input:
200000 200000 48508 48508 192753 192753 128554 128554 9725 9725 81029 81029 24266 24266 94313 94313 153565 153565 64878 64878 24712 24712 50046 50046 196752 196752 140257 140257 72031 72031 180537 180537 68161 68161 30314 30314 179259 179259 162787 162787 11787 11787 21698 21698 179267 179267 154017...
output:
99995
result:
ok single line: '99995'
Test #42:
score: 34
Accepted
time: 0ms
memory: 3644kb
input:
2 4 1 1 1 1
output:
3
result:
ok single line: '3'
Test #43:
score: 34
Accepted
time: 0ms
memory: 5804kb
input:
200000 7 199999 199999 1 199999 55 199999 55
output:
3
result:
ok single line: '3'
Test #44:
score: 34
Accepted
time: 0ms
memory: 3588kb
input:
3 6 1 2 2 2 1 1
output:
3
result:
ok single line: '3'
Subtask #3:
score: 0
Wrong Answer
Test #45:
score: 22
Accepted
time: 0ms
memory: 3584kb
input:
2 1 1
output:
0
result:
ok single line: '0'
Test #46:
score: 22
Accepted
time: 0ms
memory: 3584kb
input:
2 2 1 -1
output:
0
result:
ok single line: '0'
Test #47:
score: 22
Accepted
time: 1ms
memory: 5696kb
input:
2 5 -1 -1 -1 -1 1
output:
0
result:
ok single line: '0'
Test #48:
score: 22
Accepted
time: 0ms
memory: 5700kb
input:
2 100 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 1 1 1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 1 1 1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1
output:
16
result:
ok single line: '16'
Test #49:
score: 22
Accepted
time: 0ms
memory: 3704kb
input:
2 2 1 1
output:
1
result:
ok single line: '1'
Test #50:
score: 22
Accepted
time: 0ms
memory: 3580kb
input:
2 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
output:
99
result:
ok single line: '99'
Test #51:
score: 22
Accepted
time: 0ms
memory: 5656kb
input:
2 100 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1
output:
0
result:
ok single line: '0'
Test #52:
score: 22
Accepted
time: 0ms
memory: 3652kb
input:
2 100 1 1 1 -1 1 1 1 -1 -1 -1 -1 1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 1 1 1 -1 -1 -1 1 1 1 1 1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 1 1
output:
27
result:
ok single line: '27'
Test #53:
score: 22
Accepted
time: 0ms
memory: 3588kb
input:
2 100 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 -1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
output:
84
result:
ok single line: '84'
Test #54:
score: 22
Accepted
time: 0ms
memory: 3572kb
input:
100 100 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1
output:
1
result:
ok single line: '1'
Test #55:
score: 22
Accepted
time: 0ms
memory: 3588kb
input:
100 100 92 24 44 6 56 47 78 13 79 24 86 40 7 40 3 33 1 63 9 82 73 40 4 92 88 1 9 77 24 27 22 74 55 26 49 99 64 28 20 49 62 11 78 10 69 76 93 96 18 65 20 2 91 4 81 61 41 29 18 3 93 6 31 7 91 58 78 46 56 69 92 46 96 36 22 84 4 8 62 64 61 38 91 2 87 46 27 63 35 55 10 7 74 60 73 45 83 94 40 70
output:
7
result:
ok single line: '7'
Test #56:
score: 22
Accepted
time: 0ms
memory: 3588kb
input:
100 100 26 26 11 16 83 11 16 16 11 26 11 16 11 16 26 16 11 16 99 16 11 26 26 11 16 27 26 11 16 11 11 11 11 16 26 92 16 16 11 26 16 11 26 16 16 26 16 16 11 11 26 16 26 11 11 26 1 11 2 11 11 11 11 16 16 16 26 11 11 80 16 26 16 26 26 11 11 26 16 35 26 26 26 38 11 11 11 16 16 16 26 16 20 11 26 26 16 26 ...
output:
46
result:
ok single line: '46'
Test #57:
score: 22
Accepted
time: 0ms
memory: 3588kb
input:
100 100 66 66 8 8 45 45 97 97 58 58 34 34 71 71 20 69 69 54 54 53 53 43 43 88 88 34 34 76 76 74 74 62 62 42 42 50 50 89 89 66 66 44 44 56 56 96 96 33 33 15 20 15 24 24 12 12 64 64 46 46 21 21 15 15 92 99 99 68 41 87 87 64 64 17 17 73 73 58 44 66 58 92 92 68 68 51 49 49 52 6 49 52 7 7 71 71 50 50 95 95
output:
45
result:
ok single line: '45'
Test #58:
score: 0
Wrong Answer
time: 1ms
memory: 5620kb
input:
100 100 -14 29 -84 -95 83 83 90 -29 5 1 22 -32 23 -53 38 89 53 -46 -69 -69 -60 -40 -33 -91 -81 3 55 47 5 42 31 -58 -98 -49 74 -29 3 -92 -17 81 58 54 -24 14 82 98 33 43 -66 -6 16 14 26 -19 -57 -51 -86 30 -62 34 -23 -25 10 -45 5 25 -60 -89 7 6 -77 -30 -47 -99 -73 80 -59 85 -94 14 -86 -70 63 -58 87 32 ...
output:
1
result:
wrong answer 1st lines differ - expected: '4', found: '1'
Subtask #4:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
0%