QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#453674#7942. $K$ SubsequencesHuangHanShengTL 94ms6644kbC++14660b2024-06-24 08:27:392024-06-24 08:27:39

詳細信息

Test #1:

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

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 
1 1 2 1 
1 2 3 3 1 2 2 
1 2 3 3 3 3 3 3 1 2 
1 2 3 4 1 2 3 4 1 2 3 4 

result:

ok Correct (5 test cases)

Test #2:

score: 0
Accepted
time: 20ms
memory: 3968kb

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 
1 2 2 1 2 1 1 1 2 2 
1 1 1 2 2 1 2 1 1 1 
1 2 1 3 2 1 2 3 1 4 
1 1 1 1 1 1 1 1 1 
1 1 1 1 1 1 1 1 
1 2 3 1 2 3 3 3 3 1 
1 1 1 1 1 1 1 1 1 
1 1 2 3 4 5 6 7 8 9 
1 1 1 2 2 1 2 1 3 1 
1 2 1 2 3 3 1 1 1 
1 2 1 3 1 4 2 2 
1 1 2 3 4 5 6 7 1 1 
1 1 1 1 1 1 1 2 1 
1 1 1 1 1 1 1 1 1 
1 2...

result:

ok Correct (18434 test cases)

Test #3:

score: 0
Accepted
time: 20ms
memory: 5456kb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 1 2 2 1 2 1 2 2 1 3 4 5 6 2 2 1 3 1 3 4 5 4 6 5 1 6 2 1 3 2 1 3 2 1 2 3 3 1 2 3 4 1 5 1 6 2 1 7 3 4 1 2 5 1 2 6 3 7 3 1 1 2 1 2 3 2 1 2 4 3 4 1 1 2 2 1 2 1 3 2 1 2 4 5 3 1 6 1 2 3 2 7 8 9 10 1 2 11 3 4 5 1 2 6 3 1 4 2 3 1 4 2 1 3 2 ...

result:

ok Correct (1 test case)

Test #5:

score: 0
Accepted
time: 86ms
memory: 6176kb

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:

1 1 2 3 4 5 1 6 2 3 1 4 2 3 1 2 4 1 2 7 8 3 9 1 2 3 4 1 2 3 1 4 2 4 1 5 2 3 4 5 10 11 1 2 3 4 12 5 6 7 8 9 10 11 12 1 2 3 1 4 1 5 2 6 2 7 8 9 1 2 10 3 1 4 1 2 1 3 4 5 11 1 2 3 4 5 1 6 1 5 7 2 8 1 3 4 5 6 2 1 7 1 2 8 12 13 14 15 16 17 18 3 1 2 19 1 2 3 20 4 21 4 1 22 1 23 2 24 2 1 2 25 1 3 1 4 5 6 2 ...

result:

ok Correct (1 test case)

Test #6:

score: -100
Time Limit Exceeded

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:


result: