QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#849329#9772. Permutation RoutinglunchboxTL 0ms3560kbC++171.5kb2025-01-09 14:38:162025-01-09 14:38:21

詳細信息

Test #1:

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

input:

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

output:

3
2 3 4
1 1
2 4 2

result:

ok ok, up to 3 steps were used

Test #2:

score: -100
Time Limit Exceeded

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:


result: