QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#116186#6503. DFS Order 3GuanYunchangWA 94ms1624kbC++98383b2023-06-28 11:33:182023-06-28 11:33:22

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

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

result:

ok correct answer! (4 test cases)

Test #2:

score: -100
Wrong Answer
time: 94ms
memory: 1624kb

input:

20000
10
1 2 4 5 6 7 3 8 10 9
2 1 4 5 6 7 3 8 10 9
3 8 1 2 4 5 6 7 10 9
4 5 6 7 1 2 3 8 10 9
5 4 6 7 1 2 3 8 10 9
6 7 4 5 1 2 3 8 10 9
7 6 4 5 1 2 3 8 10 9
8 3 1 2 4 5 6 7 10 9
9 10 1 2 4 5 6 7 3 8
10 1 2 4 5 6 7 3 8 9
10
1 4 3 8 2 9 6 5 7 10
2 8 9 6 3 4 1 5 7 10
3 8 2 9 6 4 1 5 7 10
4 1 3 8 2 9 6 5...

output:

10 1
9 1
8 3
7 6
6 4
5 4
4 1
3 1
2 1
10 7
9 6
8 2
7 5
6 2
5 4
4 1
3 2
2 1
10 3
9 1
8 2
7 5
6 5
5 1
4 2
3 2
2 1
10 2
9 6
8 3
7 5
6 1
5 3
4 2
3 1
2 1
10 2
9 8
8 1
7 4
6 3
5 1
4 1
3 1
2 1
10 1
9 7
8 3
7 3
6 2
5 1
4 3
3 1
2 1
10 1
9 2
8 4
7 6
6 5
5 4
4 3
3 2
2 1
10 5
9 1
8 4
7 6
6 4
5 1
4 2
3 2
2 1
10 9...

result:

wrong answer ord[9] didn't pass the test (test case 1)