QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#284750 | #7942. $K$ Subsequences | ucup-team1782# | AC ✓ | 762ms | 15120kb | C++14 | 993b | 2023-12-16 14:51:57 | 2023-12-16 14:51:57 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3440kb
input:
5 3 2 1 -1 1 4 2 -1 1 1 -1 7 3 1 1 1 1 1 1 1 10 3 1 1 1 1 -1 -1 1 1 1 1 12 4 1 1 1 1 -1 -1 -1 -1 1 1 1 1
output:
1 1 2 2 1 2 2 1 2 3 1 2 3 1 1 2 3 1 1 1 1 2 3 1 1 2 3 4 4 3 2 1 4 3 2 1
result:
ok Correct (5 test cases)
Test #2:
score: 0
Accepted
time: 62ms
memory: 3448kb
input:
18434 10 1 -1 1 1 -1 -1 1 -1 -1 1 1 10 2 -1 -1 -1 1 1 -1 1 1 1 1 10 2 1 -1 -1 -1 -1 1 1 -1 1 1 10 7 1 1 -1 1 -1 1 1 -1 -1 1 9 1 -1 1 -1 1 1 -1 1 -1 1 8 1 -1 -1 -1 -1 1 1 -1 -1 10 3 -1 -1 -1 1 1 1 1 -1 -1 -1 9 1 1 -1 -1 1 -1 -1 -1 -1 -1 10 10 -1 1 1 1 1 1 1 1 1 1 10 4 -1 1 -1 1 -1 1 1 -1 1 1 9 3 1 1 ...
output:
1 1 1 1 1 1 1 1 1 1 2 2 2 1 2 2 2 1 2 1 1 1 1 1 1 2 1 1 1 2 1 2 2 3 3 4 5 5 4 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 1 2 3 1 1 1 3 1 1 1 1 1 1 1 1 1 10 1 2 3 4 5 6 7 8 9 4 1 1 2 2 3 4 4 1 2 1 2 2 1 3 3 2 2 2 1 2 2 3 4 2 2 2 7 1 2 3 4 5 6 7 7 7 1 1 1 2 2 2 3 4 4 1 1 1 1 1 1 1 1 1 1 ...
result:
ok Correct (18434 test cases)
Test #3:
score: 0
Accepted
time: 120ms
memory: 5776kb
input:
1 199996 3 1 -1 1 1 1 1 -1 -1 -1 1 1 -1 1 -1 1 1 -1 -1 1 1 1 1 -1 1 -1 -1 -1 1 -1 1 1 1 1 1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 -1 1 1 1 1 1 1 1 1 -1 -1 -1 -1 1 1 -1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 1 -1 1 -1 1 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:
1 1 2 3 1 2 2 2 1 2 1 1 1 1 1 3 3 3 3 2 1 3 3 3 3 1 2 3 3 1 2 3 1 2 3 1 1 1 3 1 1 2 3 1 1 3 3 3 3 3 2 2 1 1 1 1 3 2 1 1 1 3 2 1 3 2 1 3 3 3 1 2 3 1 1 2 1 1 1 1 2 3 3 2 3 2 2 3 2 3 3 3 3 3 1 1 2 3 1 1 1 1 1 2 3 3 2 2 2 1 1 1 1 1 2 3 3 2 1 3 2 1 1 1 3 2 1 3 2 2 1 1 2 1 3 3 3 1 2 3 3 1 1 2 3 3 2 1 1 3 ...
result:
ok Correct (1 test case)
Test #4:
score: 0
Accepted
time: 238ms
memory: 5780kb
input:
1 199998 152 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 -1 1 -1 1 1 1 1 -1 1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 -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:
152 1 1 1 2 2 2 2 2 2 2 3 3 3 4 4 4 4 5 5 5 6 6 7 8 8 7 9 10 11 11 10 9 12 12 13 13 14 15 15 14 14 14 14 14 14 14 16 16 17 18 18 17 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 19 27 27 28 29 30 31 31 32 33 34 34 33 35 35 32 36 37 37 36 30 29 38 38 28 39 39 40 41 41 42 43 43 42 44 44 40 45 45 46 46 ...
result:
ok Correct (1 test case)
Test #5:
score: 0
Accepted
time: 220ms
memory: 5912kb
input:
1 199996 136 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 1 1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 -1 1 1 1 -1 1 1 1 1 1 -1 -1 1 -1 1 -1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 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:
136 1 2 3 4 5 5 6 6 4 7 7 8 9 9 8 10 11 12 13 14 14 15 15 13 16 16 17 18 18 17 19 19 12 20 20 21 22 23 24 25 26 26 25 24 23 27 27 22 21 11 10 3 2 1 28 29 30 30 31 32 33 33 34 35 36 37 38 38 37 39 39 40 40 36 41 42 43 44 44 45 45 43 42 41 46 47 47 46 35 34 48 48 49 50 51 52 53 53 52 54 55 56 57 58 59...
result:
ok Correct (1 test case)
Test #6:
score: 0
Accepted
time: 511ms
memory: 9868kb
input:
1 199998 86240 1 1 -1 1 1 1 1 1 1 -1 1 1 -1 1 -1 -1 -1 1 1 1 1 1 1 1 -1 1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 1 1 1 1 -1 1 -1 1 -1 1 -1 -1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 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:
1 2 2 3 4 5 6 7 8 8 9 10 10 11 11 9 7 12 13 14 15 16 17 18 18 19 20 21 22 23 23 24 24 22 21 20 19 17 16 15 25 25 14 26 26 13 12 6 27 28 28 27 5 29 30 30 29 31 32 32 33 33 34 34 35 35 36 37 38 39 40 40 41 41 42 42 43 43 39 44 45 46 46 45 44 38 37 36 47 48 49 50 50 49 48 51 52 52 51 53 53 54 55 56 56 ...
result:
ok Correct (1 test case)
Test #7:
score: 0
Accepted
time: 762ms
memory: 15120kb
input:
1 199998 196586 1 -1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 1 1 -1 1 1 -1 1 1 1 1 -1 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -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:
1 1 1 1 2 2 3 3 4 4 4 4 5 5 5 5 6 6 6 6 6 6 7 7 8 9 10 10 9 8 11 11 11 11 12 13 13 14 14 15 15 16 17 18 18 17 16 12 19 19 19 19 20 20 20 21 21 21 21 22 23 24 25 26 26 27 28 28 29 30 31 32 32 31 30 33 34 34 33 35 36 36 35 29 37 37 27 25 38 38 24 23 39 39 22 40 40 41 41 41 42 42 43 43 44 45 45 44 44 4...
result:
ok Correct (1 test case)
Test #8:
score: 0
Accepted
time: 587ms
memory: 10836kb
input:
2 53064 32664 1 1 1 -1 1 1 1 -1 1 1 1 -1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 1 -1 -1 -1 -1 1 1 1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 1 1 1 -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:
1 2 3 3 4 5 6 6 7 8 9 9 8 10 10 7 11 12 13 13 12 14 14 15 16 17 17 16 15 18 18 11 5 4 2 19 19 20 20 1 21 21 21 22 23 23 22 22 22 24 25 26 26 27 27 25 24 24 28 29 30 31 31 32 33 33 34 34 35 35 32 36 36 37 37 30 38 38 39 40 40 41 42 42 41 39 43 44 45 46 47 47 48 49 49 50 51 51 50 48 46 52 53 53 52 45 ...
result:
ok Correct (2 test cases)
Test #9:
score: 0
Accepted
time: 110ms
memory: 4876kb
input:
2 86135 2 1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 1 -1 1 1 1 1 -1 -1 1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 1 1 -1 1 1 1 -1 1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -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:
1 2 2 1 1 2 1 1 1 1 2 1 1 2 2 2 2 1 1 2 1 2 1 1 2 1 1 1 1 2 1 1 2 1 2 2 1 1 1 2 1 2 1 2 1 2 2 2 2 1 2 1 2 2 2 2 2 1 1 2 2 2 2 2 1 1 2 1 1 1 1 2 1 1 1 1 1 2 2 1 2 1 1 2 2 1 1 2 2 2 1 1 2 2 1 1 2 2 2 1 1 2 2 1 2 1 2 1 2 1 1 2 2 1 1 2 2 1 2 2 1 1 1 2 1 1 1 1 1 1 2 2 1 1 2 2 2 2 2 2 2 1 1 1 1 2 2 1 2 2 ...
result:
ok Correct (2 test cases)
Test #10:
score: 0
Accepted
time: 300ms
memory: 6112kb
input:
2 114819 248 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 1 1 -1 -1 -1 -1 1 1 1 1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 -1 1 -1 1 -1 -1 -1 1 1 -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:
248 248 248 248 248 1 1 2 2 2 3 3 4 5 5 6 6 4 7 7 7 8 8 9 9 10 10 10 10 10 10 10 10 10 11 11 12 12 12 13 13 14 15 16 17 17 16 15 14 18 19 20 21 22 22 21 23 23 20 19 24 24 18 18 25 25 25 26 27 27 26 26 28 29 29 28 28 30 30 31 31 31 31 32 33 33 32 32 32 34 35 36 36 35 34 34 37 37 37 37 38 39 40 40 39 ...
result:
ok Correct (2 test cases)
Test #11:
score: 0
Accepted
time: 318ms
memory: 6644kb
input:
2 51745 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 1 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 1 1 -1 1 1 -1 1 1 1 -1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -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:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok Correct (2 test cases)
Test #12:
score: 0
Accepted
time: 84ms
memory: 5676kb
input:
2 190655 1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 1 1 1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 -1 1 1 1 -1 -1 -1 -1 -1 1 1 -1 1 -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:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok Correct (2 test cases)
Test #13:
score: 0
Accepted
time: 189ms
memory: 5376kb
input:
3 509 3 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1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22 23 23 24 25 26 26 25 24 27 28 29 30 31 32 33 33 32 31 30 34 34 29 28 27 35 35 36 36 37 38 38 39 39 40 41 41 40 42 43 44 45 46 47 47 46 48 49 49 50 51 51...
result:
ok Correct (4 test cases)
Test #15:
score: 0
Accepted
time: 329ms
memory: 6316kb
input:
5 7824 2 -1 -1 -1 -1 1 1 1 1 -1 1 1 1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 1 -1 1 -1 1 1 -1 1 1 1 1 -1 1 1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -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:
2 2 2 2 1 2 1 2 2 2 1 2 2 2 2 1 2 1 1 2 2 2 2 2 2 2 2 2 1 1 2 1 2 1 1 1 2 2 1 2 1 1 2 2 2 1 2 2 2 1 2 2 2 2 2 1 1 1 1 2 2 1 1 1 1 2 1 1 2 1 2 1 2 2 2 2 1 2 2 1 1 2 2 1 1 1 1 2 2 1 1 2 2 1 2 1 2 2 2 2 1 1 2 2 2 1 1 2 2 1 1 2 1 2 2 2 1 2 2 2 2 1 1 2 2 2 1 1 1 1 2 1 2 2 1 1 1 2 1 2 1 2 1 2 2 1 2 1 2 1 ...
result:
ok Correct (5 test cases)
Test #16:
score: 0
Accepted
time: 193ms
memory: 4632kb
input:
6 7149 4795 -1 -1 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 1 1 1 -1 -1 1 -1 1 1 1 -1 1 1 1 1 -1 1 -1 1 -1 1 -1 1 1 1 1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 1 1 -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:
4795 4795 1 1 1 2 3 3 4 5 6 7 7 8 8 6 5 4 2 2 2 9 9 9 10 10 10 11 11 11 11 11 12 13 14 15 15 16 16 17 18 19 19 18 20 20 21 22 23 23 24 25 26 27 27 28 28 29 29 30 30 31 32 33 34 35 36 37 38 38 39 39 37 36 35 34 33 32 31 26 40 41 41 42 43 43 42 40 25 44 45 46 46 47 48 48 49 49 50 50 51 52 52 53 53 51 ...
result:
ok Correct (6 test cases)
Test #17:
score: 0
Accepted
time: 109ms
memory: 4668kb
input:
7 16819 1 1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 1 1 1 -1 1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 1 -1 1 1 -1 -1 1 1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 1 1 1 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:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok Correct (7 test cases)
Test #18:
score: 0
Accepted
time: 250ms
memory: 5676kb
input:
8 29021 106 -1 -1 -1 -1 1 -1 1 -1 1 -1 1 1 1 -1 -1 1 1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 1 1 -1 -1 -1 1 1 1 1 1 1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 1 1 -1 1 1 -1 1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 -1 -1 -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:
106 106 106 106 1 1 2 2 3 3 4 5 6 6 5 7 8 9 10 11 11 10 12 13 13 12 9 14 15 15 14 8 7 4 4 16 17 17 18 19 20 20 19 18 21 22 23 24 25 26 27 28 28 29 29 30 30 27 31 31 32 32 33 33 34 35 35 36 37 37 38 38 36 34 39 40 41 42 42 41 40 39 43 43 44 44 26 45 46 46 45 25 47 47 48 49 49 50 51 52 52 53 53 54 55 ...
result:
ok Correct (8 test cases)
Test #19:
score: 0
Accepted
time: 152ms
memory: 4672kb
input:
9 37136 1 -1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 1 1 1 1 -1 1 1 -1 1 1 1 -1 -1 1 1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 1 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 -1 1 -1 -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:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok Correct (9 test cases)
Test #20:
score: 0
Accepted
time: 306ms
memory: 8244kb
input:
10 5543 1596 1 1 1 -1 1 1 1 -1 -1 -1 1 1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 1 -1 -1 1 1 -1 1 1 -1 1 -1 1 1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 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:
1 2 3 3 4 5 6 6 5 4 7 8 8 7 2 9 9 10 10 1 11 11 11 11 11 11 11 11 12 13 13 14 14 12 12 15 16 16 17 17 15 15 18 18 19 20 20 19 21 22 23 24 25 25 24 26 27 27 28 29 29 30 30 31 32 32 31 28 33 33 34 34 26 35 35 23 22 36 36 21 37 37 37 38 38 39 39 39 40 40 40 40 40 40 40 41 42 43 44 44 43 42 41 45 46 47 ...
result:
ok Correct (10 test cases)
Test #21:
score: 0
Accepted
time: 127ms
memory: 3672kb
input:
100 2336 29 -1 -1 -1 1 -1 1 1 -1 -1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 1 1 1 1 -1 1 1 -1 1 -1 1 1 1 -1 -1 -1 -1 -1 1 1 -1 1 1 -1 -1 1 1 -1 -1 1 1 -1 -1 1 -1 -1 -1 1 -1 -1 -1 1 1 1 1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 1 1 1 1 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:
29 29 29 1 1 2 3 3 2 2 4 4 4 5 6 7 8 9 10 10 9 11 12 12 13 13 11 8 14 14 7 15 16 17 18 18 19 20 20 21 21 22 23 24 24 23 22 19 17 25 26 26 27 28 28 27 29 1 1 29 3 2 2 3 4 4 25 16 10 10 15 6 9 12 13 11 8 8 11 14 14 13 12 9 5 5 7 7 18 20 21 24 23 23 22 19 17 17 26 28 27 27 1 1 29 29 2 3 4 25 16 16 10 1...
result:
ok Correct (100 test cases)
Test #22:
score: 0
Accepted
time: 145ms
memory: 3668kb
input:
101 92 1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 1 -1 1 1 1 1 -1 -1 1 1 1 1 1 1 1 1 1 1 -1 -1 2647 2314 -1 1 -1 -1 1 1 1 -1 1 1 1 1 -1 1 -1 -1 1 -1 -1...
output:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2314 1 1 1 2 3 4 4 5 6 7 8 8 9 9 7 10 10 6 5 11 11 3 2 12 13 13 12 14 14 14 14 14 14 15 16 16 15 15 15 17 18 19 19 ...
result:
ok Correct (101 test cases)
Test #23:
score: 0
Accepted
time: 157ms
memory: 5944kb
input:
102 8381 7064 -1 -1 1 1 -1 -1 1 -1 1 1 1 1 1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 1 1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 -1 -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:
7064 7064 1 2 2 1 3 3 4 5 6 7 8 8 7 9 9 10 10 11 12 13 13 12 11 14 14 15 16 17 18 18 17 16 15 19 20 21 21 20 22 23 23 24 24 25 25 22 26 26 19 27 27 28 29 29 28 30 31 32 32 31 30 33 34 35 36 37 38 38 37 39 39 40 40 36 35 34 41 42 42 43 44 44 43 45 45 41 46 46 33 6 47 47 5 48 48 49 50 50 49 51 52 53 5...
result:
ok Correct (102 test cases)
Test #24:
score: 0
Accepted
time: 130ms
memory: 5724kb
input:
103 1976 404 1 -1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 1 1 1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 1 1 1 1 -1 -1 -1 1 -1 1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 -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:
1 1 1 2 2 2 2 2 3 4 5 5 6 7 7 6 8 8 9 9 10 10 4 11 12 13 14 14 13 15 16 17 17 18 18 16 19 19 20 20 21 21 22 23 24 25 26 27 27 26 28 28 25 29 30 31 32 33 34 34 33 35 36 37 38 38 37 36 39 39 40 40 41 42 43 44 44 45 45 43 42 41 46 46 35 47 47 32 31 48 48 30 29 49 49 50 51 51 52 53 53 54 54 55 55 52 50 ...
result:
ok Correct (103 test cases)
Test #25:
score: 0
Accepted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 10 5 2 6 6 6 2 6 2 2 6 5 2 2 10 6 6 1 4 5 5 2 10 10 6 6 1 4 4 5 5 1 2 3 9 8 7 7 10 10 6 6 6 6 4 4 4 5 5 1 2 3 3 9 9 8 7 10 6 6 4 5 3 3 9 9 5 4 6 6 3 9 9 5 5 4 6 9 9 5 5 9 9 6 5 9 9 5 6 9 9 5 5 6 4 3 9 9 10 7 5 6 4 4 3 9 9 3 10 7 7 4 9 3 7 1 2 2 8 5...
result:
ok Correct (105 test cases)
Test #27:
score: 0
Accepted
time: 88ms
memory: 5508kb
input:
1000 1284 8 1 1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 -1 1 1 1 1 -1 -1 1 -1 1 -1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 1 -1 1 1 1 -1 1 1 -1 1 -1 1 -1 -1 -1 1 1 -1 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:
1 2 3 4 4 5 5 3 2 1 6 7 7 6 8 4 5 3 3 2 2 1 7 7 6 3 2 7 7 2 7 7 2 2 7 2 8 8 4 4 4 4 4 8 2 4 8 2 2 8 2 8 8 2 4 7 8 2 4 4 7 4 4 7 4 4 2 7 4 2 5 5 1 1 6 3 8 8 7 4 2 2 5 1 1 8 8 2 2 5 4 1 8 8 2 5 4 8 6 6 6 8 6 6 4 5 8 8 6 6 2 1 7 4 5 8 6 6 2 1 1 2 8 5 4 7 6 6 1 2 2 1 7 8 5 4 4 5 6 6 2 1 1 2 7 4 5 5 6 6 ...
result:
ok Correct (1000 test cases)
Test #28:
score: 0
Accepted
time: 94ms
memory: 5528kb
input:
1001 151 3 1 1 -1 1 -1 1 -1 1 1 -1 1 1 1 1 1 1 1 -1 1 1 -1 -1 1 1 -1 1 -1 1 -1 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3 2 2 5 1 1 5 3 2 1 5 5 5 6 6 6 5 1 6 5 1 4 3 2 6 6 5 5 2 3 1 1 4 4 1 4 1 1 4 3 2 1 1 4 3 2 1 1 1 6 5 5 4 4 6 6 4 6 6 5 1 4 4 2 6 6 3 3 5 5 5 1 1 4 2 6 3 3 6 ...
result:
ok Correct (1002 test cases)
Test #30:
score: 0
Accepted
time: 91ms
memory: 3444kb
input:
1003 95 16 1 -1 -1 1 1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 1 1 -1 -1 -1 -1 1 1 -1 1 1 1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 -1 1 1 526 3 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
output:
1 1 1 2 3 4 4 3 2 2 2 5 6 7 7 6 5 5 8 9 10 10 11 11 12 13 13 12 9 8 14 14 15 15 15 15 16 16 16 1 1 4 4 4 3 3 3 2 2 2 2 7 6 5 5 10 11 13 13 11 10 6 12 9 9 8 14 15 16 1 1 16 4 3 3 4 15 2 2 14 8 12 7 5 5 5 5 13 11 10 6 6 10 9 1 1 1 1 2 3 3 2 2 2 2 2 2 2 2 2 1 1 3 2 1 1 2 1 2 3 3 1 2 2 3 3 1 1 3 1 3 2 ...
result:
ok Correct (1003 test cases)
Test #31:
score: 0
Accepted
time: 95ms
memory: 3652kb
input:
1004 322 257 -1 1 1 1 1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 -1 -1 1 1 1 1 1 1 -1 1 1 -1 1 -1 1 -1 1 1 -1 1 -1 1 1 1 -1 1 1 -1 -1 1 -1 1 1 -1 -1 -1 1 -1 1 -1 1 -1 1 1 1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 1 1 -1 -1 1 1 1 1 1 1 1 1 -1 -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:
257 1 2 3 4 5 6 6 5 7 8 8 7 4 9 9 3 10 10 11 11 2 1 12 13 14 15 16 17 17 18 19 19 20 20 21 21 22 23 23 24 24 25 26 27 27 28 29 29 28 30 30 31 32 32 31 26 33 33 34 34 35 35 36 37 38 38 39 40 41 41 40 42 43 43 42 39 44 45 46 47 48 49 50 50 49 51 52 53 54 55 56 57 58 58 57 56 59 59 60 60 61 62 62 61 55...
result:
ok Correct (1004 test cases)
Test #32:
score: 0
Accepted
time: 90ms
memory: 5524kb
input:
1005 508 4 1 -1 -1 -1 1 1 1 1 1 1 1 -1 1 1 1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 1 -1 1 -1 -1 -1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 1 -1 1 -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:
1 1 1 1 2 3 4 1 2 3 4 4 1 4 2 2 3 3 1 1 4 2 2 3 3 4 1 1 1 1 1 4 1 4 4 4 2 2 3 3 3 2 4 3 3 1 2 4 3 1 1 1 1 1 1 1 2 4 4 2 2 4 2 4 4 4 4 4 4 4 4 4 4 4 3 1 1 3 2 2 2 3 1 2 3 3 2 4 4 4 4 4 4 4 1 1 1 1 1 4 1 4 4 1 4 4 2 3 1 4 2 2 4 3 2 4 1 3 3 2 4 3 1 2 2 4 3 2 2 3 2 2 4 1 3 2 2 4 1 2 3 3 3 2 3 3 1 4 4 1 ...
result:
ok Correct (1005 test cases)
Test #33:
score: 0
Accepted
time: 63ms
memory: 3628kb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 1 2 3 3 3 1 1 2 3 3 2 1 4 4 4 1 1 2 2 2 2 3 4 4 1 2 2 4 4 2 2 4 4 2 2 4 4 2 2 4 2 3 1 4 2 2 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 2 3 4 5 6 7 7 6 5 4 3 8 1 2 2 ...
result:
ok Correct (9996 test cases)
Test #35:
score: 0
Accepted
time: 73ms
memory: 3452kb
input:
9997 15 9 -1 1 1 -1 1 1 -1 1 -1 1 1 1 1 1 1 1 1 1 37 20 -1 1 -1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 1 1 1 1 1 -1 64 2 -1 -1 -1 -1 -1 1 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 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:
9 1 2 2 3 4 4 5 5 6 7 8 9 2 4 1 20 1 1 1 2 2 2 3 3 3 3 4 4 5 6 6 7 8 8 7 5 5 9 10 10 11 11 9 9 12 12 13 14 15 16 17 17 2 2 2 2 2 1 2 1 2 1 2 1 2 2 1 1 2 2 1 2 1 1 2 2 1 1 2 2 1 1 2 1 2 1 1 1 1 2 2 2 1 1 1 1 2 2 2 2 2 1 1 1 2 1 1 2 2 1 1 2 2 1 1 1 1 2 1 2 2 2 1 2 1 2 2 2 1 1 1 2 2 2 2 1 1 1 1 2 1...
result:
ok Correct (9997 test cases)
Test #36:
score: 0
Accepted
time: 71ms
memory: 5536kb
input:
9998 28 3 -1 1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 12 2 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 1 8 6 -1 1 1 -1 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2 1 1 1 2 1 2 2 2 1 1 2 2 2 2 2 2 2 2 1 2 2 1 1 2 2 2 1 1 2 2 2 2 1 2 1 2 2 1 2 1 2 1 1 1 1 ...
result:
ok Correct (9999 test cases)
Test #38:
score: 0
Accepted
time: 58ms
memory: 3448kb
input:
10000 15 3 -1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 3 3 -1 1 1 34 2 -1 -1 -1 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 -1 1 -1 1 1 3 2 1 1 -1 25 2 -1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 1 1 1 -1 1 1 1 1 -1 1 -1 1 -1 11 1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 29 2 -1 -1 -1 1 -1 1 -1 -1 -1 -1...
output:
3 1 1 2 2 2 3 3 1 1 2 2 2 2 3 3 1 2 2 2 2 2 1 1 2 2 2 2 2 1 1 1 1 2 2 2 1 1 2 2 2 1 1 2 1 1 2 2 1 1 2 1 1 2 2 2 2 1 2 1 1 2 2 1 1 1 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 1 1 2 2 2 2 2 2 2 1 2 1 2 2 1 1 1 1 1 1 2 1 2 2 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok Correct (10000 test cases)
Extra Test:
score: 0
Extra Test Passed