QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#813064#9772. Permutation Routingucup-team003#WA 12ms24120kbC++143.1kb2024-12-13 21:14:342024-12-13 21:14:34

詳細信息

Test #1:

score: 100
Accepted
time: 5ms
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: 12ms
memory: 24088kb

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

result:

wrong answer vertex 4 appears twice in step 3