QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#111627#6502. Disjoint Set UnionFantasy_BallWA 2ms5708kbC++141.6kb2023-06-07 19:43:232023-06-07 19:43:27

详细

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 5708kb

input:

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

output:

YES
1 1
1 1
2 1 2
YES
1 2
1 3
1 4
1 2
1 3
1 4
2 3 2
1 2
1 3
1 4
1 2
1 3
2 2 1
1 3
YES
1 1
1 2
1 3
1 4
1 1
1 2
1 3
1 4
2 1 2
1 2
1 3
1 4
2 2 3
1 3
1 4
2 3 4
1 4
2 4 5
NO
YES
1 2
1 3
1 4
1 5
1 6
1 2
1 3
1 4
1 5
1 6
1 2
1 3
1 4
1 5
1 6
2 6 2
1 2
1 3
1 4
1 5
2 2 5
1 2
1 3
1 4
1 5
2 5 4
1 2
1 4
2 4 1
1 2

result:

wrong answer f[1] = 1, but expected 2 (test case 1)