QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#368771#6503. DFS Order 3ucup-team3232#WA 66ms5856kbC++171.7kb2024-03-27 16:17:072024-03-27 16:18:27

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 5644kb

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:

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

result:

ok correct answer! (4 test cases)

Test #2:

score: -100
Wrong Answer
time: 66ms
memory: 5856kb

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:

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

result:

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