QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#877664#8987. Colorful TreesZhaoZiLongRE 1ms3584kbC++173.0kb2025-02-01 00:03:252025-02-01 00:03:26

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

2
2
3
2
3

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

4
2
2
2
2
3 4
2 4
1 2

output:

3
4
3

result:

ok 3 lines

Test #3:

score: -100
Runtime Error

input:

1000
434
434
434
434
884
434
711
711
711
434
711
434
711
711
434
711
711
434
884
884
434
884
884
434
434
434
884
711
884
884
884
711
711
434
884
884
884
434
884
711
711
884
434
434
884
884
434
884
711
711
434
434
711
711
711
434
711
434
711
434
434
434
434
434
711
434
711
711
434
434
711
711
884
884...

output:


result: