QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#760608#9743. 重心树ucup-team5918#WA 14ms11044kbC++14942b2024-11-18 17:51:222024-11-18 17:51:22

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 11044kb

input:

2
4
2 3 4
1 3
0
0
3
1 3
1 3
0

output:

2 3
1 2
1 4
2 3
1 2

result:

ok Accepted (2 test cases)

Test #2:

score: -100
Wrong Answer
time: 14ms
memory: 9860kb

input:

40000
3
2 2 3
0
0
2
1 2
0
4
2 4 3
1 4
0
0
5
1 3
2 5 4
1 5
0
0
4
3 2 3 4
0
0
0
2
1 2
0
2
1 2
0
5
1 2
3 3 4 5
0
0
0
2
1 2
0
2
1 2
0
5
4 2 3 4 5
0
0
0
0
4
1 2
2 3 4
0
0
5
2 5 4
1 5
1 4
0
0
2
1 2
0
5
1 2
3 3 4 5
0
0
0
5
2 2 3
0
2 4 5
0
0
5
2 5 4
1 5
1 4
0
0
5
2 2 4
2 3 5
0
0
0
4
1 3
1 4
1 4
0
4
2 4 3
1 ...

output:

1 2
1 3
1 2
2 4
1 2
1 3
3 5
2 3
2 4
1 2
1 2
1 3
1 4
1 2
1 2
2 3
2 4
2 5
1 1
1 2
1 2
1 2
1 3
1 4
1 5
2 3
2 4
1 1
3 4
2 5
1 2
1 3
1 2
2 3
2 4
2 5
1 1
3 4
3 5
1 2
1 2
3 4
2 5
1 2
1 3
2 3
2 5
1 1
1 4
3 4
2 3
1 2
2 4
1 2
1 3
2 3
1 2
3 5
2 4
1 2
1 3
1 2
2 3
1 2
3 4
3 5
2 2
1 2
1 2
3 4
2 3
1 2
4 5
2 4
1 2
...

result:

wrong answer Tree can't contain loops (test case 8)