QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#521666#2193. Cactus RevengeHuangHanShengWA 0ms3632kbC++231.9kb2024-08-16 13:47:412024-08-16 13:47:42

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5
2 2 3 2 1

output:

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

result:

ok ok, n = 5

Test #2:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

4
3 3 2 2

output:

-1

result:

ok ok, n = 4

Test #3:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

6
1 2 1 1 2 1

output:

-1

result:

ok ok, n = 6

Test #4:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

15
1 4 3 2 2 2 2 2 4 4 2 2 2 2 2

output:

18
2 3 1
2 4 3
2 4 2
2 3 2
2 5 2
2 5 9
2 2 9
2 7 6
2 7 10
2 6 10
2 8 9
2 9 10
2 10 11
2 11 12
2 12 13
2 13 14
2 14 15
2 15 8

result:

ok ok, n = 15

Test #5:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

2
1 1

output:

1
2 1 2

result:

ok ok, n = 2

Test #6:

score: -100
Wrong Answer
time: 0ms
memory: 3604kb

input:

3
1 1 1

output:

1
2 1 2

result:

wrong answer incorrect degree of vertex 3: expected 1, found 0