QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#357848#7798. Colorful Villageucup-team2880WA 16ms14084kbC++234.9kb2024-03-19 13:52:382024-03-19 13:52:38

詳細信息

Test #1:

score: 100
Accepted
time: 16ms
memory: 13924kb

input:

2
4
1 3 1 3 4 4 2 2
1 6
5 3
2 4
7 1
7 5
5 8
2 5
3
1 1 2 2 3 3
1 2
2 3
3 4
4 5
5 6

output:

1 5 2 7 
-1

result:

ok ok, 1 yes, 1 no (2 test cases)

Test #2:

score: 0
Accepted
time: 15ms
memory: 11812kb

input:

1
1
1 1
1 2

output:

1 

result:

ok ok, 1 yes, 0 no (1 test case)

Test #3:

score: -100
Wrong Answer
time: 11ms
memory: 14084kb

input:

5
1
1 1
2 1
1
1 1
2 1
3
3 2 3 1 1 2
4 1
6 1
3 5
5 1
2 4
4
3 3 1 1 4 4 2 2
2 7
7 6
1 2
8 1
4 2
2 5
3 1
1
1 1
1 2

output:

1 
1 
1 2 4 
1 3 5 8 
1 

result:

wrong answer subtree not connected: only 2 edges for 4 vertices (test case 4)