QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#426159#6502. Disjoint Set Unionegypt_ioi2024_07WA 146ms7720kbC++232.1kb2024-05-30 21:49:432024-05-30 21:49:44

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 7720kb

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
4
1 3
2 1 2
1 1
1 2
YES
7
2 3 2
1 4
1 1
2 2 1
1 2
2 3 1
1 3
YES
9
2 1 2
1 1
2 2 3
1 2
2 3 4
1 3
2 4 5
1 4
1 5
NO
YES
11
2 6 2
1 6
2 2 5
1 3
2 5 4
1 5
1 1
2 2 1
1 2
2 4 1
1 4

result:

ok good! (YES count = 4, NO count = 1) (5 test cases)

Test #2:

score: -100
Wrong Answer
time: 146ms
memory: 7700kb

input:

100000
5
1 2 1 1 1
2 2 1 1 2
5
3 2 3 4 1
3 2 3 4 1
5
1 2 3 4 3
1 4 4 1 1
5
1 2 3 5 3
1 2 2 5 2
5
5 2 3 5 5
5 2 3 5 5
5
1 2 3 4 5
5 3 3 4 5
5
1 2 3 4 5
1 4 1 4 4
5
1 2 3 1 5
1 2 3 1 2
5
1 2 3 3 1
1 3 3 3 1
5
1 2 3 4 3
2 2 4 4 4
5
1 2 2 4 5
5 2 2 4 5
5
1 2 1 4 5
5 2 5 5 5
5
1 2 3 4 5
1 2 5 5 1
5
1 4 3...

output:

YES
7
1 3
1 4
2 1 2
1 1
1 2
2 1 2
1 5
YES
4
1 1
1 3
1 4
1 2
YES
9
2 2 4
1 2
2 3 4
1 3
1 1
2 4 1
1 4
2 3 1
1 5
YES
7
1 4
1 2
2 5 2
1 3
2 5 2
1 5
1 1
YES
5
1 1
1 4
1 5
1 3
1 2
YES
7
2 1 5
1 1
1 5
1 4
2 2 3
1 2
1 3
YES
8
2 2 4
1 2
1 4
2 5 4
1 5
1 1
2 3 1
1 3
YES
6
1 1
1 4
1 3
1 2
2 5 2
1 5
YES
6
1 1
1 ...

result:

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