QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#118208#6503. DFS Order 3HuangHanShengWA 82ms3428kbC++11991b2023-07-03 10:53:582023-07-03 10:53:59

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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

result:

ok correct answer! (4 test cases)

Test #2:

score: -100
Wrong Answer
time: 82ms
memory: 3428kb

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

result:

wrong answer Integer parameter [name=x_i] equals to 0, violates the range [1, 10] (test case 1)