QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#813057#9772. Permutation Routingucup-team003#WA 8ms24120kbC++143.0kb2024-12-13 21:08:332024-12-13 21:08:35

详细

Test #1:

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

input:

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

output:

4
2 3 4 
1 1 
1 2 
1 4 

result:

ok ok, up to 4 steps were used

Test #2:

score: -100
Wrong Answer
time: 8ms
memory: 24040kb

input:

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

output:

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

result:

wrong answer vertex 4 appears twice in step 3