QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#437435#6502. Disjoint Set Unionegypt_ioi2024_02WA 169ms3780kbC++202.4kb2024-06-09 10:42:202024-06-09 10:42:20

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3772kb

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

result:

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

Test #2:

score: 0
Accepted
time: 102ms
memory: 3780kb

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

result:

ok good! (YES count = 100000, NO count = 0) (100000 test cases)

Test #3:

score: -100
Wrong Answer
time: 169ms
memory: 3708kb

input:

50000
10
1 2 3 4 5 6 7 8 6 10
1 10 3 4 5 6 7 8 6 10
10
6 2 3 4 5 6 2 5 5 10
6 6 6 6 6 6 6 6 6 10
10
1 2 3 4 7 7 7 10 9 10
9 7 3 9 9 9 9 9 9 7
10
1 2 3 7 4 2 3 8 3 10
2 2 2 2 2 2 2 2 2 2
10
1 2 3 5 5 8 2 8 9 10
2 2 3 5 10 8 2 10 9 10
10
1 8 3 3 5 6 10 8 9 10
5 5 5 5 5 5 5 5 5 5
10
8 2 7 4 5 6 8 8 9 1...

output:

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

result:

wrong answer you didn't find a solution but jury did (test case 365)