QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#524662#2193. Cactus Revengeahihi1234RE 0ms3876kbC++143.0kb2024-08-19 22:44:412024-08-19 22:44:41

详细

Test #1:

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

input:

5
2 2 3 2 1

output:

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

result:

ok ok, n = 5

Test #2:

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

input:

4
3 3 2 2

output:

-1

result:

ok ok, n = 4

Test #3:

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

input:

6
1 2 1 1 2 1

output:

-1

result:

ok ok, n = 6

Test #4:

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

input:

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

output:

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

result:

ok ok, n = 15

Test #5:

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

input:

2
1 1

output:

1
2 1 2

result:

ok ok, n = 2

Test #6:

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

input:

3
1 1 1

output:

-1

result:

ok ok, n = 3

Test #7:

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

input:

3
1 1 2

output:

2
2 1 3
2 2 3

result:

ok ok, n = 3

Test #8:

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

input:

3
1 2 2

output:

-1

result:

ok ok, n = 3

Test #9:

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

input:

3
2 2 2

output:

3
2 1 2
2 1 3
2 2 3

result:

ok ok, n = 3

Test #10:

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

input:

4
2 1 2 1

output:

3
2 2 3
2 3 1
2 1 4

result:

ok ok, n = 4

Test #11:

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

input:

4
1 1 1 3

output:

3
2 1 4
2 2 4
2 3 4

result:

ok ok, n = 4

Test #12:

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

input:

4
2 1 2 3

output:

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

result:

ok ok, n = 4

Test #13:

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

input:

4
2 2 2 2

output:

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

result:

ok ok, n = 4

Test #14:

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

input:

5
4 2 2 2 2

output:

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

result:

ok ok, n = 5

Test #15:

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

input:

6
2 1 2 3 2 4

output:

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

result:

ok ok, n = 6

Test #16:

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

input:

10
5 2 2 2 2 5 2 2 2 2

output:

13
2 1 6
2 1 10
2 1 9
2 1 8
2 1 7
2 2 6
2 2 3
2 3 6
2 4 6
2 4 5
2 5 6
2 7 8
2 9 10

result:

ok ok, n = 10

Test #17:

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

input:

6
2 5 2 2 1 2

output:

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

result:

ok ok, n = 6

Test #18:

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

input:

8
3 3 4 1 2 1 2 2

output:

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

result:

ok ok, n = 8

Test #19:

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

input:

8
3 2 4 2 2 3 2 2

output:

10
2 1 6
2 1 8
2 1 7
2 2 3
2 2 4
2 3 4
2 3 6
2 3 5
2 5 6
2 7 8

result:

ok ok, n = 8

Test #20:

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

input:

20
2 2 1 1 4 2 2 7 1 4 2 1 4 2 2 2 4 3 6 2

output:

-1

result:

ok ok, n = 20

Test #21:

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

input:

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

output:

27
2 1 8
2 1 2
2 2 8
2 3 15
2 3 4
2 4 15
2 5 8
2 5 6
2 5 17
2 6 17
2 7 14
2 9 18
2 9 10
2 10 18
2 11 17
2 12 18
2 12 13
2 13 18
2 14 19
2 14 15
2 15 19
2 16 20
2 16 17
2 17 20
2 18 19
2 18 20
2 19 20

result:

ok ok, n = 20

Test #22:

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

input:

4
1 1 1 1

output:

-1

result:

ok ok, n = 4

Test #23:

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

input:

4
2 1 1 1

output:

-1

result:

ok ok, n = 4

Test #24:

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

input:

4
2 1 1 2

output:

3
2 2 4
2 3 1
2 1 4

result:

ok ok, n = 4

Test #25:

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

input:

4
1 3 1 2

output:

-1

result:

ok ok, n = 4

Test #26:

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

input:

4
3 1 3 1

output:

-1

result:

ok ok, n = 4

Test #27:

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

input:

4
2 2 1 2

output:

-1

result:

ok ok, n = 4

Test #28:

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

input:

4
1 2 2 3

output:

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

result:

ok ok, n = 4

Test #29:

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

input:

4
3 2 3 1

output:

-1

result:

ok ok, n = 4

Test #30:

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

input:

4
3 1 3 3

output:

-1

result:

ok ok, n = 4

Test #31:

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

input:

4
2 2 2 3

output:

-1

result:

ok ok, n = 4

Test #32:

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

input:

4
3 3 2 3

output:

-1

result:

ok ok, n = 4

Test #33:

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

input:

4
3 3 3 3

output:

-1

result:

ok ok, n = 4

Test #34:

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

input:

20
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

output:

-1

result:

ok ok, n = 20

Test #35:

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

input:

20
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

output:

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

result:

ok ok, n = 20

Test #36:

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

input:

20
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

output:

-1

result:

ok ok, n = 20

Test #37:

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

input:

20
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

output:

-1

result:

ok ok, n = 20

Test #38:

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

input:

20
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

output:

-1

result:

ok ok, n = 20

Test #39:

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

input:

20
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10

output:

-1

result:

ok ok, n = 20

Test #40:

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

input:

20
18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18

output:

-1

result:

ok ok, n = 20

Test #41:

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

input:

20
19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19

output:

-1

result:

ok ok, n = 20

Test #42:

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

input:

20
2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2

output:

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

result:

ok ok, n = 20

Test #43:

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

input:

20
1 1 1 1 1 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1

output:

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

result:

ok ok, n = 20

Test #44:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #45:

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

input:

20
1 2 2 2 2 1 3 1 1 3 1 2 3 1 3 2 1 3 3 1

output:

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

result:

ok ok, n = 20

Test #46:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #47:

score: -100
Runtime Error

input:

20
1 3 4 2 2 1 1 3 1 7 1 1 2 1 2 3 1 1 3 2

output:


result: