QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#524663#2193. Cactus Revengeahihi1234AC ✓2ms4052kbC++143.0kb2024-08-19 22:45:102024-08-19 22:45:11

詳細信息

Test #1:

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

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: 3728kb

input:

4
3 3 2 2

output:

-1

result:

ok ok, n = 4

Test #3:

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

input:

6
1 2 1 1 2 1

output:

-1

result:

ok ok, n = 6

Test #4:

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

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: 3736kb

input:

2
1 1

output:

1
2 1 2

result:

ok ok, n = 2

Test #6:

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

input:

3
1 1 1

output:

-1

result:

ok ok, n = 3

Test #7:

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

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: 3600kb

input:

3
1 2 2

output:

-1

result:

ok ok, n = 3

Test #9:

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

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: 1ms
memory: 3628kb

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: 3700kb

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: 3864kb

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: 3864kb

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: 3632kb

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: 3696kb

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: 3732kb

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: 3896kb

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: 3588kb

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: 3688kb

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: 1ms
memory: 3892kb

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: 3528kb

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: 3732kb

input:

4
1 1 1 1

output:

-1

result:

ok ok, n = 4

Test #23:

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

input:

4
2 1 1 1

output:

-1

result:

ok ok, n = 4

Test #24:

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

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: 3856kb

input:

4
1 3 1 2

output:

-1

result:

ok ok, n = 4

Test #26:

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

input:

4
3 1 3 1

output:

-1

result:

ok ok, n = 4

Test #27:

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

input:

4
2 2 1 2

output:

-1

result:

ok ok, n = 4

Test #28:

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

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: 3664kb

input:

4
3 2 3 1

output:

-1

result:

ok ok, n = 4

Test #30:

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

input:

4
3 1 3 3

output:

-1

result:

ok ok, n = 4

Test #31:

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

input:

4
2 2 2 3

output:

-1

result:

ok ok, n = 4

Test #32:

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

input:

4
3 3 2 3

output:

-1

result:

ok ok, n = 4

Test #33:

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

input:

4
3 3 3 3

output:

-1

result:

ok ok, n = 4

Test #34:

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

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: 3632kb

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: 3860kb

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: 3700kb

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: 1ms
memory: 3624kb

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: 3624kb

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: 3688kb

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: 3928kb

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: 3632kb

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: 3640kb

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: 3924kb

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: 3664kb

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: 3732kb

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: 0
Accepted
time: 0ms
memory: 3692kb

input:

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

output:

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

result:

ok ok, n = 20

Test #48:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #49:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #50:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #51:

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

input:

20
6 2 4 4 2 2 4 2 4 2 4 4 2 2 2 4 2 2 2 2

output:

-1

result:

ok ok, n = 20

Test #52:

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

input:

20
4 2 6 2 4 2 2 6 2 2 4 2 2 4 2 2 2 2 2 2

output:

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

result:

ok ok, n = 20

Test #53:

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

input:

20
4 2 2 2 2 2 2 2 2 4 2 2 2 6 2 2 4 4 4 2

output:

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

result:

ok ok, n = 20

Test #54:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #55:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #56:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #57:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #58:

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

input:

20
2 2 6 6 1 2 2 4 4 2 2 2 2 4 2 1 2 4 4 2

output:

-1

result:

ok ok, n = 20

Test #59:

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

input:

20
2 2 6 2 4 2 2 4 2 4 2 1 2 2 2 1 2 2 6 4

output:

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

result:

ok ok, n = 20

Test #60:

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

input:

19
2 2 2 4 4 4 4 2 2 4 2 4 2 2 4 2 4 2 4

output:

-1

result:

ok ok, n = 19

Test #61:

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

input:

19
2 2 2 4 2 4 6 2 4 2 2 4 2 4 2 2 2 4 2

output:

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

result:

ok ok, n = 19

Test #62:

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

input:

19
2 2 2 4 2 2 4 4 4 2 2 2 4 2 4 2 4 2 2

output:

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

result:

ok ok, n = 19

Test #63:

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

input:

19
2 1 4 2 2 4 2 5 2 2 4 4 4 2 2 2 4 4 2

output:

-1

result:

ok ok, n = 19

Test #64:

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

input:

19
6 2 3 2 2 2 4 2 4 4 4 2 2 2 4 2 2 2 1

output:

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

result:

ok ok, n = 19

Test #65:

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

input:

19
2 3 2 3 2 2 2 4 2 2 2 4 2 4 4 4 2 2 6

output:

-1

result:

ok ok, n = 19

Test #66:

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

input:

19
2 2 2 2 3 2 2 4 4 2 4 2 2 4 4 4 2 2 3

output:

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

result:

ok ok, n = 19

Test #67:

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

input:

19
4 4 2 1 4 2 4 2 2 4 1 2 2 6 2 4 4 2 2

output:

-1

result:

ok ok, n = 19

Test #68:

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

input:

19
4 4 2 2 4 2 2 2 4 2 4 6 2 4 2 2 2 1 1

output:

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

result:

ok ok, n = 19

Test #69:

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

input:

20
2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 10 1 12 1

output:

-1

result:

ok ok, n = 20

Test #70:

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

input:

20
1 1 8 1 1 1 6 6 4 1 1 1 1 1 1 1 1 1 1 1

output:

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

result:

ok ok, n = 20

Test #71:

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

input:

20
2 2 3 2 3 3 3 2 2 3 3 2 2 2 2 3 2 5 3 5

output:

-1

result:

ok ok, n = 20

Test #72:

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

input:

20
2 3 3 2 2 2 2 3 3 3 2 2 5 3 3 2 2 3 2 3

output:

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

result:

ok ok, n = 20

Test #73:

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

input:

20
1 5 3 5 1 1 3 1 3 3 1 5 5 1 1 1 1 3 3 1

output:

-1

result:

ok ok, n = 20

Test #74:

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

input:

20
1 3 3 5 1 1 1 1 1 3 5 3 3 3 3 1 5 1 1 1

output:

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

result:

ok ok, n = 20

Test #75:

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

input:

19
1 3 3 3 1 1 3 1 1 1 9 1 5 3 2 3 1 1 3

output:

-1

result:

ok ok, n = 19

Test #76:

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

input:

19
3 1 1 2 3 3 3 1 1 1 3 3 1 1 1 5 5 1 5

output:

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

result:

ok ok, n = 19

Test #77:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #78:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #79:

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

input:

20
2 4 2 1 2 1 2 7 5 2 2 5 2 2 2 2 4 2 5 2

output:

-1

result:

ok ok, n = 20

Test #80:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #81:

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

input:

20
3 3 1 5 2 2 3 2 1 3 7 3 1 5 2 3 3 7 5 5

output:

-1

result:

ok ok, n = 20

Test #82:

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

input:

20
1 2 2 6 1 7 5 3 3 1 1 2 3 1 3 3 7 3 3 1

output:

-1

result:

ok ok, n = 20

Test #83:

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

input:

20
1 6 1 1 1 8 1 1 1 1 1 11 1 1 1 1 1 1 1 1

output:

-1

result:

ok ok, n = 20

Test #84:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #85:

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

input:

20
2 2 4 2 2 2 1 2 4 4 2 2 4 2 1 2 2 2 2 2

output:

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

result:

ok ok, n = 20

Test #86:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #87:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #88:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #89:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #90:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #91:

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

input:

20
5 1 1 1 1 4 1 1 1 1 1 13 1 1 1 1 2 1 1 1

output:

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

result:

ok ok, n = 20

Test #92:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #93:

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

input:

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

output:

-1

result:

ok ok, n = 20

Test #94:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #95:

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

input:

20
1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 5 1 8 1 1

output:

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

result:

ok ok, n = 20

Test #96:

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

input:

20
8 1 1 2 1 2 1 4 1 2 2 4 4 4 1 2 1 2 4 1

output:

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

result:

ok ok, n = 20

Test #97:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #98:

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

input:

20
1 1 1 10 1 1 1 4 1 1 1 1 1 1 4 1 1 2 1 7

output:

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

result:

ok ok, n = 20

Test #99:

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

input:

20
2 2 2 2 2 4 2 4 2 3 2 3 3 3 3 2 2 4 4 3

output:

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

result:

ok ok, n = 20

Test #100:

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

input:

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

output:

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

result:

ok ok, n = 20

Test #101:

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

input:

20
2 2 2 2 17 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2

output:

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

result:

ok ok, n = 20

Test #102:

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

input:

20
2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 17 2 2 2 2

output:

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

result:

ok ok, n = 20

Test #103:

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

input:

20
2 2 2 2 2 2 2 2 2 2 2 2 2 11 2 2 2 2 9 2

output:

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

result:

ok ok, n = 20

Test #104:

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

input:

20
2 10 2 2 2 2 2 2 2 2 2 2 2 10 2 2 2 2 2 2

output:

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

result:

ok ok, n = 20

Test #105:

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

input:

20
12 2 2 2 2 2 2 2 10 2 2 2 2 2 2 2 2 2 2 2

output:

-1

result:

ok ok, n = 20

Test #106:

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

input:

200
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 = 200

Test #107:

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

input:

200
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

200
2 1 2
2 1 200
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
2 20 21
2 21 22
2 22 23
2 23 24
2 24 25
2 25 26
2 26 27
2 27 28
2 28 29
2 29 30
2 30 31
2 31 32
2 32 33
2 33 34
2 34 35
2 35 36
2 36 37
2 37 38
2 38 39
2...

result:

ok ok, n = 200

Test #108:

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

input:

200
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 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 = 200

Test #109:

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

input:

200
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 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 = 200

Test #110:

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

input:

200
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 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 = 200

Test #111:

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

input:

200
100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 ...

output:

-1

result:

ok ok, n = 200

Test #112:

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

input:

200
198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 ...

output:

-1

result:

ok ok, n = 200

Test #113:

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

input:

200
199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 ...

output:

-1

result:

ok ok, n = 200

Test #114:

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

input:

200
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

199
2 55 200
2 64 199
2 199 198
2 198 197
2 197 196
2 196 195
2 195 194
2 194 193
2 193 192
2 192 191
2 191 190
2 190 189
2 189 188
2 188 187
2 187 186
2 186 185
2 185 184
2 184 183
2 183 182
2 182 181
2 181 180
2 180 179
2 179 178
2 178 177
2 177 176
2 176 175
2 175 174
2 174 173
2 173 172
2 172 17...

result:

ok ok, n = 200

Test #115:

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

input:

200
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 199 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

199
2 1 33
2 2 33
2 3 33
2 4 33
2 5 33
2 6 33
2 7 33
2 8 33
2 9 33
2 10 33
2 11 33
2 12 33
2 13 33
2 14 33
2 15 33
2 16 33
2 17 33
2 18 33
2 19 33
2 20 33
2 21 33
2 22 33
2 23 33
2 24 33
2 25 33
2 26 33
2 27 33
2 28 33
2 29 33
2 30 33
2 31 33
2 32 33
2 34 33
2 35 33
2 36 33
2 37 33
2 38 33
2 39 33
2...

result:

ok ok, n = 200

Test #116:

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

input:

200
3 2 1 2 1 1 4 1 1 3 1 2 1 1 2 1 2 2 5 1 1 1 1 2 1 2 4 1 4 7 2 1 1 1 1 1 1 2 1 2 2 3 2 3 1 5 1 1 2 1 1 3 1 1 1 1 2 1 1 1 3 2 1 6 2 1 7 3 7 1 1 1 1 1 1 1 1 1 2 2 2 1 1 2 2 2 1 2 3 5 2 1 4 1 1 3 6 2 1 1 2 2 2 2 2 1 1 1 1 3 1 1 2 2 1 2 3 1 2 2 1 1 1 3 1 2 2 2 1 4 1 2 2 2 2 1 2 1 2 3 2 1 1 5 1 3 2 1 ...

output:

-1

result:

ok ok, n = 200

Test #117:

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

input:

200
2 1 1 1 1 2 2 3 3 1 1 2 1 1 1 1 2 1 2 4 5 1 1 1 2 1 2 4 2 2 1 6 1 2 1 1 1 2 3 1 1 1 1 1 3 2 3 4 4 1 1 3 2 2 1 1 2 1 2 3 2 2 2 5 1 1 2 2 3 2 4 1 1 3 3 2 4 1 2 1 7 2 2 2 1 3 4 2 2 1 1 1 2 1 1 1 2 1 1 1 4 2 1 1 2 1 1 2 2 4 1 3 7 2 1 1 1 1 2 4 1 1 2 1 3 3 1 2 1 1 2 1 1 1 4 2 2 3 1 4 1 3 1 1 1 1 1 1 ...

output:

199
2 2 157
2 3 186
2 4 157
2 5 186
2 10 157
2 11 113
2 13 81
2 14 186
2 15 157
2 16 113
2 18 81
2 22 32
2 23 186
2 24 178
2 26 157
2 31 156
2 33 113
2 35 81
2 36 64
2 37 32
2 40 21
2 41 192
2 42 191
2 43 188
2 44 186
2 50 178
2 51 175
2 55 157
2 56 156
2 58 140
2 65 135
2 66 120
2 72 113
2 73 110
2...

result:

ok ok, n = 200

Test #118:

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

input:

200
1 1 1 2 3 2 1 2 2 1 2 3 1 3 1 1 1 2 1 1 1 4 2 4 1 1 2 1 4 1 2 2 2 3 1 3 1 1 2 1 4 1 1 1 7 3 1 2 1 1 9 2 1 1 1 4 1 2 2 2 2 3 2 1 4 1 2 1 3 3 1 5 4 1 1 1 1 4 2 2 2 3 3 3 1 1 5 1 1 1 1 1 3 2 1 2 3 4 1 2 2 2 3 8 5 1 2 5 3 4 1 3 1 1 1 3 1 1 1 1 1 4 2 1 1 2 1 3 1 1 2 1 4 2 1 1 1 2 2 1 3 2 3 1 2 1 2 1 ...

output:

200
2 1 200
2 2 200
2 3 200
2 4 5
2 4 200
2 5 140
2 5 6
2 6 8
2 7 200
2 8 9
2 9 11
2 10 189
2 11 12
2 12 144
2 12 14
2 13 189
2 14 146
2 14 18
2 15 176
2 16 176
2 17 176
2 18 22
2 19 176
2 20 176
2 21 176
2 22 136
2 22 137
2 22 23
2 23 24
2 24 132
2 24 135
2 24 27
2 25 153
2 26 153
2 27 29
2 28 152
...

result:

ok ok, n = 200

Test #119:

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

input:

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

output:

201
2 1 147
2 1 195
2 1 2
2 2 143
2 2 145
2 2 195
2 3 189
2 4 189
2 5 138
2 5 140
2 5 6
2 5 200
2 6 148
2 6 7
2 7 149
2 7 9
2 8 170
2 9 12
2 10 170
2 11 169
2 12 152
2 12 14
2 13 169
2 14 15
2 15 153
2 15 16
2 16 18
2 17 150
2 18 19
2 19 154
2 19 21
2 20 150
2 21 23
2 22 135
2 23 24
2 24 26
2 25 135...

result:

ok ok, n = 200

Test #120:

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

input:

200
13 1 1 1 2 3 4 2 5 1 1 5 4 1 4 1 4 1 1 3 3 1 1 2 2 2 2 1 3 1 1 1 2 2 2 2 1 2 1 2 1 2 2 2 1 2 3 1 1 1 2 5 3 2 1 3 4 1 1 3 2 1 1 1 1 1 2 1 1 1 1 1 2 1 2 3 1 1 2 1 2 1 2 1 1 5 2 2 1 3 2 1 1 3 2 2 1 2 1 1 2 2 1 1 2 3 1 4 1 1 2 1 5 1 1 3 4 1 2 1 2 3 1 2 2 1 2 1 1 1 2 1 4 2 1 2 1 3 1 1 1 2 1 2 4 3 1 5...

output:

202
2 1 114
2 1 115
2 1 118
2 1 120
2 1 123
2 1 126
2 1 128
2 1 129
2 1 130
2 1 132
2 1 135
2 1 191
2 1 5
2 2 189
2 3 189
2 4 189
2 5 191
2 6 137
2 6 191
2 6 7
2 7 110
2 7 112
2 7 191
2 8 9
2 8 200
2 9 107
2 9 109
2 9 139
2 9 12
2 10 189
2 11 181
2 12 103
2 12 104
2 12 140
2 12 13
2 13 99
2 13 100
2...

result:

ok ok, n = 200

Test #121:

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

input:

200
3 1 2 1 5 3 2 2 1 2 1 1 1 6 1 1 1 1 2 1 1 2 3 1 2 1 2 1 1 2 1 1 1 2 4 1 5 1 1 3 3 4 1 5 1 2 1 1 3 4 1 1 5 3 2 1 2 1 1 1 1 1 5 1 3 1 3 5 1 2 3 1 1 1 1 2 1 1 2 2 1 3 2 4 1 2 3 1 1 2 2 4 4 7 5 4 1 2 1 1 1 2 1 2 2 1 2 1 2 4 1 3 1 2 1 2 2 1 1 1 3 1 5 1 2 1 2 1 4 1 4 2 1 1 1 3 7 2 1 2 1 4 3 3 4 5 6 4 ...

output:

205
2 1 115
2 1 147
2 1 3
2 2 147
2 3 147
2 4 147
2 5 111
2 5 113
2 5 118
2 5 148
2 5 6
2 6 119
2 6 148
2 7 150
2 7 8
2 8 150
2 9 146
2 10 173
2 10 14
2 11 146
2 12 145
2 13 145
2 14 101
2 14 103
2 14 106
2 14 108
2 14 173
2 15 142
2 16 142
2 17 137
2 18 137
2 19 180
2 19 22
2 20 137
2 21 137
2 22 1...

result:

ok ok, n = 200

Test #122:

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

input:

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

output:

214
2 1 125
2 2 125
2 3 125
2 4 123
2 4 131
2 4 5
2 5 131
2 6 125
2 7 120
2 8 120
2 9 141
2 9 10
2 10 121
2 10 122
2 10 141
2 11 141
2 11 12
2 12 118
2 12 119
2 12 141
2 13 120
2 14 120
2 15 117
2 16 147
2 16 19
2 17 117
2 18 110
2 19 114
2 19 115
2 19 147
2 20 151
2 20 21
2 21 151
2 22 106
2 22 107...

result:

ok ok, n = 200

Test #123:

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

input:

200
4 1 1 2 5 4 2 2 3 2 2 4 1 3 4 3 2 3 1 2 1 1 1 1 2 1 3 7 4 1 2 1 2 1 2 1 1 1 1 5 3 2 2 2 2 4 3 5 2 2 2 2 3 5 2 2 2 2 2 1 2 1 3 3 3 3 5 8 2 2 4 3 1 2 1 1 2 2 3 1 1 1 3 1 1 1 1 1 3 2 1 1 3 1 1 2 1 2 3 2 2 3 2 1 2 1 1 1 2 1 17 5 2 6 1 1 6 2 6 2 3 1 1 1 1 1 3 3 4 1 5 3 3 1 3 2 2 1 4 1 3 2 1 2 4 2 1 2...

output:

242
2 1 88
2 1 91
2 1 68
2 1 4
2 2 68
2 3 68
2 4 68
2 5 86
2 5 87
2 5 92
2 5 71
2 5 6
2 6 84
2 6 85
2 6 71
2 7 111
2 7 8
2 8 111
2 9 94
2 9 111
2 9 10
2 10 111
2 11 111
2 11 12
2 12 81
2 12 82
2 12 111
2 13 68
2 14 95
2 14 111
2 14 15
2 15 76
2 15 80
2 15 111
2 16 97
2 16 111
2 16 17
2 17 111
2 18 1...

result:

ok ok, n = 200

Test #124:

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

input:

200
9 5 1 1 6 1 1 1 2 2 5 2 1 3 9 2 3 3 3 7 2 2 1 2 2 3 4 1 5 1 3 1 12 1 1 3 1 9 1 2 4 5 3 4 4 3 2 1 1 1 3 4 1 3 5 1 1 2 4 1 1 1 5 2 6 1 7 5 7 6 1 2 5 13 4 7 4 5 1 5 14 4 1 4 7 5 3 1 5 1 1 5 3 1 1 1 10 1 4 6 1 5 1 12 5 1 3 1 22 1 3 2 4 4 2 1 4 3 3 5 1 4 6 1 3 6 1 5 1 1 1 8 3 2 1 4 2 6 1 1 2 1 3 4 4 ...

output:

-1

result:

ok ok, n = 200

Test #125:

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

input:

200
1 7 5 5 1 2 7 10 1 2 6 4 1 7 17 8 17 9 5 3 3 19 7 5 13 1 1 2 1 1 6 1 32 5 8 8 11 17 2 6 9 8 7 10 3 4 1 2 18 1 29 2 2 5 6 4 1 4 1 5 15 7 3 1 1 1 14 4 2 5 3 9 26 2 1 13 10 15 2 1 1 7 2 1 12 5 3 2 3 45 1 6 2 13 1 3 11 16 5 9 1 3 4 4 3 2 6 16 3 6 3 1 1 3 4 2 3 5 12 3 1 5 4 2 1 6 28 9 3 2 4 3 9 3 17 ...

output:

-1

result:

ok ok, n = 200

Test #126:

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

input:

200
5 35 9 36 2 16 18 2 10 11 7 19 6 14 45 14 4 2 5 14 1 2 19 10 5 2 4 31 30 17 7 8 22 7 42 32 7 2 1 4 12 28 30 5 8 23 15 5 26 34 4 19 13 1 1 22 8 22 7 1 10 16 7 7 22 12 20 12 16 18 36 39 1 10 3 1 28 6 19 27 24 66 1 54 21 22 29 38 26 24 8 3 3 10 66 11 25 9 27 33 15 10 64 5 3 12 12 14 5 10 3 4 20 14 ...

output:

-1

result:

ok ok, n = 200

Test #127:

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

input:

200
2 4 2 2 4 6 2 4 2 2 6 8 2 2 2 10 2 2 2 6 4 2 6 2 2 6 2 2 4 4 2 2 4 2 2 2 4 6 2 2 2 2 4 2 2 4 4 2 2 2 2 2 2 2 2 2 2 4 2 2 8 2 2 2 6 2 6 2 6 2 2 4 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 2 4 2 4 4 2 2 2 4 6 4 2 2 2 2 4 2 2 2 2 2 2 4 2 4 8 2 2 2 4 2 8 4 4 6 2 4 4 4 4 2 2 2 2 2 2 2 4 4 2 2 2 4 6 4 2 2 2 4 2 6...

output:

-1

result:

ok ok, n = 200

Test #128:

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

input:

200
2 6 2 2 4 2 2 4 4 2 2 6 2 2 4 2 4 4 2 2 4 2 2 2 2 2 2 2 2 4 2 2 2 2 4 4 2 4 2 6 4 4 4 8 2 4 2 2 4 2 4 2 2 2 6 4 2 4 2 2 2 4 2 8 2 2 2 2 2 2 4 4 6 4 4 2 2 4 2 6 6 2 4 4 4 4 4 2 6 2 4 2 4 4 2 2 2 8 2 2 4 4 2 2 2 4 10 2 2 2 2 2 2 4 2 2 4 2 2 6 2 2 2 2 2 2 2 4 2 2 2 2 4 2 2 2 2 2 2 2 2 2 2 4 8 6 2 2...

output:

298
2 1 2
2 1 3
2 2 3
2 2 4
2 2 6
2 2 5
2 2 7
2 4 6
2 5 7
2 5 8
2 5 10
2 8 10
2 8 9
2 8 11
2 9 11
2 9 12
2 9 13
2 12 13
2 12 14
2 12 16
2 12 15
2 12 19
2 14 16
2 15 19
2 15 17
2 15 20
2 17 20
2 17 18
2 17 22
2 18 22
2 18 21
2 18 23
2 21 23
2 21 30
2 21 24
2 24 30
2 25 35
2 25 26
2 26 35
2 27 36
2 27...

result:

ok ok, n = 200

Test #129:

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

input:

200
2 4 2 2 2 2 2 2 4 2 2 2 4 2 2 2 2 2 2 4 2 2 2 4 2 2 2 6 2 2 4 4 4 2 2 2 4 2 4 2 4 2 2 6 2 2 2 2 4 2 2 6 6 6 4 2 2 6 4 2 2 2 2 4 2 2 4 4 4 2 6 8 2 6 2 2 2 2 2 2 2 2 4 2 2 4 2 2 4 2 8 2 2 4 2 2 2 4 2 2 2 2 2 4 4 2 2 6 4 2 2 2 6 2 2 2 2 2 4 4 2 4 4 4 2 2 4 2 2 2 4 4 6 2 4 4 2 6 2 2 2 2 4 2 4 4 6 2 ...

output:

297
2 1 2
2 1 3
2 2 3
2 2 9
2 2 4
2 4 9
2 5 13
2 5 6
2 6 13
2 7 20
2 7 8
2 8 20
2 9 24
2 9 10
2 10 24
2 11 28
2 11 12
2 12 28
2 13 28
2 13 14
2 14 28
2 15 31
2 15 16
2 16 31
2 17 32
2 17 18
2 18 32
2 19 33
2 19 20
2 20 33
2 21 37
2 21 22
2 22 37
2 23 39
2 23 24
2 24 39
2 25 41
2 25 26
2 26 41
2 27 4...

result:

ok ok, n = 200

Test #130:

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

input:

200
2 2 4 2 2 4 2 4 2 4 4 2 2 2 6 4 2 2 2 2 2 2 2 4 2 2 2 4 4 4 6 4 4 2 2 4 2 2 4 6 2 2 2 4 1 2 4 2 4 2 4 2 2 4 6 4 2 6 4 2 2 2 4 4 2 2 2 2 2 4 2 2 10 2 4 6 2 4 2 2 2 2 2 4 4 4 4 2 2 4 2 4 4 4 4 2 2 2 2 4 2 2 2 2 4 4 4 4 2 2 2 4 4 2 2 2 2 2 2 4 2 2 2 2 4 2 2 2 4 2 2 4 6 2 2 4 2 2 2 4 2 2 2 2 2 2 2 2...

output:

-1

result:

ok ok, n = 200

Test #131:

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

input:

200
2 2 4 2 4 2 4 4 2 2 6 2 4 2 2 2 4 4 2 2 2 1 2 4 4 4 2 4 2 2 2 4 4 4 4 2 4 2 2 2 4 4 4 2 2 2 6 4 2 2 4 2 2 4 4 4 2 2 6 4 2 4 2 2 2 4 2 2 4 4 4 4 2 6 4 2 4 2 2 4 2 2 2 2 4 2 2 2 2 2 4 2 2 4 2 4 2 2 2 4 5 2 2 4 2 2 2 4 8 2 6 2 4 2 2 2 6 2 2 4 2 2 2 4 4 2 2 2 2 2 4 2 4 4 2 4 2 2 2 2 2 2 2 2 2 2 2 4 ...

output:

298
2 1 3
2 1 2
2 2 3
2 3 5
2 3 4
2 4 5
2 5 7
2 5 6
2 6 7
2 7 8
2 7 9
2 8 9
2 8 11
2 8 10
2 10 11
2 11 12
2 11 14
2 11 13
2 11 15
2 12 14
2 13 15
2 13 17
2 13 16
2 16 17
2 17 18
2 17 19
2 18 19
2 18 24
2 18 20
2 20 24
2 21 25
2 21 23
2 22 101
2 23 25
2 24 26
2 24 25
2 25 26
2 26 28
2 26 27
2 27 28
2...

result:

ok ok, n = 200

Test #132:

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

input:

200
2 2 2 2 2 2 2 4 2 2 6 4 6 2 2 2 4 2 2 2 2 2 2 4 8 4 4 3 2 2 2 2 6 6 2 4 2 2 2 4 4 4 2 2 4 4 2 4 2 2 2 4 4 2 4 2 2 2 2 4 2 2 4 2 4 2 4 4 2 6 4 2 2 2 2 2 2 2 2 2 2 2 6 8 2 4 4 2 2 4 6 4 2 2 4 2 2 2 2 4 2 2 2 2 6 2 4 2 2 2 4 2 4 2 4 6 4 2 2 2 3 2 2 4 2 2 4 4 4 2 2 2 2 4 2 4 2 2 4 2 2 4 2 6 2 2 4 2 ...

output:

-1

result:

ok ok, n = 200

Test #133:

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

input:

200
4 2 4 2 2 4 4 2 4 4 4 2 4 2 2 2 2 2 2 6 2 2 2 4 2 2 2 2 4 6 4 4 2 2 2 2 4 4 6 2 2 4 2 2 6 4 4 2 4 2 2 2 4 2 2 4 2 2 6 4 2 4 8 6 4 2 2 2 4 2 2 2 4 2 4 2 3 2 2 6 4 4 5 4 2 2 2 2 2 6 2 2 4 2 2 6 2 2 2 2 2 4 4 2 2 2 2 2 2 2 4 8 2 2 2 2 2 2 4 4 4 2 4 2 4 2 4 4 6 2 6 2 4 2 2 2 4 2 2 2 2 4 2 4 2 2 4 2 ...

output:

298
2 1 2
2 1 4
2 1 3
2 1 5
2 2 4
2 3 5
2 3 6
2 3 8
2 6 8
2 6 7
2 6 12
2 7 12
2 7 9
2 7 14
2 9 14
2 9 10
2 9 15
2 10 15
2 10 11
2 10 16
2 11 16
2 11 13
2 11 17
2 13 17
2 13 20
2 13 18
2 18 20
2 19 20
2 19 21
2 20 21
2 20 24
2 20 22
2 22 24
2 23 29
2 23 24
2 24 29
2 25 30
2 25 26
2 26 30
2 27 30
2 27...

result:

ok ok, n = 200

Test #134:

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

input:

200
2 6 2 4 6 2 6 2 4 2 2 2 2 2 6 2 2 2 4 4 2 2 2 4 2 4 2 2 4 4 2 4 4 2 2 2 2 4 4 2 2 2 4 4 4 2 2 2 2 2 2 4 2 2 2 2 2 2 2 6 4 2 4 2 2 4 6 2 2 8 6 4 2 2 1 6 2 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 2 2 2 2 2 4 2 2 2 4 2 4 4 6 2 2 2 4 4 2 2 4 2 4 2 2 2 2 6 4 4 4 2 2 4 6 4 2 6 4 2 4 2 2 4 2 4 8 2 4 2 2 2 2 4 ...

output:

-1

result:

ok ok, n = 200

Test #135:

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

input:

200
2 2 4 4 4 4 2 2 4 2 4 4 2 2 4 4 4 2 2 2 2 4 2 2 4 2 4 2 4 2 2 2 2 2 4 6 4 10 2 4 4 2 2 2 2 6 2 2 4 4 2 4 4 4 2 4 4 2 4 2 2 2 2 2 2 2 2 4 2 2 4 4 4 2 2 2 6 4 4 2 2 2 2 4 2 2 2 2 4 2 4 2 2 4 2 2 4 2 4 2 2 2 2 4 6 2 2 2 2 6 2 4 2 2 8 2 4 8 2 4 2 2 4 2 4 2 4 2 4 2 6 2 2 2 2 2 2 2 2 4 2 4 2 6 4 4 4 2...

output:

297
2 1 4
2 1 2
2 2 4
2 3 169
2 3 173
2 3 5
2 3 4
2 4 5
2 5 6
2 5 7
2 6 7
2 6 9
2 6 8
2 8 9
2 9 11
2 9 10
2 10 11
2 11 12
2 11 13
2 12 13
2 12 15
2 12 14
2 14 15
2 15 16
2 15 18
2 16 18
2 16 17
2 16 19
2 17 19
2 17 22
2 17 20
2 20 22
2 21 25
2 21 22
2 22 25
2 23 27
2 23 24
2 24 27
2 25 29
2 25 26
2 ...

result:

ok ok, n = 200

Test #136:

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

input:

199
4 4 6 2 2 4 2 2 4 2 2 4 2 4 2 2 2 4 2 4 2 4 2 2 4 4 2 2 4 2 2 6 2 4 2 2 2 2 2 2 2 2 4 2 2 2 4 2 2 2 8 4 2 2 4 2 4 2 2 2 4 2 4 10 2 2 10 4 2 2 4 2 4 2 2 2 2 4 2 2 4 4 2 4 2 2 2 4 2 2 2 4 6 2 8 8 2 2 6 4 4 2 2 4 2 2 2 4 2 4 2 4 2 2 2 2 4 2 2 2 4 2 2 2 6 2 4 2 2 2 2 4 2 4 4 4 4 2 4 2 4 2 2 4 4 6 2 ...

output:

-1

result:

ok ok, n = 199

Test #137:

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

input:

199
2 4 2 4 2 2 4 2 2 2 2 4 2 4 4 2 4 2 4 4 2 4 4 4 2 2 2 4 2 2 2 4 4 2 4 4 2 8 4 2 6 2 4 2 4 2 2 2 2 2 4 2 2 4 2 4 2 2 2 2 2 4 2 2 2 2 4 4 2 2 4 2 2 4 4 4 4 2 4 4 4 4 4 2 2 4 4 6 2 4 2 4 2 2 4 2 2 2 2 2 2 2 4 6 2 6 2 2 2 6 2 4 2 4 4 2 2 4 2 2 4 2 4 4 2 4 4 2 2 8 2 2 2 2 6 2 4 2 2 2 2 2 2 2 2 4 4 2 ...

output:

297
2 1 2
2 1 3
2 2 3
2 2 4
2 2 5
2 4 5
2 4 7
2 4 6
2 6 7
2 7 12
2 7 8
2 8 12
2 9 14
2 9 10
2 10 14
2 11 15
2 11 12
2 12 15
2 13 17
2 13 14
2 14 17
2 15 19
2 15 16
2 16 19
2 17 20
2 17 18
2 18 20
2 19 22
2 19 20
2 20 22
2 21 23
2 21 22
2 22 23
2 23 24
2 23 25
2 24 25
2 24 28
2 24 26
2 26 28
2 27 32
...

result:

ok ok, n = 199

Test #138:

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

input:

199
4 6 4 2 4 2 4 2 4 2 2 2 4 2 2 2 2 6 2 2 2 2 2 2 4 6 2 4 4 4 2 2 4 2 4 4 2 2 2 2 2 2 2 2 2 4 6 2 2 2 2 2 2 6 2 2 4 4 2 2 2 4 6 4 2 2 2 2 2 4 2 2 2 2 2 4 2 4 4 6 4 4 4 2 2 2 2 2 2 2 4 2 2 4 2 2 2 2 2 4 4 2 2 4 2 2 6 2 4 2 6 2 6 4 2 2 6 2 2 2 2 4 2 2 2 4 2 4 2 2 2 4 4 2 2 2 4 4 2 2 2 4 2 6 2 2 2 2 ...

output:

296
2 1 4
2 1 6
2 1 2
2 1 8
2 2 8
2 2 10
2 2 11
2 2 3
2 2 12
2 3 12
2 3 5
2 3 14
2 4 6
2 5 14
2 5 7
2 5 15
2 7 15
2 7 9
2 7 16
2 9 16
2 9 13
2 9 17
2 10 11
2 13 17
2 13 18
2 13 19
2 18 19
2 18 20
2 18 21
2 18 25
2 18 22
2 20 21
2 22 25
2 23 26
2 23 24
2 24 26
2 25 26
2 25 27
2 26 27
2 26 28
2 26 31
...

result:

ok ok, n = 199

Test #139:

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

input:

199
4 4 2 4 2 4 4 2 2 2 2 2 2 2 6 2 2 4 2 2 2 2 2 4 2 2 8 4 2 6 6 2 2 2 2 4 6 4 2 2 4 2 2 4 2 4 2 4 4 2 4 4 2 4 2 2 4 2 6 2 2 2 2 4 2 2 2 2 6 4 4 4 1 4 2 4 6 2 4 2 4 2 2 2 4 2 2 2 2 2 2 2 6 2 2 6 2 2 2 4 4 2 2 4 2 2 2 4 2 2 6 2 2 2 6 2 4 4 2 8 2 4 2 8 2 4 2 4 4 2 2 2 4 2 2 2 4 2 2 2 4 6 8 2 2 2 4 2 ...

output:

-1

result:

ok ok, n = 199

Test #140:

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

input:

199
4 4 4 2 2 4 2 4 4 4 2 4 2 2 2 2 2 2 2 2 2 2 2 4 2 4 2 4 2 6 4 4 2 2 4 8 2 4 2 2 8 2 2 2 4 2 2 6 2 2 2 2 2 4 2 2 6 2 6 4 2 2 6 2 2 2 2 4 2 2 2 2 6 2 2 2 2 2 4 2 2 4 2 4 4 4 4 4 2 1 4 4 4 2 4 4 2 4 2 2 2 4 2 2 2 2 2 4 2 4 2 4 2 2 2 6 4 2 6 2 4 4 2 4 4 2 2 4 4 6 3 4 4 2 2 2 2 4 2 4 4 2 2 2 4 2 4 4 ...

output:

296
2 1 4
2 1 5
2 1 2
2 1 7
2 2 7
2 2 3
2 2 11
2 3 11
2 3 6
2 3 13
2 4 5
2 6 13
2 6 8
2 6 14
2 8 14
2 8 9
2 8 15
2 9 15
2 9 10
2 9 16
2 10 16
2 10 12
2 10 17
2 12 17
2 12 24
2 12 18
2 18 24
2 19 26
2 19 20
2 20 26
2 21 28
2 21 22
2 22 28
2 23 30
2 23 24
2 24 30
2 25 30
2 25 26
2 26 30
2 27 31
2 27 2...

result:

ok ok, n = 199

Test #141:

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

input:

199
4 4 2 4 2 4 4 2 4 2 2 4 4 4 6 6 4 2 2 4 4 2 4 2 2 2 4 2 4 4 4 4 2 4 2 2 2 4 2 4 2 4 6 4 2 2 4 4 4 2 2 4 6 2 3 2 2 4 2 6 2 2 2 4 2 2 8 2 2 4 2 2 2 6 2 2 2 2 2 4 2 2 4 2 4 6 4 2 2 2 4 4 2 2 4 2 2 2 6 4 2 2 2 2 2 4 4 2 4 2 2 2 4 2 2 2 2 4 2 2 2 2 4 2 2 2 2 4 6 2 2 4 4 2 2 2 4 4 2 4 2 2 2 2 2 2 4 4 ...

output:

-1

result:

ok ok, n = 199

Test #142:

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

input:

199
4 2 2 4 2 2 4 2 2 2 2 2 2 2 4 2 4 2 4 4 4 2 4 6 4 2 4 2 2 4 4 2 2 2 4 2 6 2 6 2 2 2 4 2 2 2 2 4 2 4 2 4 4 2 4 4 2 2 2 2 2 2 2 4 2 6 2 4 2 4 4 2 2 2 2 2 4 4 2 2 4 2 2 2 2 2 2 4 4 2 2 4 2 4 2 2 2 4 6 4 4 2 4 2 6 2 4 5 2 2 2 4 4 2 2 4 2 2 4 6 2 2 4 4 2 2 4 6 6 2 2 6 2 2 2 4 4 2 4 4 2 2 2 2 2 6 6 6 ...

output:

296
2 1 2
2 1 3
2 1 4
2 1 5
2 2 3
2 4 5
2 4 7
2 4 6
2 6 7
2 7 15
2 7 8
2 8 15
2 9 17
2 9 10
2 10 17
2 11 19
2 11 12
2 12 19
2 13 20
2 13 14
2 14 20
2 15 21
2 15 16
2 16 21
2 17 23
2 17 18
2 18 23
2 19 24
2 19 20
2 20 24
2 21 24
2 21 22
2 22 24
2 23 25
2 23 24
2 24 25
2 25 27
2 25 26
2 26 27
2 27 30
...

result:

ok ok, n = 199

Test #143:

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

input:

199
2 4 4 2 2 2 2 2 2 4 2 4 2 4 2 4 2 2 4 6 2 2 2 2 2 2 2 2 6 2 2 4 2 4 2 2 2 4 2 6 2 8 2 4 2 2 4 4 6 4 4 2 2 2 4 2 4 2 2 4 2 2 2 4 2 2 2 2 4 2 2 2 2 4 6 2 2 2 8 6 2 2 4 2 2 4 2 2 6 4 2 4 2 2 6 2 2 4 2 4 2 2 2 4 2 4 4 2 2 4 4 4 2 2 2 2 1 2 4 2 6 6 4 2 4 4 2 2 2 2 2 6 2 2 2 2 4 2 6 2 4 4 2 4 2 2 2 2 ...

output:

-1

result:

ok ok, n = 199

Test #144:

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

input:

199
2 2 4 4 2 4 6 2 2 4 4 6 8 2 4 2 8 4 4 8 1 4 4 4 2 4 2 2 1 2 2 4 6 2 6 2 6 4 6 2 2 2 4 2 2 2 4 2 2 2 2 4 4 2 2 2 6 2 2 4 4 2 4 4 6 2 2 2 6 2 6 2 2 4 2 2 2 2 2 4 2 2 2 2 4 4 6 2 2 4 4 2 4 4 2 4 4 2 2 2 4 4 2 2 2 2 2 2 6 4 2 6 4 2 2 4 2 2 2 6 2 4 2 2 2 6 2 4 2 4 2 2 4 2 2 2 2 2 2 2 2 2 4 4 4 2 2 4 ...

output:

296
2 1 4
2 1 2
2 2 4
2 3 21
2 3 29
2 3 6
2 3 4
2 4 6
2 5 7
2 5 6
2 6 7
2 7 8
2 7 9
2 7 10
2 7 14
2 8 9
2 10 14
2 10 11
2 10 16
2 11 16
2 11 12
2 11 25
2 12 25
2 12 27
2 12 28
2 12 13
2 12 30
2 13 30
2 13 31
2 13 34
2 13 36
2 13 40
2 13 15
2 13 41
2 15 41
2 15 17
2 15 42
2 17 42
2 17 44
2 17 45
2 17...

result:

ok ok, n = 199

Test #145:

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

input:

200
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 1 1 1 1 1 44 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 = 200

Test #146:

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

input:

200
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 52 1 1 1 1 1 1 1 1 1 50 1 1 1 1 48 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 54 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

200
2 1 114
2 2 114
2 3 114
2 4 114
2 5 114
2 6 114
2 7 114
2 8 114
2 9 114
2 10 114
2 11 114
2 12 114
2 13 114
2 14 114
2 15 114
2 16 114
2 17 114
2 18 114
2 19 114
2 20 114
2 21 114
2 22 114
2 23 114
2 24 114
2 25 114
2 26 114
2 27 114
2 28 114
2 29 114
2 30 114
2 31 114
2 32 114
2 33 114
2 34 114...

result:

ok ok, n = 200

Test #147:

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

input:

200
2 3 2 3 2 3 2 2 3 3 3 3 3 5 3 2 3 3 2 3 3 2 3 3 3 3 2 2 3 3 3 2 3 2 3 2 2 3 2 2 3 3 3 3 2 3 3 3 3 3 2 3 2 3 3 3 2 3 3 3 3 3 3 2 3 3 3 3 3 2 3 3 3 3 3 3 3 2 2 2 3 2 3 2 3 3 3 3 2 2 3 3 3 2 2 3 3 2 2 3 3 3 2 2 3 2 3 2 5 3 3 3 3 3 3 2 3 3 3 2 2 3 2 2 3 2 2 3 3 2 3 3 2 3 2 3 2 3 3 3 3 3 2 2 2 2 3 2 ...

output:

-1

result:

ok ok, n = 200

Test #148:

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

input:

200
2 3 3 2 3 2 3 2 3 2 2 3 3 3 3 3 2 3 3 3 3 2 3 3 3 3 2 2 2 3 2 3 3 3 2 3 3 3 2 3 2 2 3 2 2 3 3 3 3 3 3 2 2 3 3 2 3 3 3 3 2 3 3 2 2 3 3 2 3 3 3 3 3 3 2 3 2 3 3 4 2 3 3 3 2 3 2 2 2 2 2 3 3 3 3 2 3 3 2 2 3 3 3 2 2 3 3 2 2 3 2 3 3 2 3 3 2 3 3 3 3 3 2 3 2 3 2 3 3 3 3 2 2 3 3 3 3 2 3 2 3 3 3 3 3 3 3 2 ...

output:

266
2 1 3
2 1 4
2 2 3
2 2 6
2 2 7
2 3 4
2 5 7
2 5 8
2 5 12
2 6 7
2 8 12
2 9 12
2 9 13
2 9 16
2 10 14
2 10 11
2 11 14
2 13 14
2 13 16
2 15 16
2 15 17
2 15 19
2 17 19
2 18 19
2 18 22
2 18 21
2 20 21
2 20 27
2 20 24
2 21 22
2 23 24
2 23 28
2 23 26
2 24 27
2 25 26
2 25 29
2 25 32
2 26 28
2 29 32
2 30 32...

result:

ok ok, n = 200

Test #149:

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

input:

200
1 7 1 5 3 5 1 1 1 1 3 1 1 1 3 1 1 1 1 1 3 3 9 3 3 3 3 1 1 3 1 5 1 3 1 1 5 1 1 5 3 1 3 3 1 3 5 9 1 1 1 5 3 1 1 1 1 7 3 1 3 1 3 5 1 1 1 3 3 1 1 5 3 1 3 1 1 1 1 5 5 1 1 3 7 3 5 5 3 3 1 3 1 5 1 3 5 3 3 1 5 5 1 3 1 1 3 1 1 1 3 3 3 1 3 3 1 3 5 1 3 1 1 5 3 1 1 3 1 3 3 3 3 1 1 3 3 1 1 1 1 3 1 3 1 1 3 1 ...

output:

-1

result:

ok ok, n = 200

Test #150:

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

input:

200
3 3 3 1 1 1 1 1 1 3 1 3 7 1 1 1 1 3 3 1 1 3 1 3 3 5 1 5 1 5 5 1 3 3 3 1 1 1 3 3 1 5 3 3 1 1 3 7 3 1 5 1 3 1 5 5 3 1 1 1 1 5 1 1 1 3 1 3 1 3 5 1 3 1 3 3 1 3 1 3 5 1 3 5 3 1 1 1 1 1 3 3 1 3 1 3 5 7 1 1 3 1 7 5 5 3 1 1 1 1 1 1 5 1 1 1 5 1 1 5 1 1 1 1 3 5 1 5 3 1 1 3 1 5 1 1 5 5 1 5 5 1 1 3 1 5 1 3 ...

output:

248
2 1 4
2 1 13
2 1 2
2 2 5
2 2 13
2 3 6
2 3 13
2 3 10
2 7 10
2 8 12
2 9 13
2 10 13
2 11 18
2 12 26
2 12 13
2 13 26
2 14 19
2 15 22
2 16 24
2 17 25
2 18 28
2 18 19
2 19 28
2 20 26
2 21 28
2 22 30
2 22 24
2 23 30
2 24 30
2 25 31
2 25 26
2 26 31
2 27 31
2 28 42
2 28 30
2 29 33
2 30 42
2 31 48
2 31 33...

result:

ok ok, n = 200

Test #151:

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

input:

199
1 1 1 1 5 1 5 7 3 1 1 1 1 1 1 3 1 1 3 1 1 3 3 5 1 1 5 3 1 3 1 1 1 3 1 1 7 1 5 3 3 1 1 3 5 1 1 1 3 1 1 3 1 1 1 5 1 1 5 5 5 5 1 1 7 1 1 3 1 3 3 5 1 1 1 1 3 5 3 1 5 1 1 7 3 1 7 1 1 3 1 3 3 3 1 1 1 1 3 3 1 1 5 5 1 3 3 3 1 1 3 1 1 3 1 3 4 1 1 1 3 7 1 3 3 1 5 3 3 5 3 3 3 5 1 3 1 1 1 5 5 3 5 1 1 1 1 1 ...

output:

-1

result:

ok ok, n = 199

Test #152:

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

input:

199
1 3 5 3 1 3 7 7 1 3 5 7 1 5 7 1 5 7 1 1 1 1 3 5 1 3 3 1 3 1 1 1 3 5 1 1 3 3 5 1 1 1 5 1 1 1 5 3 1 1 1 1 3 1 5 5 1 1 3 1 1 5 1 5 1 5 1 1 7 1 5 7 3 5 3 3 5 3 3 5 5 3 1 3 3 1 3 1 1 1 1 5 7 3 3 1 1 1 1 3 1 5 1 1 1 5 1 1 3 3 5 3 3 5 7 1 3 1 1 1 3 3 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 3 1 1 1 1 3 1 1 3 3 1 ...

output:

247
2 1 2
2 2 3
2 2 4
2 3 5
2 3 4
2 3 7
2 3 6
2 4 9
2 6 13
2 6 7
2 7 16
2 7 10
2 7 23
2 7 8
2 7 26
2 8 19
2 8 26
2 8 27
2 8 29
2 8 11
2 8 33
2 10 20
2 10 23
2 11 21
2 11 33
2 11 12
2 11 37
2 12 22
2 12 37
2 12 38
2 12 48
2 12 14
2 12 53
2 14 25
2 14 53
2 14 15
2 14 59
2 15 28
2 15 59
2 15 73
2 15 75...

result:

ok ok, n = 199

Test #153:

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

input:

200
4 1 5 6 2 1 4 5 3 1 2 4 2 1 1 2 2 4 6 2 2 2 1 7 4 2 1 1 4 2 2 2 4 2 2 1 2 2 3 4 2 2 4 2 1 6 4 1 2 5 2 2 5 1 1 1 2 4 4 2 2 2 2 3 4 2 2 3 4 4 2 1 3 4 4 1 4 2 1 2 2 2 1 4 4 1 1 4 3 4 1 4 4 1 2 2 6 2 2 4 2 2 2 4 4 2 2 2 2 2 2 2 6 2 1 3 2 2 1 2 2 2 4 2 1 4 2 6 9 2 1 2 4 1 2 6 2 4 3 4 2 2 1 3 2 2 2 2 ...

output:

-1

result:

ok ok, n = 200

Test #154:

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

input:

200
2 4 6 4 4 1 4 5 1 2 3 2 2 1 1 8 2 1 2 4 4 4 2 1 2 2 2 2 4 1 2 2 2 4 1 2 2 2 6 4 2 4 4 3 1 4 2 4 3 2 6 2 2 3 5 1 2 4 4 2 4 3 3 1 2 5 2 2 2 4 4 1 4 1 1 2 6 5 4 6 2 1 7 2 4 4 2 6 7 2 1 2 4 1 4 4 2 4 4 3 1 4 2 4 1 3 2 1 4 4 4 2 4 2 2 2 2 1 6 4 4 1 1 4 2 2 1 3 1 2 1 2 4 2 6 2 1 2 6 1 2 6 2 2 3 4 4 3 ...

output:

278
2 1 20
2 1 2
2 2 105
2 2 108
2 2 20
2 3 82
2 3 91
2 3 94
2 3 101
2 3 21
2 3 4
2 4 74
2 4 75
2 4 21
2 5 64
2 5 72
2 5 22
2 5 7
2 6 16
2 7 45
2 7 56
2 7 22
2 8 30
2 8 35
2 8 118
2 8 29
2 8 10
2 9 16
2 10 29
2 11 122
2 11 34
2 11 12
2 12 34
2 13 39
2 13 16
2 14 16
2 15 16
2 16 18
2 16 24
2 16 39
2 ...

result:

ok ok, n = 200

Test #155:

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

input:

200
2 4 2 3 4 2 3 2 2 2 2 1 1 5 4 2 5 2 5 4 2 4 4 2 2 2 4 3 2 2 1 4 3 2 4 2 4 3 1 2 2 2 1 1 4 6 3 2 2 3 1 1 1 2 2 1 2 2 1 2 2 2 5 3 4 2 3 4 2 4 2 2 3 3 4 2 4 3 4 2 2 1 4 1 1 4 2 2 3 2 2 6 2 4 6 4 2 3 2 7 4 2 2 1 4 5 5 2 2 4 8 4 2 7 2 2 2 4 2 2 2 2 5 1 2 5 2 6 4 5 4 2 7 2 2 3 2 4 6 2 4 2 2 2 2 2 3 3 ...

output:

-1

result:

ok ok, n = 200

Test #156:

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

input:

200
4 2 2 2 2 1 6 4 4 2 1 2 1 2 1 2 4 5 2 2 4 2 3 2 5 3 2 2 2 2 2 2 2 2 4 2 2 3 3 2 2 3 2 2 5 3 4 2 2 3 4 4 4 6 2 6 2 1 2 3 1 2 2 3 4 4 2 3 2 2 4 3 4 4 3 1 8 2 4 4 5 2 2 4 4 1 2 2 3 2 4 3 4 2 4 2 3 3 3 3 4 2 1 5 3 2 2 1 4 1 2 4 4 2 2 3 5 2 6 4 2 4 6 4 4 3 2 2 5 3 1 4 3 2 2 6 2 3 4 2 4 2 2 1 2 2 2 2 ...

output:

283
2 1 2
2 1 3
2 1 7
2 1 4
2 2 3
2 4 7
2 5 7
2 5 10
2 6 99
2 7 10
2 7 8
2 7 12
2 8 12
2 8 9
2 8 14
2 9 14
2 9 17
2 9 16
2 11 100
2 13 104
2 15 105
2 16 17
2 17 21
2 17 19
2 18 23
2 18 27
2 18 26
2 18 24
2 18 22
2 19 21
2 20 23
2 20 21
2 21 23
2 22 24
2 25 26
2 25 30
2 25 35
2 25 29
2 25 28
2 26 27
...

result:

ok ok, n = 200

Test #157:

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

input:

182
9 1 1 1 1 1 9 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 5 1 1 1 1 1 1 5 1 1 1 1 1 1 3 1 1 1 1 1 7 1 1 1 5 1 1 1 1 1 3 1 1 1 1 1 1 1 1 3 1 5 1 9 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 3 1 1 1 7 1 1 1 3 1 1 1 1 1 1 5 1 1 1 3 7 5 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 3 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

-1

result:

ok ok, n = 182

Test #158:

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

input:

190
1 5 1 1 1 4 1 1 1 1 9 1 1 15 5 1 1 13 1 1 1 5 1 9 5 1 1 9 1 1 1 1 1 5 7 1 1 1 3 1 1 1 1 7 1 1 1 7 1 7 1 3 1 7 9 4 1 1 1 1 9 1 1 1 1 1 1 1 1 7 1 5 1 1 1 7 1 1 9 1 1 5 1 1 1 1 1 1 1 5 1 1 1 6 1 1 1 1 1 1 2 5 1 1 1 4 1 1 3 1 1 1 6 1 1 1 1 7 1 1 1 1 3 1 1 1 1 1 1 1 7 1 11 5 1 1 3 1 1 5 1 1 1 1 1 9 1...

output:

-1

result:

ok ok, n = 190

Test #159:

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

input:

198
1 1 8 1 1 1 4 2 4 5 10 10 2 1 2 6 1 2 4 2 1 1 1 1 1 1 1 4 4 6 1 1 1 1 6 1 6 1 1 1 1 1 4 5 2 8 6 2 1 1 2 4 2 1 4 4 6 2 1 1 1 1 1 6 1 2 1 1 1 1 1 2 1 2 1 12 4 2 2 4 1 6 4 4 1 1 1 1 1 6 1 1 7 4 2 4 1 8 9 1 4 1 1 4 4 2 2 1 1 1 5 2 2 2 7 4 1 1 1 1 1 2 1 6 1 6 2 1 1 1 6 6 6 1 8 4 1 1 1 1 1 4 1 1 6 1 4...

output:

-1

result:

ok ok, n = 198

Test #160:

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

input:

191
1 1 11 17 1 13 1 1 7 1 1 1 1 1 1 1 10 8 1 11 1 8 1 1 1 9 1 1 1 1 1 1 1 1 1 11 1 1 1 1 20 12 1 1 1 9 9 1 1 1 1 14 1 1 1 1 1 5 7 1 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 11 3 1 1 1 1 13 1 1 1 1 1 1 1 1 1 4 9 1 1 9 9 9 1 9 1 1 1 1 1 1 1 7 1 17 9 1 1 11 1 1 1 3 1 1 16 1 8 1 1 1 7 1 1 9 1 1 1 1 11 1 1 ...

output:

-1

result:

ok ok, n = 191

Test #161:

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

input:

199
2 2 2 5 2 2 2 3 5 2 2 2 4 2 2 4 2 5 2 4 2 3 2 2 2 2 2 3 2 7 2 4 4 2 4 3 6 2 4 2 3 2 3 2 2 2 3 4 2 2 2 2 4 2 2 4 4 5 2 2 1 3 7 3 2 3 2 6 3 2 4 2 2 2 2 2 2 4 3 4 2 3 4 2 2 4 2 4 2 3 2 2 2 2 4 2 4 2 4 4 4 3 2 7 6 4 2 2 2 2 2 5 3 2 2 2 2 4 2 5 4 2 4 2 3 2 2 2 3 2 5 5 7 4 3 4 4 4 2 2 3 1 2 2 2 3 3 4 ...

output:

-1

result:

ok ok, n = 199

Test #162:

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

input:

199
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 13 1 9 1 12 5 1 1 9 6 1 1 4 1 11 1 1 6 1 1 1 1 12 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 13 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 9 7 1 1 10 13 1 8 1 1 1 1 1 1 1 8 4 7 1 1 1 1 1 1 8 1 1 9 1 1 1 1 1 1 1 3 1 1 1 1 5 1 3 1 1 1 3 1 1 1 1 1 1 1 ...

output:

-1

result:

ok ok, n = 199

Test #163:

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

input:

199
1 4 4 1 1 4 1 1 2 1 2 2 1 4 7 1 4 4 1 1 1 1 6 4 6 2 4 2 1 8 1 1 4 1 3 1 1 4 1 6 7 4 2 4 3 6 1 1 4 4 3 2 6 4 1 1 1 1 8 1 1 1 1 1 1 4 2 1 1 1 1 1 2 1 1 1 3 6 1 4 6 1 1 1 6 1 1 6 6 1 2 1 1 1 2 1 4 2 2 2 3 3 2 2 1 1 4 4 1 6 1 1 1 2 3 1 4 1 2 6 1 2 1 1 1 6 1 4 1 4 4 4 2 2 7 4 6 6 4 4 1 1 4 1 1 2 1 1 ...

output:

-1

result:

ok ok, n = 199

Test #164:

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

input:

199
6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 9 1 1 1 1 1 1 1 1 1 1 1 1 1 4 10 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 6 1 1 1 1 1 1 1 8 8 1 8 1 1 6 1 1 2 1 1 1 1 1 8 14 1 1 12 1 1 1 1 1 1 1 12 1 1 1 1 1 1 1 10 1 1...

output:

209
2 1 191
2 1 192
2 1 193
2 1 195
2 1 169
2 1 26
2 2 169
2 3 169
2 4 169
2 5 169
2 6 169
2 7 169
2 8 164
2 9 164
2 10 164
2 11 164
2 12 164
2 13 164
2 14 162
2 15 162
2 16 162
2 17 162
2 18 162
2 19 162
2 20 161
2 21 161
2 22 161
2 23 161
2 24 160
2 25 160
2 26 169
2 27 160
2 28 160
2 29 160
2 30 ...

result:

ok ok, n = 199

Test #165:

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

input:

200
1 5 1 5 1 4 3 3 3 3 3 1 2 5 1 5 1 3 5 1 3 3 3 2 4 7 1 3 1 3 1 5 1 5 3 5 3 1 3 3 1 3 1 3 3 3 5 3 1 1 3 3 3 3 5 3 3 5 6 3 3 1 3 3 3 1 3 2 3 7 3 1 1 3 1 3 3 5 3 1 3 3 5 3 3 3 5 3 3 3 3 4 3 3 3 1 5 3 3 2 6 3 5 3 3 3 3 3 2 3 3 4 1 3 3 3 1 1 3 3 3 4 3 1 3 5 5 1 3 1 1 3 1 3 3 1 4 5 5 1 1 1 3 4 1 2 3 1 ...

output:

-1

result:

ok ok, n = 200

Test #166:

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

input:

200
2 5 1 5 1 1 1 4 3 1 1 1 5 1 1 1 1 2 1 3 2 7 3 1 1 1 1 3 5 1 1 1 1 6 1 5 1 1 1 3 4 1 1 3 3 7 1 1 5 1 1 1 1 1 1 1 1 1 1 4 2 1 1 1 7 1 1 5 1 1 1 7 3 5 1 7 1 1 3 5 1 1 1 1 1 1 1 4 1 5 1 3 11 1 4 1 5 1 5 5 1 1 1 8 1 1 3 1 1 1 1 1 1 3 1 1 3 3 1 1 3 1 1 2 2 1 1 1 1 7 1 1 1 1 3 5 1 3 1 3 1 1 1 1 1 1 5 1...

output:

216
2 1 147
2 1 2
2 2 126
2 2 127
2 2 128
2 2 147
2 3 136
2 4 122
2 4 123
2 4 129
2 4 164
2 4 8
2 5 136
2 6 130
2 7 130
2 8 119
2 8 120
2 8 164
2 9 131
2 9 166
2 9 13
2 10 130
2 11 130
2 12 104
2 13 115
2 13 116
2 13 132
2 13 166
2 14 104
2 15 104
2 16 104
2 17 104
2 18 166
2 18 20
2 19 104
2 20 133...

result:

ok ok, n = 200

Test #167:

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

input:

194
1 3 4 1 1 7 1 4 2 1 5 1 4 2 1 7 3 1 2 4 5 3 1 2 1 2 1 3 5 1 1 1 3 2 4 1 3 2 1 4 5 1 1 2 2 4 1 1 2 5 1 4 7 7 2 1 1 5 2 3 2 4 1 2 2 5 3 2 5 1 5 3 7 6 3 3 3 3 3 5 1 1 2 1 2 5 5 1 5 4 3 5 2 7 3 1 1 1 2 5 2 4 1 15 3 1 3 2 2 5 1 5 4 3 1 5 2 3 1 4 2 2 2 1 2 3 2 5 3 2 6 1 1 4 1 1 2 2 4 4 2 2 1 1 1 4 3 1...

output:

-1

result:

ok ok, n = 194

Test #168:

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

input:

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

output:

-1

result:

ok ok, n = 198

Test #169:

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

input:

200
2 2 4 1 4 4 1 2 4 1 2 4 1 2 3 1 4 2 2 4 1 2 1 2 4 2 2 2 1 6 2 5 1 1 1 5 4 2 4 5 2 3 5 1 3 2 2 6 3 6 2 4 6 3 2 2 2 8 2 4 4 1 5 4 5 1 3 1 3 2 1 6 3 2 2 2 4 2 4 2 4 6 4 1 1 1 4 2 2 4 2 2 3 4 1 2 8 2 1 2 4 2 2 4 7 2 8 3 2 7 4 4 2 2 2 4 1 5 6 2 1 2 3 2 4 4 2 6 1 1 4 4 2 4 2 2 1 2 4 2 4 4 1 2 4 1 4 4 ...

output:

-1

result:

ok ok, n = 200

Test #170:

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

input:

198
1 1 1 1 1 1 2 1 1 1 5 1 10 1 5 1 1 8 1 1 1 1 1 1 1 1 1 1 1 8 1 1 1 1 1 1 1 1 2 1 1 1 1 4 1 9 1 1 1 1 8 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 8 1 6 4 6 1 1 1 8 12 1 1 1 1 1 1 1 6 1 1 1 1 5 1 1 2 1 1 1 1 1 1 8 1 4 1 1 1 1 1 1 1 1 1 1 10 1 1 4 1 8 6 1 6 1 1 3 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1...

output:

202
2 1 194
2 2 194
2 3 192
2 4 192
2 5 186
2 6 186
2 7 196
2 7 11
2 8 186
2 9 186
2 10 171
2 11 189
2 11 190
2 11 191
2 11 196
2 12 171
2 13 180
2 13 181
2 13 182
2 13 183
2 13 184
2 13 185
2 13 187
2 13 188
2 13 196
2 13 15
2 14 171
2 15 178
2 15 179
2 15 193
2 15 196
2 16 171
2 17 171
2 18 172
2 ...

result:

ok ok, n = 198

Test #171:

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

input:

200
2 2 3 1 3 4 1 3 2 2 2 2 2 3 2 2 3 2 3 3 2 2 2 2 4 4 6 4 4 2 4 2 1 9 3 2 1 1 5 4 1 1 1 4 4 1 2 4 2 3 3 3 2 5 4 1 4 2 3 4 2 2 5 4 2 3 6 2 1 3 2 2 2 3 2 4 3 2 2 2 1 4 3 3 7 3 2 1 2 3 2 4 1 2 3 3 3 2 3 3 1 1 2 4 2 2 2 2 3 5 1 2 2 3 4 2 3 5 3 1 2 2 3 1 3 1 2 4 3 2 2 6 2 2 2 2 2 4 2 4 2 2 5 3 2 2 1 3 ...

output:

265
2 1 5
2 1 2
2 2 5
2 3 5
2 3 9
2 3 6
2 4 114
2 6 9
2 6 14
2 6 10
2 7 117
2 8 14
2 8 13
2 8 25
2 10 14
2 11 19
2 11 12
2 12 19
2 13 25
2 15 26
2 15 16
2 16 26
2 17 19
2 17 18
2 17 27
2 18 27
2 20 34
2 20 58
2 20 39
2 21 27
2 21 22
2 22 27
2 23 28
2 23 24
2 24 28
2 25 29
2 25 26
2 26 29
2 27 31
2 2...

result:

ok ok, n = 200

Test #172:

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

input:

198
1 5 3 1 1 3 1 5 3 3 3 1 1 3 1 1 5 1 1 1 1 2 1 1 1 1 1 5 5 5 3 1 1 1 1 1 5 7 3 1 3 3 3 3 1 1 3 1 3 1 3 1 3 3 1 3 3 3 1 3 1 3 3 1 1 1 1 1 1 3 3 3 2 1 1 3 3 3 5 3 1 1 3 1 3 1 5 3 3 7 2 3 1 1 4 1 1 1 3 1 1 1 3 3 1 1 3 1 1 1 3 3 3 3 1 3 3 1 1 3 1 1 2 3 3 3 1 1 1 3 1 1 5 3 1 1 3 3 3 3 3 1 1 1 3 1 1 3 ...

output:

222
2 1 2
2 2 4
2 2 5
2 2 8
2 2 3
2 3 7
2 3 8
2 6 12
2 6 17
2 6 8
2 8 13
2 8 17
2 9 15
2 9 28
2 9 10
2 10 16
2 10 28
2 11 18
2 11 29
2 11 14
2 14 19
2 14 29
2 17 20
2 17 30
2 17 22
2 21 28
2 22 30
2 23 29
2 24 30
2 25 31
2 26 37
2 27 38
2 28 37
2 28 29
2 29 37
2 30 38
2 30 31
2 31 38
2 32 39
2 33 41...

result:

ok ok, n = 198

Test #173:

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

input:

200
4 1 2 5 3 4 6 3 1 2 1 2 2 3 1 4 4 6 1 1 2 5 1 6 3 3 2 1 2 1 1 2 1 4 4 1 4 4 1 1 1 2 4 4 4 1 2 3 3 2 1 2 1 1 1 6 5 1 6 3 4 5 3 1 4 2 1 5 6 1 6 1 1 1 1 2 4 1 6 2 6 6 3 4 2 1 1 5 2 2 2 2 1 1 1 1 3 1 3 4 4 1 4 4 2 1 2 6 1 3 2 1 1 1 3 5 1 2 4 1 2 4 5 3 5 4 1 4 1 1 5 1 4 2 1 1 1 5 1 1 1 1 3 1 2 3 2 3 ...

output:

-1

result:

ok ok, n = 200

Test #174:

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

input:

200
2 2 2 2 2 2 2 4 2 2 2 2 2 2 6 4 2 4 2 4 2 2 4 2 4 6 4 2 4 4 1 2 2 6 2 2 4 2 2 6 2 2 4 2 4 2 6 3 2 2 2 6 6 2 2 2 4 4 2 1 2 4 1 4 4 2 2 2 2 4 2 2 2 2 2 2 6 4 6 4 4 6 2 2 2 4 2 2 2 2 2 2 2 2 3 6 2 2 2 2 2 2 2 4 2 2 2 2 2 4 4 2 2 4 2 2 2 6 2 4 2 2 4 2 2 1 2 4 1 2 2 2 2 4 2 2 2 4 4 6 4 2 4 2 4 2 4 2 ...

output:

283
2 1 15
2 1 2
2 2 15
2 3 16
2 3 4
2 4 16
2 5 18
2 5 6
2 6 18
2 7 20
2 7 8
2 8 63
2 8 126
2 8 20
2 9 23
2 9 10
2 10 23
2 11 25
2 11 12
2 12 25
2 13 26
2 13 14
2 14 26
2 15 31
2 15 60
2 15 26
2 15 16
2 16 26
2 17 27
2 17 18
2 18 27
2 19 29
2 19 20
2 20 29
2 21 30
2 21 22
2 22 30
2 23 34
2 23 24
2 2...

result:

ok ok, n = 200

Test #175:

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

input:

200
1 1 4 1 1 1 7 3 1 3 2 2 1 1 2 3 1 1 1 1 1 1 7 1 2 1 1 2 3 3 2 1 1 10 1 1 1 2 2 3 1 1 3 1 5 1 2 4 1 1 4 2 1 6 3 4 6 1 1 1 2 1 1 1 5 3 1 1 1 5 4 1 3 5 1 2 1 3 3 5 1 4 1 1 1 1 2 1 2 1 1 2 1 4 1 2 1 2 2 4 2 5 1 4 6 3 1 3 5 2 5 1 1 5 3 1 2 1 3 3 1 2 1 3 1 1 4 3 1 1 1 1 1 1 2 4 2 1 1 1 6 1 1 1 3 6 9 3...

output:

228
2 1 105
2 2 105
2 3 112
2 3 113
2 3 105
2 3 7
2 4 104
2 5 104
2 6 102
2 7 95
2 7 97
2 7 103
2 7 107
2 7 116
2 7 105
2 8 118
2 8 109
2 8 10
2 9 102
2 10 121
2 10 109
2 11 111
2 11 12
2 12 111
2 13 100
2 14 100
2 15 114
2 15 16
2 16 123
2 16 114
2 17 94
2 18 94
2 19 82
2 20 82
2 21 80
2 22 80
2 23...

result:

ok ok, n = 200

Test #176:

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

input:

200
13 1 5 1 1 1 7 1 1 1 1 1 3 1 7 1 1 9 1 1 1 1 1 1 1 1 5 1 1 1 5 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 13 7 5 9 1 1 1 1 1 5 1 1 1 1 1 1 1 1 7 1 1 7 1 1 11 5 1 5 1 1 3 1 1 5 1 1 1 1 5 1 1 1 1 1 1 1 1 3 1 1 5 1 1 1 1 1 1 1 1 1 1 5 1 1 5 1 3 5 9 1 1 1 1 1 1 5 11 1 5 1 1 1 7 1 1 3 5 1 1 1 1 1 1 1 1 1 1 1 5 ...

output:

-1

result:

ok ok, n = 200

Test #177:

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

input:

200
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

298
2 1 173
2 1 2
2 2 173
2 3 173
2 3 4
2 4 173
2 5 173
2 5 6
2 6 173
2 7 173
2 7 8
2 8 173
2 9 173
2 9 10
2 10 173
2 11 173
2 11 12
2 12 173
2 13 173
2 13 14
2 14 173
2 15 173
2 15 16
2 16 173
2 17 173
2 17 18
2 18 173
2 19 173
2 19 20
2 20 173
2 21 173
2 21 22
2 22 173
2 23 173
2 23 24
2 24 173
2 ...

result:

ok ok, n = 200

Test #178:

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

input:

200
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 197 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

298
2 1 149
2 1 2
2 2 149
2 3 81
2 3 4
2 4 81
2 5 81
2 5 6
2 6 81
2 7 81
2 7 8
2 8 81
2 9 81
2 9 10
2 10 81
2 11 81
2 11 12
2 12 81
2 13 81
2 13 14
2 14 81
2 15 81
2 15 16
2 16 81
2 17 81
2 17 18
2 18 81
2 19 81
2 19 20
2 20 81
2 21 81
2 21 22
2 22 81
2 23 81
2 23 24
2 24 81
2 25 81
2 25 26
2 26 81
...

result:

ok ok, n = 200

Test #179:

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

input:

200
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 101 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 99 2 2 2 2 2...

output:

298
2 1 142
2 1 2
2 2 142
2 3 142
2 3 4
2 4 142
2 5 142
2 5 6
2 6 142
2 7 142
2 7 8
2 8 142
2 9 142
2 9 10
2 10 142
2 11 142
2 11 12
2 12 142
2 13 142
2 13 14
2 14 142
2 15 142
2 15 16
2 16 142
2 17 142
2 17 18
2 18 142
2 19 142
2 19 20
2 20 142
2 21 142
2 21 22
2 22 142
2 23 142
2 23 24
2 24 142
2 ...

result:

ok ok, n = 200

Test #180:

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

input:

200
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 100 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 100 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

298
2 1 23
2 1 2
2 2 23
2 3 23
2 3 4
2 4 23
2 5 23
2 5 6
2 6 23
2 7 23
2 7 8
2 8 23
2 9 23
2 9 10
2 10 23
2 11 23
2 11 12
2 12 23
2 13 23
2 13 14
2 14 23
2 15 23
2 15 16
2 16 23
2 17 23
2 17 18
2 18 23
2 19 23
2 19 20
2 20 23
2 21 23
2 21 22
2 22 23
2 23 24
2 23 25
2 23 26
2 23 27
2 23 28
2 23 29
2 ...

result:

ok ok, n = 200

Test #181:

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

input:

200
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

-1

result:

ok ok, n = 200

Test #182:

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

input:

2000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 = 2000

Test #183:

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

input:

2000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

2000
2 1 2
2 1 2000
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
2 20 21
2 21 22
2 22 23
2 23 24
2 24 25
2 25 26
2 26 27
2 27 28
2 28 29
2 29 30
2 30 31
2 31 32
2 32 33
2 33 34
2 34 35
2 35 36
2 36 37
2 37 38
2 38 39...

result:

ok ok, n = 2000

Test #184:

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

input:

2000
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 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 = 2000

Test #185:

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

input:

2000
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 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 = 2000

Test #186:

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

input:

2000
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 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 = 2000

Test #187:

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

input:

2000
1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ...

output:

-1

result:

ok ok, n = 2000

Test #188:

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

input:

2000
1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 ...

output:

-1

result:

ok ok, n = 2000

Test #189:

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

input:

2000
1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 ...

output:

-1

result:

ok ok, n = 2000

Test #190:

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

input:

2000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

1999
2 305 2000
2 996 1999
2 1999 1998
2 1998 1997
2 1997 1996
2 1996 1995
2 1995 1994
2 1994 1993
2 1993 1992
2 1992 1991
2 1991 1990
2 1990 1989
2 1989 1988
2 1988 1987
2 1987 1986
2 1986 1985
2 1985 1984
2 1984 1983
2 1983 1982
2 1982 1981
2 1981 1980
2 1980 1979
2 1979 1978
2 1978 1977
2 1977 19...

result:

ok ok, n = 2000

Test #191:

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

input:

2000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

1999
2 1 1660
2 2 1660
2 3 1660
2 4 1660
2 5 1660
2 6 1660
2 7 1660
2 8 1660
2 9 1660
2 10 1660
2 11 1660
2 12 1660
2 13 1660
2 14 1660
2 15 1660
2 16 1660
2 17 1660
2 18 1660
2 19 1660
2 20 1660
2 21 1660
2 22 1660
2 23 1660
2 24 1660
2 25 1660
2 26 1660
2 27 1660
2 28 1660
2 29 1660
2 30 1660
2 31...

result:

ok ok, n = 2000

Test #192:

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

input:

2000
1 1 2 1 1 1 1 1 2 1 1 1 1 4 1 13 1 11 3 2 2 1 1 2 9 1 2 2 2 3 2 6 1 2 3 5 1 3 1 1 1 1 2 5 2 4 1 3 1 2 1 3 1 2 1 1 2 2 1 6 1 1 1 2 2 1 1 5 3 2 1 2 2 2 5 1 1 1 1 3 2 3 3 2 2 1 2 1 1 1 1 3 3 4 1 2 4 1 4 3 1 4 2 2 2 3 2 2 1 2 2 1 3 1 1 2 1 1 1 1 1 2 1 1 3 1 3 1 4 2 2 4 1 6 4 3 1 2 1 2 1 1 1 2 3 3 1...

output:

-1

result:

ok ok, n = 2000

Test #193:

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

input:

2000
1 2 2 1 1 1 1 4 3 4 2 1 4 3 1 4 2 1 1 2 2 2 2 2 5 1 2 1 1 5 1 2 6 1 2 3 1 1 2 1 2 2 1 2 6 1 2 6 2 1 4 1 2 1 2 5 1 2 2 4 1 1 1 3 3 1 5 1 2 1 2 1 1 3 1 1 3 2 1 1 2 1 2 1 1 2 1 1 1 1 3 2 6 3 1 2 2 4 1 1 1 2 1 3 4 2 2 1 2 1 1 2 2 1 1 1 2 1 2 1 1 1 2 1 2 1 4 1 3 2 1 1 2 1 3 1 4 1 1 2 1 1 2 3 1 1 1 3...

output:

1999
2 1 1137
2 4 1137
2 5 1137
2 6 455
2 7 1342
2 12 1137
2 15 455
2 18 420
2 19 1561
2 26 1342
2 28 1137
2 29 690
2 31 517
2 34 455
2 37 420
2 38 206
2 40 1879
2 43 1816
2 46 1807
2 50 1667
2 52 1561
2 54 1513
2 57 1354
2 61 1342
2 62 1142
2 63 1137
2 66 1041
2 68 792
2 70 690
2 72 517
2 73 455
2 ...

result:

ok ok, n = 2000

Test #194:

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

input:

2000
1 1 1 2 2 2 2 4 6 1 2 2 4 4 3 4 1 2 2 1 1 1 2 2 1 1 1 1 1 2 2 4 4 1 1 4 1 1 1 1 3 4 3 3 2 1 1 1 2 1 1 1 3 2 1 1 1 4 4 2 4 1 3 2 3 2 2 2 1 1 3 2 1 2 2 2 2 1 2 1 4 6 2 1 1 4 2 1 1 5 2 2 1 3 2 1 3 2 1 1 7 1 4 5 4 2 3 1 4 2 1 4 1 3 2 1 2 2 2 1 3 3 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 5 2 1 3 1 1 1 2 1 1 2...

output:

2000
2 1 1994
2 2 1994
2 3 1975
2 4 5
2 4 1999
2 5 6
2 6 7
2 7 8
2 8 1296
2 8 1297
2 8 9
2 9 1291
2 9 1293
2 9 1294
2 9 1295
2 9 11
2 10 1975
2 11 12
2 12 13
2 13 1289
2 13 1290
2 13 14
2 14 1287
2 14 1288
2 14 15
2 15 1299
2 15 16
2 16 1284
2 16 1286
2 16 18
2 17 1970
2 18 19
2 19 23
2 20 1970
2 21...

result:

ok ok, n = 2000

Test #195:

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

input:

2000
1 4 2 2 1 1 2 4 1 1 2 3 1 6 2 1 4 1 1 2 1 1 1 5 1 5 1 2 2 3 1 2 1 1 5 1 1 1 2 3 3 6 1 1 4 3 3 2 1 3 1 1 1 3 2 2 3 4 1 1 2 9 3 2 3 1 1 3 3 2 5 3 2 1 1 1 1 2 4 1 1 1 1 2 8 1 2 3 3 6 1 1 3 1 1 3 2 1 1 4 4 1 4 2 3 2 2 3 2 3 1 1 3 5 4 2 4 4 3 5 1 4 3 1 5 2 3 2 1 2 2 1 2 2 1 1 1 3 2 1 1 2 1 6 2 1 3 4...

output:

2001
2 1 1986
2 2 1328
2 2 1329
2 2 1999
2 2 3
2 3 1999
2 4 7
2 4 1999
2 5 1986
2 6 1972
2 7 8
2 8 1323
2 8 1326
2 8 11
2 9 1972
2 10 1954
2 11 12
2 12 1330
2 12 14
2 13 1954
2 14 1315
2 14 1317
2 14 1320
2 14 1322
2 14 15
2 15 17
2 16 1952
2 17 1312
2 17 1314
2 17 20
2 18 1952
2 19 1939
2 20 24
2 2...

result:

ok ok, n = 2000

Test #196:

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

input:

2000
2 1 3 2 4 1 1 1 1 1 1 1 1 1 3 3 1 2 2 7 2 1 1 2 3 1 1 1 2 5 3 2 1 1 3 1 1 1 1 2 1 1 4 1 4 5 1 1 1 2 2 3 4 6 1 3 1 5 3 1 2 1 2 1 3 1 2 2 1 2 1 5 2 2 2 4 1 3 1 2 1 1 1 2 1 1 1 1 8 2 1 1 1 5 1 3 2 2 1 1 3 2 2 3 2 1 2 3 4 4 2 1 1 2 1 1 2 1 4 3 5 2 2 1 2 1 2 3 1 2 2 1 3 1 1 1 4 1 2 1 2 2 1 3 2 3 1 1...

output:

2002
2 1 1984
2 1 3
2 2 1982
2 3 1314
2 3 1984
2 4 1993
2 4 5
2 5 1312
2 5 1313
2 5 1993
2 6 1982
2 7 1969
2 8 1969
2 9 1969
2 10 1969
2 11 1969
2 12 1969
2 13 1957
2 14 1957
2 15 1316
2 15 16
2 15 1996
2 16 1317
2 16 18
2 17 1954
2 18 19
2 19 20
2 20 1302
2 20 1306
2 20 1308
2 20 1311
2 20 1322
2 2...

result:

ok ok, n = 2000

Test #197:

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

input:

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

output:

2005
2 1 1963
2 2 1963
2 3 1949
2 4 1963
2 4 5
2 5 1267
2 5 1269
2 5 1963
2 6 1949
2 7 1946
2 8 1963
2 8 11
2 9 1946
2 10 1940
2 11 1963
2 12 1973
2 12 13
2 13 1272
2 13 1973
2 14 1940
2 15 1262
2 15 1265
2 15 1273
2 15 1979
2 15 16
2 16 1275
2 16 1979
2 17 1999
2 17 20
2 18 1928
2 19 1928
2 20 1255...

result:

ok ok, n = 2000

Test #198:

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

input:

2000
3 1 3 1 2 4 3 1 1 2 2 3 1 1 1 3 1 4 1 1 3 1 3 1 2 4 2 1 1 3 1 4 4 2 1 1 1 1 2 3 1 1 3 1 7 1 2 2 2 2 1 2 1 1 2 6 1 1 2 2 1 1 1 1 4 1 1 3 1 1 3 4 1 1 4 1 1 1 4 1 1 4 1 1 2 3 3 1 1 7 4 1 1 1 1 5 1 3 1 1 2 2 2 1 2 1 2 2 1 2 1 4 2 1 3 2 1 1 4 1 1 4 2 2 1 5 2 2 3 4 3 1 1 2 1 2 1 5 1 1 1 3 1 3 1 3 1 1...

output:

2014
2 1 1311
2 1 1937
2 1 3
2 2 1937
2 3 1314
2 3 1937
2 4 1937
2 5 1939
2 5 6
2 6 1309
2 6 1310
2 6 1939
2 7 1316
2 7 1939
2 7 10
2 8 1930
2 9 1930
2 10 1939
2 11 1955
2 11 12
2 12 1318
2 12 1955
2 13 1916
2 14 1916
2 15 1904
2 16 1319
2 16 1955
2 16 18
2 17 1904
2 18 1306
2 18 1307
2 18 1955
2 19...

result:

ok ok, n = 2000

Test #199:

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

input:

2000
1 1 1 1 1 1 2 3 1 1 1 1 1 6 1 1 2 1 2 2 2 1 2 3 1 1 1 4 2 7 3 1 4 1 2 4 2 3 2 2 1 1 2 1 1 2 1 3 4 3 1 4 1 2 8 3 1 2 1 2 1 2 1 2 3 1 4 4 1 4 1 1 5 2 5 1 3 2 3 2 1 1 2 1 1 2 1 2 2 1 1 2 2 1 2 1 1 1 1 1 2 1 2 1 2 1 2 1 4 2 4 1 3 3 2 1 1 1 1 5 2 1 1 2 1 1 3 1 1 1 1 1 1 2 4 3 1 2 1 3 1 5 2 1 1 1 2 1...

output:

2042
2 1 1759
2 2 1759
2 3 1757
2 4 1757
2 5 1747
2 6 1747
2 7 1761
2 7 8
2 8 1269
2 8 1761
2 9 1743
2 10 1743
2 11 1742
2 12 1742
2 13 1742
2 14 1265
2 14 1266
2 14 1267
2 14 1268
2 14 1761
2 14 17
2 15 1742
2 16 1741
2 17 1761
2 18 1741
2 19 1768
2 19 20
2 20 1768
2 21 1769
2 21 23
2 22 1717
2 23 ...

result:

ok ok, n = 2000

Test #200:

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

input:

2000
2 2 2 3 5 1 1 1 4 2 1 1 2 3 2 3 1 2 5 2 1 4 6 4 2 1 4 2 2 2 1 1 1 4 5 2 1 2 4 1 1 1 1 1 3 3 1 1 2 3 1 2 5 4 3 2 3 1 5 3 1 1 4 1 1 1 4 1 1 1 3 1 1 1 2 2 1 1 3 1 1 1 1 2 2 6 2 1 3 1 1 5 6 1 4 1 2 3 1 1 12 1 1 6 1 4 3 3 3 2 1 4 1 2 2 2 1 3 2 1 1 1 1 3 1 1 1 1 1 3 2 2 1 4 1 2 3 1 1 1 5 3 1 1 1 2 2 ...

output:

2132
2 1 1505
2 1 2
2 2 1505
2 3 1511
2 3 4
2 4 1244
2 4 1511
2 5 1239
2 5 1243
2 5 1246
2 5 1530
2 5 9
2 6 1500
2 7 1500
2 8 1499
2 9 1235
2 9 1237
2 9 1530
2 10 1547
2 10 13
2 11 1499
2 12 1496
2 13 1547
2 14 1247
2 14 1547
2 14 15
2 15 1547
2 16 1248
2 16 1548
2 16 18
2 17 1496
2 18 1548
2 19 123...

result:

ok ok, n = 2000

Test #201:

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

input:

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

output:

2429
2 1 624
2 2 624
2 3 606
2 4 938
2 4 625
2 4 10
2 5 606
2 6 605
2 7 605
2 8 604
2 9 604
2 10 625
2 11 602
2 12 602
2 13 602
2 14 602
2 15 940
2 15 627
2 15 17
2 16 601
2 17 627
2 18 627
2 18 19
2 19 933
2 19 937
2 19 941
2 19 627
2 20 927
2 20 930
2 20 931
2 20 932
2 20 633
2 20 23
2 21 601
2 22...

result:

ok ok, n = 2000

Test #202:

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

input:

2000
1 3 4 3 1 2 2 2 1 3 1 2 3 5 1 4 1 8 9 1 2 1 8 2 2 1 3 4 18 1 10 3 1 2 4 8 1 1 4 4 1 6 1 1 6 2 6 1 4 2 2 4 1 3 1 2 2 1 6 2 4 4 1 2 8 8 4 5 10 6 2 3 6 1 2 1 3 8 4 7 1 3 4 1 2 3 1 2 2 1 4 2 3 3 4 1 1 1 1 3 6 7 3 4 2 1 8 2 4 1 3 4 1 4 4 1 13 3 3 2 3 1 8 1 8 2 9 5 2 1 4 2 2 11 1 2 2 1 1 2 1 2 2 1 1 ...

output:

-1

result:

ok ok, n = 2000

Test #203:

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

input:

2000
9 5 10 2 10 9 6 14 1 27 3 1 15 4 1 5 6 1 1 1 7 20 18 2 4 12 5 7 7 9 9 5 2 1 3 18 2 29 7 6 1 7 5 5 28 17 1 10 8 13 12 12 1 11 17 1 1 13 18 7 3 7 4 2 2 4 8 3 8 2 13 1 3 3 5 26 25 15 2 3 7 2 1 4 9 5 4 14 15 9 6 5 1 5 7 2 11 32 15 11 4 1 5 3 7 3 5 4 14 7 12 8 4 3 8 3 10 5 6 3 6 1 2 3 14 9 2 8 4 11 ...

output:

-1

result:

ok ok, n = 2000

Test #204:

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

input:

2000
1 6 27 16 23 15 8 8 39 68 46 15 41 22 4 1 3 2 18 4 103 2 39 38 9 6 32 22 35 2 12 33 21 9 8 1 55 14 38 26 4 9 28 2 17 14 23 7 35 1 34 5 6 13 10 14 8 13 19 10 17 48 1 3 12 9 17 33 44 8 3 4 11 9 20 20 22 8 5 4 16 13 1 32 7 7 32 9 29 12 4 10 21 5 87 16 44 16 21 9 13 12 3 24 4 4 5 13 10 1 22 3 6 47 ...

output:

-1

result:

ok ok, n = 2000

Test #205:

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

input:

2000
111 4 127 79 149 2 109 37 62 176 17 140 3 74 44 116 127 13 61 37 72 3 70 36 56 30 16 8 34 22 47 70 64 235 170 34 99 140 20 108 76 23 16 18 2 30 361 16 99 5 186 49 27 74 39 69 22 7 95 14 147 16 43 73 20 20 49 13 1 23 87 45 105 60 93 7 9 102 258 21 272 28 41 11 4 33 35 38 71 33 138 85 14 15 21 26...

output:

-1

result:

ok ok, n = 2000

Test #206:

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

input:

2000
27 267 166 550 960 186 207 656 28 153 66 139 69 328 113 95 308 92 270 376 182 76 223 44 258 579 321 305 66 251 632 7 269 56 55 1207 13 62 182 324 405 17 103 35 290 40 278 129 49 80 77 938 7 97 16 8 28 913 29 22 64 199 828 85 504 122 7 98 162 225 500 185 1034 392 55 25 83 4 29 48 136 346 166 29 ...

output:

-1

result:

ok ok, n = 2000

Test #207:

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

input:

2000
2 2 2 2 4 2 4 2 2 2 2 2 2 4 2 2 2 2 4 2 4 2 2 2 4 2 2 2 2 4 2 2 2 2 2 6 2 2 2 2 2 4 2 2 6 2 2 2 2 4 2 2 2 2 2 6 4 6 4 2 4 6 2 2 4 2 4 4 2 2 2 2 2 4 4 4 2 4 2 2 4 4 2 4 6 2 2 6 4 2 4 6 2 2 4 2 2 2 2 2 2 2 2 2 2 2 4 4 6 2 4 4 4 2 2 2 6 2 2 2 2 2 2 4 6 4 2 4 2 2 4 2 2 4 4 2 2 4 4 2 4 2 2 2 2 4 2 2...

output:

-1

result:

ok ok, n = 2000

Test #208:

score: 0
Accepted
time: 2ms
memory: 4012kb

input:

2000
4 2 6 2 4 2 4 8 2 2 2 6 2 2 6 2 2 2 2 2 4 2 4 2 4 2 4 2 2 4 4 6 4 4 2 2 4 6 4 4 2 2 4 2 4 4 4 4 2 4 2 4 4 2 2 2 4 2 4 2 2 2 4 4 2 2 4 2 4 8 4 4 4 2 2 2 2 6 6 6 2 2 4 2 2 2 2 4 2 6 2 2 4 6 2 4 2 2 4 2 4 2 4 4 4 4 2 2 2 2 2 2 2 4 4 2 2 4 4 4 2 2 4 4 4 2 6 2 2 2 2 4 2 2 6 2 2 2 2 4 6 4 4 2 4 2 2 2...

output:

2998
2 1 2
2 1 4
2 1 3
2 1 6
2 2 4
2 3 6
2 3 9
2 3 10
2 3 5
2 3 11
2 5 11
2 5 7
2 5 13
2 7 13
2 7 8
2 7 14
2 8 14
2 8 16
2 8 17
2 8 18
2 8 19
2 8 12
2 8 20
2 9 10
2 12 20
2 12 22
2 12 24
2 12 15
2 12 26
2 15 26
2 15 28
2 15 29
2 15 21
2 15 35
2 16 17
2 18 19
2 21 35
2 21 23
2 21 36
2 22 24
2 23 36
2...

result:

ok ok, n = 2000

Test #209:

score: 0
Accepted
time: 2ms
memory: 4012kb

input:

2000
2 4 4 4 2 6 2 2 2 2 6 4 4 6 4 2 4 2 4 6 2 6 2 2 2 2 2 2 2 4 2 2 2 6 2 2 6 4 2 2 2 2 2 2 4 2 4 2 2 4 2 2 2 2 6 4 4 2 2 4 2 2 2 2 4 2 8 2 2 2 2 4 2 6 6 4 2 8 4 2 2 2 2 4 4 2 2 2 4 4 2 2 2 4 4 2 6 4 2 2 2 2 2 2 4 2 6 2 4 2 4 2 2 4 2 4 2 6 2 2 2 4 2 2 2 2 2 2 4 2 2 2 2 2 6 2 2 2 4 4 4 2 2 4 4 4 2 2...

output:

2997
2 1 2
2 1 5
2 2 5
2 2 3
2 2 7
2 3 7
2 3 4
2 3 8
2 4 8
2 4 6
2 4 9
2 6 9
2 6 10
2 6 16
2 6 11
2 6 18
2 10 16
2 11 18
2 11 21
2 11 23
2 11 12
2 11 24
2 12 24
2 12 13
2 12 25
2 13 25
2 13 14
2 13 26
2 14 26
2 14 27
2 14 28
2 14 15
2 14 29
2 15 29
2 15 17
2 15 31
2 17 31
2 17 19
2 17 32
2 19 32
2 1...

result:

ok ok, n = 2000

Test #210:

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

input:

2000
4 2 4 2 2 2 2 2 2 2 4 2 4 2 2 2 4 2 4 2 2 2 4 2 4 2 4 2 2 2 2 4 2 2 2 2 4 4 2 2 2 2 2 2 2 6 2 4 2 4 2 2 4 4 2 2 2 2 4 4 2 2 6 2 2 4 2 6 2 2 4 2 2 2 2 4 4 2 4 2 4 2 2 2 4 4 2 2 2 2 2 4 6 2 2 4 2 2 4 4 4 2 4 2 2 4 6 2 4 2 2 4 4 4 2 4 2 2 4 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 4 2 6 4 4 4 2 4 2 2 2 2 2 2...

output:

-1

result:

ok ok, n = 2000

Test #211:

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

input:

2000
2 2 2 6 2 4 2 2 4 4 4 4 2 2 4 6 2 2 6 2 6 2 6 4 2 2 2 6 4 2 2 4 2 4 2 6 6 2 8 2 4 2 2 2 2 2 4 2 4 2 2 4 2 2 4 2 2 2 2 2 2 4 2 4 2 2 2 4 2 2 2 6 4 2 2 4 2 2 2 2 2 6 2 4 2 2 4 6 4 2 4 4 2 2 4 2 4 2 4 2 2 2 2 4 2 6 4 4 4 4 4 2 4 4 4 2 6 2 4 4 2 2 2 4 2 6 2 4 2 2 2 2 2 2 4 4 2 6 2 4 2 4 2 4 2 6 2 4...

output:

2998
2 1 4
2 1 2
2 2 4
2 3 4
2 3 5
2 4 5
2 4 6
2 4 7
2 6 7
2 6 9
2 6 8
2 8 9
2 9 10
2 9 13
2 10 13
2 10 11
2 10 14
2 11 14
2 11 12
2 11 17
2 12 17
2 12 15
2 12 18
2 15 18
2 15 16
2 15 20
2 16 20
2 16 22
2 16 25
2 16 19
2 16 26
2 19 26
2 19 27
2 19 30
2 19 21
2 19 31
2 21 31
2 21 33
2 21 35
2 21 23
2...

result:

ok ok, n = 2000

Test #212:

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

input:

2000
4 4 2 2 6 4 2 6 2 2 2 2 2 2 4 4 2 2 2 4 4 2 4 4 4 2 2 2 2 4 2 2 2 2 4 4 6 2 4 2 2 2 4 2 2 2 6 2 6 2 2 4 6 4 2 2 2 4 4 4 4 2 2 4 2 4 4 2 6 2 2 4 4 4 4 2 4 4 6 2 8 2 2 4 2 4 2 4 4 2 2 2 2 4 2 4 4 2 2 4 4 2 2 2 4 4 2 2 2 2 2 2 2 4 2 2 2 2 4 2 4 2 2 2 4 2 4 4 2 2 6 6 2 4 6 2 4 2 4 4 2 2 2 2 4 2 4 2...

output:

-1

result:

ok ok, n = 2000

Test #213:

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

input:

2000
4 2 2 2 4 2 4 4 2 2 4 2 2 6 2 2 2 2 2 2 2 2 4 2 2 4 4 2 4 4 2 6 2 2 4 4 6 2 2 6 4 4 2 2 2 4 6 4 4 8 2 2 4 2 2 6 6 2 2 2 2 2 2 2 4 4 2 2 4 4 4 6 6 2 4 6 2 2 4 4 2 4 4 4 2 2 4 2 2 2 2 4 4 4 2 2 6 2 2 4 8 2 4 4 2 2 6 2 2 4 6 2 2 4 4 4 2 2 4 2 2 8 4 4 2 2 2 2 2 2 4 4 2 2 2 2 2 4 2 4 2 4 4 6 2 2 2 6...

output:

2998
2 1 2
2 1 3
2 1 5
2 1 4
2 2 3
2 4 5
2 5 7
2 5 6
2 6 7
2 7 8
2 7 9
2 8 9
2 8 11
2 8 10
2 10 11
2 11 14
2 11 12
2 12 14
2 13 14
2 13 15
2 14 15
2 14 23
2 14 16
2 16 23
2 17 26
2 17 18
2 18 26
2 19 27
2 19 20
2 20 27
2 21 29
2 21 22
2 22 29
2 23 30
2 23 24
2 24 30
2 25 32
2 25 26
2 26 32
2 27 32
2...

result:

ok ok, n = 2000

Test #214:

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

input:

2000
2 2 6 2 2 4 2 2 2 4 6 4 4 4 6 2 4 2 4 2 2 6 2 4 2 2 2 4 2 2 2 4 2 4 6 2 2 4 4 2 2 4 2 2 2 2 4 4 2 8 2 2 2 4 2 4 2 2 2 4 4 2 2 4 2 4 2 2 2 2 4 2 6 4 2 2 2 2 4 2 4 6 2 2 2 2 6 2 2 4 6 2 4 2 2 2 2 2 2 2 4 2 4 2 4 4 4 2 4 2 2 4 2 4 2 2 4 2 4 2 4 2 2 2 2 2 4 4 6 6 6 4 4 2 4 8 2 2 2 2 2 2 2 2 2 4 4 4...

output:

-1

result:

ok ok, n = 2000

Test #215:

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

input:

2000
2 2 2 2 6 4 2 2 4 2 4 2 4 4 4 2 2 2 2 4 6 6 4 4 4 2 4 2 4 2 4 4 2 2 2 2 4 2 4 2 2 6 2 2 2 6 4 6 4 6 2 6 2 2 4 4 4 2 2 2 2 2 2 2 2 2 2 4 2 2 4 2 2 2 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 2 2 4 4 4 4 2 4 2 4 2 2 2 4 4 2 2 2 2 4 4 2 2 2 4 4 2 2 4 4 2 2 2 4 2 2 2 2 2 4 2 2 2 2 2 2 2 2 6 4 2 4 2 8 4 4 2 4 2...

output:

2997
2 1 5
2 1 2
2 2 5
2 3 6
2 3 4
2 4 6
2 5 1890
2 5 1998
2 5 9
2 5 6
2 6 9
2 7 11
2 7 8
2 8 11
2 9 13
2 9 10
2 10 13
2 11 14
2 11 12
2 12 14
2 13 15
2 13 14
2 14 15
2 15 20
2 15 16
2 16 20
2 17 21
2 17 18
2 18 21
2 19 21
2 19 20
2 20 21
2 21 22
2 21 26
2 22 26
2 22 28
2 22 30
2 22 23
2 22 33
2 23 ...

result:

ok ok, n = 2000

Test #216:

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

input:

1999
6 4 4 2 2 2 2 4 2 2 2 2 6 4 4 2 4 4 2 2 6 2 4 4 6 2 6 2 2 6 4 4 2 2 4 2 4 2 4 4 2 4 4 2 2 2 2 2 2 2 2 2 2 4 2 2 4 4 2 4 2 2 4 2 2 8 2 2 4 2 4 2 6 4 2 4 2 2 6 2 4 6 2 2 2 4 4 2 4 4 2 2 4 2 2 4 4 2 2 2 2 4 2 2 4 2 4 8 2 4 2 4 4 2 2 6 2 4 2 2 4 2 4 2 2 2 2 2 2 2 4 4 2 2 2 2 2 2 2 4 2 4 2 6 4 2 4 2...

output:

-1

result:

ok ok, n = 1999

Test #217:

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

input:

1999
4 2 2 2 2 2 2 4 4 2 4 2 6 4 4 2 2 2 2 2 2 4 2 6 4 2 4 4 2 2 4 4 2 2 4 2 2 4 4 2 2 2 4 2 2 2 4 4 2 2 2 4 4 2 2 2 2 2 10 2 2 2 2 2 4 2 2 2 2 2 4 4 2 6 2 2 2 4 2 2 2 4 4 4 4 2 2 2 4 6 2 4 2 2 2 4 2 2 2 2 2 2 4 2 2 2 6 4 2 2 2 2 2 2 4 2 2 4 4 2 2 2 4 2 4 2 2 2 4 2 4 2 2 2 2 2 4 2 4 2 2 4 2 6 2 6 4 ...

output:

2997
2 1 2
2 1 3
2 1 8
2 1 4
2 2 3
2 4 8
2 5 9
2 5 6
2 6 9
2 7 11
2 7 8
2 8 11
2 9 13
2 9 10
2 10 13
2 11 13
2 11 12
2 12 13
2 13 14
2 13 16
2 14 16
2 14 15
2 14 17
2 15 17
2 15 22
2 15 18
2 18 22
2 19 24
2 19 20
2 20 24
2 21 24
2 21 22
2 22 24
2 23 25
2 23 24
2 24 25
2 25 27
2 25 26
2 26 27
2 27 28...

result:

ok ok, n = 1999

Test #218:

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

input:

1999
2 6 2 6 2 2 2 2 6 8 2 2 2 4 2 2 2 2 6 2 2 4 2 4 2 2 4 4 2 2 2 2 2 2 4 6 2 4 2 2 4 2 2 2 2 4 2 6 2 2 4 2 2 2 2 2 2 2 4 2 2 2 2 2 6 2 4 2 4 2 2 4 4 4 4 2 2 4 4 2 4 2 2 4 2 2 2 4 2 2 2 4 4 2 2 6 4 4 4 4 2 6 2 2 4 2 2 4 4 6 2 2 4 2 2 6 2 4 2 2 2 2 2 2 2 2 4 4 4 4 2 4 2 2 2 4 2 2 2 2 4 2 2 2 8 2 2 2...

output:

2996
2 1 2
2 1 3
2 2 3
2 2 5
2 2 6
2 2 4
2 2 7
2 4 7
2 4 8
2 4 11
2 4 9
2 4 12
2 5 6
2 8 11
2 9 12
2 9 13
2 9 15
2 9 10
2 9 16
2 10 16
2 10 17
2 10 18
2 10 20
2 10 21
2 10 14
2 10 23
2 13 15
2 14 23
2 14 19
2 14 25
2 17 18
2 19 25
2 19 26
2 19 29
2 19 22
2 19 30
2 20 21
2 22 30
2 22 24
2 22 31
2 24 ...

result:

ok ok, n = 1999

Test #219:

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

input:

1999
2 2 2 2 2 2 2 8 2 2 2 2 2 2 2 2 8 2 4 2 6 2 2 2 2 2 4 2 2 2 2 2 2 2 2 2 2 2 2 2 4 2 6 4 4 4 4 4 6 2 4 4 2 6 4 2 4 2 2 2 2 4 4 6 4 2 2 4 2 6 4 4 2 2 2 2 2 2 6 4 2 4 2 2 2 2 2 2 4 2 2 2 2 2 2 2 2 4 4 4 2 2 2 2 2 4 2 2 2 4 2 6 4 2 2 4 2 2 2 2 4 4 2 2 2 2 2 6 2 2 2 2 4 4 2 6 2 4 2 2 2 4 2 4 2 2 2 2...

output:

-1

result:

ok ok, n = 1999

Test #220:

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

input:

1999
2 2 2 2 2 2 4 2 4 2 2 4 8 4 6 2 2 6 2 4 2 6 4 2 2 2 6 2 6 4 2 2 4 2 2 2 2 2 2 6 4 2 4 4 4 4 4 4 2 2 6 4 2 4 2 4 4 2 2 2 2 2 2 4 4 2 2 4 2 6 6 4 2 2 6 4 2 6 2 2 2 2 2 4 4 2 6 2 2 4 4 2 2 4 4 4 2 6 4 2 2 4 2 2 4 2 2 2 2 4 2 2 4 2 6 2 6 2 2 2 4 2 2 4 2 6 4 4 2 2 4 8 2 4 2 2 4 4 4 6 6 2 2 6 8 6 2 4...

output:

2996
2 1 7
2 1 2
2 2 7
2 3 9
2 3 4
2 4 9
2 5 12
2 5 6
2 6 12
2 7 13
2 7 8
2 8 13
2 9 13
2 9 10
2 10 13
2 11 13
2 11 12
2 12 13
2 13 14
2 13 16
2 14 16
2 14 15
2 14 17
2 15 17
2 15 19
2 15 21
2 15 18
2 15 24
2 18 24
2 18 25
2 18 26
2 18 20
2 18 28
2 19 21
2 20 28
2 20 22
2 20 31
2 22 31
2 22 32
2 22 ...

result:

ok ok, n = 1999

Test #221:

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

input:

1999
2 2 2 4 4 8 2 4 2 4 2 4 4 4 4 2 2 2 4 2 4 4 2 2 2 2 2 2 2 4 2 2 2 2 4 2 4 4 8 8 2 2 6 2 2 2 2 2 2 2 2 2 2 4 2 2 2 2 2 4 6 2 2 2 4 2 4 4 6 4 2 4 2 4 2 4 2 2 4 2 2 4 4 2 4 2 2 2 2 2 2 4 2 2 6 4 4 4 2 2 2 2 4 2 6 2 2 2 4 2 2 2 2 2 4 2 2 4 2 2 2 4 2 2 6 2 4 2 2 2 2 4 2 4 2 4 2 4 2 2 6 2 2 4 4 6 2 2...

output:

-1

result:

ok ok, n = 1999

Test #222:

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

input:

1999
2 4 4 4 4 2 2 2 4 4 2 2 4 4 2 2 2 4 6 2 2 2 6 2 4 2 2 2 4 2 4 2 2 6 2 2 4 2 4 2 4 2 2 2 2 2 4 2 2 2 4 2 4 4 2 2 2 4 6 4 4 2 4 6 6 2 4 2 2 4 2 6 2 6 2 2 6 2 6 2 2 2 6 4 2 4 2 4 2 2 6 2 2 4 2 2 4 2 2 2 2 4 2 2 2 4 2 2 2 2 2 4 2 2 2 4 4 2 4 2 4 2 2 2 2 6 2 6 4 2 2 4 4 4 2 4 4 2 2 2 2 4 2 2 4 2 2 4...

output:

2996
2 1 2
2 1 6
2 2 6
2 2 3
2 2 7
2 3 7
2 3 4
2 3 8
2 4 8
2 4 5
2 4 11
2 5 11
2 5 9
2 5 12
2 9 12
2 9 10
2 9 15
2 10 15
2 10 13
2 10 16
2 13 16
2 13 14
2 13 17
2 14 17
2 14 18
2 14 20
2 18 20
2 18 19
2 18 21
2 19 21
2 19 22
2 19 24
2 19 23
2 19 26
2 22 24
2 23 26
2 23 27
2 23 28
2 23 25
2 23 30
2 2...

result:

ok ok, n = 1999

Test #223:

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

input:

1999
2 2 2 6 2 2 4 2 4 2 4 2 2 2 2 4 2 4 2 2 2 2 2 4 2 2 2 4 2 2 4 2 2 2 4 2 6 2 2 2 4 2 2 2 2 2 4 6 4 4 4 4 2 2 2 2 2 2 2 2 2 6 2 2 2 4 2 2 2 2 2 2 4 2 2 2 4 2 2 2 2 2 4 2 4 4 2 2 2 2 4 4 4 4 2 6 2 2 2 2 2 2 2 2 2 2 2 2 2 6 2 2 2 4 2 2 2 2 2 2 2 2 2 4 6 4 2 2 6 2 8 4 2 2 2 2 2 4 6 8 4 2 2 4 2 2 4 4...

output:

-1

result:

ok ok, n = 1999

Test #224:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

1999
4 6 4 2 2 4 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 4 4 2 2 2 2 2 2 4 4 6 2 4 6 2 2 2 2 2 2 6 2 6 4 2 2 4 6 2 2 2 2 2 2 6 2 2 4 4 2 4 8 8 2 2 4 4 2 2 6 2 4 2 4 6 2 6 2 4 2 6 2 2 4 2 4 2 2 6 2 4 6 2 2 2 2 2 4 4 4 2 2 2 4 2 2 4 2 2 6 2 2 6 4 2 2 2 2 2 2 2 2 6 2 4 2 4 2 4 2 2 2 2 4 2 4 2 2 4 2 4 2 4 2 2 2 6...

output:

2996
2 1 704
2 1 1881
2 1 2
2 1 4
2 2 4
2 2 5
2 2 7
2 2 3
2 2 8
2 3 8
2 3 6
2 3 9
2 5 7
2 6 9
2 6 15
2 6 10
2 10 15
2 11 22
2 11 12
2 12 22
2 13 23
2 13 14
2 14 23
2 15 30
2 15 16
2 16 30
2 17 31
2 17 18
2 18 31
2 19 32
2 19 20
2 20 32
2 21 32
2 21 22
2 22 32
2 23 34
2 23 24
2 24 34
2 25 35
2 25 26
...

result:

ok ok, n = 1999

Test #225:

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

input:

2000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 = 2000

Test #226:

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

input:

2000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

2000
2 1 1843
2 2 1843
2 3 1843
2 4 1843
2 5 1843
2 6 1843
2 7 1843
2 8 1843
2 9 1843
2 10 1843
2 11 1843
2 12 1843
2 13 1843
2 14 1843
2 15 1843
2 16 1843
2 17 1843
2 18 1843
2 19 1843
2 20 1843
2 21 1843
2 22 1843
2 23 1843
2 24 1843
2 25 1843
2 26 1843
2 27 1843
2 28 1843
2 29 1843
2 30 1843
2 31...

result:

ok ok, n = 2000

Test #227:

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

input:

2000
3 3 3 3 3 2 3 2 3 3 2 3 3 3 3 2 2 3 3 3 2 2 3 3 3 2 2 2 3 3 3 2 3 3 3 3 3 2 3 3 3 3 3 2 2 3 2 3 3 2 3 2 3 3 3 3 2 3 3 3 3 3 3 3 3 3 2 3 3 3 2 3 3 2 2 3 2 2 3 3 3 3 3 3 2 2 3 3 2 3 3 3 2 3 3 2 2 3 3 3 3 3 2 2 2 3 3 3 3 2 3 3 2 3 3 3 3 3 3 3 3 3 3 2 3 3 3 3 3 2 3 3 2 3 3 3 3 3 2 3 2 3 3 2 3 2 3 2...

output:

-1

result:

ok ok, n = 2000

Test #228:

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

input:

2000
2 3 2 3 2 3 3 2 2 3 2 2 2 3 3 2 2 3 3 3 3 3 2 3 3 2 3 3 3 3 3 3 2 3 2 2 3 3 3 3 3 3 3 3 2 3 3 3 2 3 3 2 3 3 3 3 3 2 3 2 2 3 3 2 3 3 3 3 3 2 3 2 3 2 3 3 2 3 2 3 3 3 3 2 2 3 3 3 3 3 3 2 3 3 2 2 3 2 3 3 2 3 3 3 3 3 3 2 3 3 2 3 3 3 3 3 3 3 2 3 2 3 3 3 3 3 3 3 3 3 2 2 2 3 3 2 2 3 3 3 3 3 3 2 2 2 3 2...

output:

2666
2 1 4
2 1 3
2 2 4
2 2 5
2 2 7
2 3 4
2 5 7
2 6 7
2 6 8
2 6 14
2 8 14
2 9 18
2 9 11
2 10 14
2 10 16
2 10 22
2 11 18
2 12 20
2 12 13
2 13 20
2 15 18
2 15 17
2 15 25
2 16 22
2 17 25
2 19 20
2 19 21
2 19 28
2 21 22
2 21 28
2 23 30
2 23 24
2 24 25
2 24 30
2 26 32
2 26 27
2 27 28
2 27 32
2 29 30
2 29 ...

result:

ok ok, n = 2000

Test #229:

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

input:

2000
3 7 1 1 3 3 5 3 3 3 5 1 1 5 3 1 3 3 1 1 3 1 3 1 3 1 3 1 3 1 3 3 1 1 5 7 1 1 3 3 5 3 3 1 3 3 5 3 1 1 3 1 1 3 1 3 1 5 1 3 3 3 1 1 3 1 5 1 1 1 1 5 1 1 3 3 5 1 7 5 3 3 7 5 3 1 3 5 1 3 3 1 7 3 1 1 1 1 1 1 1 5 1 1 1 1 5 3 1 1 3 3 3 3 1 1 1 1 1 1 3 1 1 5 1 3 9 7 1 3 5 1 1 3 1 5 1 5 1 3 3 1 7 1 1 1 5 3...

output:

-1

result:

ok ok, n = 2000

Test #230:

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

input:

2000
3 1 1 7 3 1 1 1 1 3 5 3 3 5 1 3 5 1 3 3 1 1 5 1 5 5 3 1 3 1 5 1 1 5 1 3 1 1 3 5 1 3 1 3 1 5 5 1 5 1 3 5 1 3 1 1 7 1 1 1 1 1 1 1 1 3 1 1 1 5 5 5 1 3 5 3 1 5 1 1 1 1 3 3 1 3 1 1 1 1 1 1 3 1 3 1 1 1 11 1 5 1 1 1 1 1 1 5 3 1 1 1 3 3 1 3 1 1 1 1 1 5 3 3 1 1 1 1 1 1 7 5 3 5 1 1 3 1 1 1 1 3 5 5 1 5 1 ...

output:

2498
2 1 2
2 1 4
2 1 5
2 3 4
2 4 5
2 4 10
2 4 12
2 4 11
2 4 13
2 5 6
2 7 10
2 8 11
2 9 12
2 10 12
2 11 13
2 11 14
2 11 16
2 13 15
2 14 18
2 14 16
2 14 17
2 14 19
2 16 21
2 17 22
2 17 19
2 17 23
2 17 20
2 19 24
2 20 28
2 20 23
2 23 30
2 23 25
2 23 27
2 25 32
2 25 27
2 25 26
2 25 29
2 26 33
2 26 29
2 ...

result:

ok ok, n = 2000

Test #231:

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

input:

1999
1 3 1 1 3 5 1 1 3 1 1 3 5 1 5 3 1 3 1 1 5 1 1 1 3 1 1 3 9 1 3 1 1 5 7 1 3 3 1 1 3 3 3 3 3 1 1 3 1 3 5 1 3 3 3 1 5 3 3 1 1 1 5 7 3 1 1 7 1 1 3 5 3 5 1 3 3 1 1 1 1 3 1 1 1 5 1 1 1 1 3 1 3 1 3 1 1 1 1 7 1 1 3 7 1 1 1 1 1 1 1 5 5 3 3 1 1 5 3 1 1 3 1 1 1 1 5 1 3 1 3 1 3 1 1 1 1 3 1 1 3 1 1 5 1 1 3 5...

output:

-1

result:

ok ok, n = 1999

Test #232:

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

input:

1999
1 1 1 3 7 3 1 1 3 1 5 1 1 1 3 7 1 1 7 1 1 1 5 3 1 3 5 3 1 3 3 3 1 5 1 5 1 1 1 3 1 7 1 5 3 3 3 3 3 1 3 1 3 1 1 1 3 3 1 1 1 3 3 1 5 3 3 1 1 1 1 1 1 1 1 1 1 1 3 5 3 1 5 3 1 1 5 1 1 1 3 1 1 5 1 7 1 1 1 5 3 5 5 1 5 1 1 1 1 3 3 1 3 1 1 3 5 3 3 3 1 1 3 1 1 1 1 5 3 1 5 1 1 5 3 1 1 3 1 1 1 1 5 7 1 5 1 3...

output:

2497
2 1 4
2 2 5
2 3 6
2 4 5
2 4 6
2 5 6
2 5 9
2 5 15
2 5 11
2 5 24
2 7 9
2 8 11
2 9 15
2 10 15
2 11 24
2 11 16
2 11 26
2 12 16
2 13 19
2 14 23
2 16 26
2 16 28
2 16 30
2 16 19
2 16 31
2 17 24
2 18 26
2 19 31
2 19 32
2 19 40
2 19 23
2 19 45
2 20 27
2 21 28
2 22 30
2 23 45
2 23 27
2 23 46
2 25 31
2 27...

result:

ok ok, n = 1999

Test #233:

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

input:

2000
4 2 1 2 4 1 2 7 4 5 2 1 2 4 2 2 2 1 2 4 2 1 2 2 2 2 5 2 2 4 4 2 5 1 5 4 5 2 4 6 4 2 1 2 4 5 2 4 2 1 5 1 2 6 3 2 2 2 2 2 3 2 4 6 2 6 4 1 2 4 4 2 1 1 2 1 2 4 1 4 2 4 4 2 1 2 2 4 2 1 1 2 4 2 5 1 1 2 5 1 1 4 2 1 2 4 1 2 2 4 4 1 3 6 2 2 1 4 2 2 6 1 2 3 7 6 1 2 4 1 4 4 3 1 1 1 4 2 2 2 1 2 1 2 1 4 5 5...

output:

-1

result:

ok ok, n = 2000

Test #234:

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

input:

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

output:

2798
2 1 993
2 1 994
2 1 257
2 1 2
2 2 257
2 3 999
2 3 263
2 3 4
2 4 988
2 4 989
2 4 263
2 5 941
2 5 942
2 5 943
2 5 944
2 5 952
2 5 955
2 5 265
2 5 6
2 6 925
2 6 928
2 6 930
2 6 933
2 6 265
2 7 916
2 7 917
2 7 920
2 7 921
2 7 271
2 7 8
2 8 271
2 9 273
2 9 10
2 10 273
2 11 274
2 11 12
2 12 907
2 12 ...

result:

ok ok, n = 2000

Test #235:

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

input:

2000
1 2 1 2 3 2 5 4 4 1 2 2 2 2 4 3 2 1 2 2 3 3 1 2 2 2 6 3 2 2 2 2 4 2 2 2 2 1 2 6 2 3 4 3 5 1 1 3 3 2 2 2 6 1 4 2 4 4 2 2 2 2 2 1 2 4 5 2 2 3 3 3 2 3 5 4 7 2 2 3 7 2 2 4 5 3 2 2 7 1 2 3 2 1 1 2 6 1 2 2 4 2 2 2 2 4 2 4 2 2 1 2 2 1 6 3 2 3 2 1 2 3 1 2 2 2 1 5 2 1 4 1 4 4 4 2 7 3 2 1 2 2 5 5 3 7 2 1...

output:

-1

result:

ok ok, n = 2000

Test #236:

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

input:

2000
1 6 3 2 4 1 3 6 1 2 1 2 4 3 1 6 3 1 6 1 6 2 2 3 3 3 2 2 2 2 2 4 1 2 5 4 4 2 2 4 2 2 4 2 3 2 2 5 6 2 2 2 2 2 4 4 3 3 4 2 4 4 3 2 1 1 2 2 2 4 1 6 5 1 4 4 2 4 2 4 6 5 4 4 4 4 2 2 2 2 2 4 3 2 1 2 2 2 2 2 3 3 2 7 4 3 4 2 3 3 4 7 1 2 2 2 3 4 2 7 2 2 1 2 2 3 4 2 2 4 3 1 2 2 4 2 5 3 2 3 3 2 3 2 2 2 1 1...

output:

2848
2 1 977
2 2 4
2 2 10
2 2 12
2 2 22
2 2 5
2 2 23
2 3 7
2 3 28
2 3 8
2 4 10
2 5 23
2 5 7
2 5 27
2 6 979
2 7 27
2 8 28
2 8 29
2 8 30
2 8 13
2 8 31
2 9 984
2 11 987
2 12 22
2 13 31
2 13 16
2 13 34
2 14 17
2 14 42
2 14 19
2 15 993
2 16 34
2 16 38
2 16 39
2 16 17
2 16 41
2 17 41
2 18 994
2 19 42
2 19...

result:

ok ok, n = 2000

Test #237:

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

input:

1801
4 7 4 6 6 4 6 1 4 4 8 3 10 2 12 7 6 4 5 6 1 4 6 16 5 4 1 8 10 2 8 4 2 1 6 2 4 6 10 2 4 2 4 1 6 6 2 6 6 5 2 6 9 6 1 4 8 9 2 4 4 11 4 2 7 7 4 3 6 2 9 1 12 10 4 8 5 9 4 6 4 5 11 10 5 2 6 1 6 18 4 4 2 5 4 8 1 2 7 1 5 4 1 6 4 4 1 4 2 2 2 2 15 6 4 4 6 6 3 6 2 2 8 6 8 8 6 8 4 1 6 5 1 4 1 6 2 4 2 12 7 ...

output:

-1

result:

ok ok, n = 1801

Test #238:

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

input:

1959
1 1 10 12 12 1 13 8 1 1 1 9 1 1 2 1 1 1 13 9 1 8 1 1 4 6 1 1 13 1 6 1 5 1 7 1 1 5 6 1 1 1 1 1 6 4 1 8 1 1 1 7 1 1 1 9 1 9 1 4 8 7 6 8 1 1 4 8 1 1 5 15 1 1 5 1 10 1 1 1 1 4 1 8 7 1 1 1 13 1 1 1 1 4 4 5 1 6 1 8 1 1 1 1 1 1 1 1 8 1 10 6 1 1 1 1 1 1 1 1 1 4 8 1 1 1 1 15 10 7 12 1 1 14 1 1 1 1 9 1 1...

output:

-1

result:

ok ok, n = 1959

Test #239:

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

input:

1993
2 1 1 4 2 2 1 2 1 1 4 1 1 3 2 1 1 3 2 2 1 1 3 1 2 4 2 2 2 1 2 3 1 2 1 2 1 1 1 2 1 2 3 3 1 1 2 2 3 3 3 2 3 2 1 3 2 1 1 2 1 2 2 1 2 1 2 1 1 3 2 1 1 2 2 2 2 2 4 2 2 2 1 2 3 3 2 2 2 3 3 2 2 4 4 2 2 2 3 2 3 2 2 2 4 2 2 2 1 2 3 1 3 1 1 2 2 2 2 2 2 3 1 1 2 2 5 2 3 1 1 2 2 2 2 2 1 3 2 2 2 2 2 2 2 4 2 2...

output:

2198
2 1 785
2 1 4
2 2 758
2 3 758
2 4 770
2 4 773
2 4 785
2 5 794
2 5 6
2 6 794
2 7 756
2 8 795
2 8 11
2 9 756
2 10 754
2 11 765
2 11 767
2 11 795
2 12 754
2 13 747
2 14 782
2 14 806
2 14 15
2 15 806
2 16 747
2 17 740
2 18 786
2 18 815
2 18 19
2 19 815
2 20 817
2 20 23
2 21 740
2 22 740
2 23 791
2 ...

result:

ok ok, n = 1993

Test #240:

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

input:

1946
2 1 1 1 12 8 4 1 4 2 9 10 1 9 1 1 2 2 2 1 1 2 1 1 4 4 1 1 1 1 1 1 1 1 5 1 2 1 1 1 1 4 6 1 1 4 1 8 4 2 2 2 1 1 3 4 2 4 4 1 4 1 1 1 1 1 4 4 1 1 1 5 1 1 1 1 1 2 6 1 2 6 1 1 6 1 1 1 6 1 1 1 2 4 4 1 8 1 8 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 8 8 8 1 2 1 4 1 1 10 1 1 10 1 4 6 1 9 1 6 1 1 6 1...

output:

-1

result:

ok ok, n = 1946

Test #241:

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

input:

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

output:

-1

result:

ok ok, n = 1933

Test #242:

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

input:

1934
2 2 1 1 4 1 1 4 1 2 6 1 1 10 2 6 2 4 1 1 1 2 4 6 6 1 1 1 1 4 1 1 6 6 4 6 1 2 10 1 6 4 1 9 1 1 6 6 2 4 1 2 4 6 2 4 4 1 2 1 4 4 1 6 1 2 4 1 4 1 4 1 7 1 2 1 2 2 1 5 1 1 6 1 4 1 1 6 1 4 1 2 1 1 1 1 1 1 1 1 2 4 14 2 1 10 4 1 1 1 4 1 4 2 1 2 1 1 10 6 6 2 1 6 2 8 2 1 1 1 1 1 1 4 1 1 4 1 4 4 1 1 6 6 1 ...

output:

-1

result:

ok ok, n = 1934

Test #243:

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

input:

1985
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 12 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 1 1 10 15 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 8 1 18 1 1 1 1 1 1 1 1 1 8 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 18 3 9 1 1 1 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 = 1985

Test #244:

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

input:

1991
1 8 1 9 1 1 8 1 1 1 1 9 1 1 1 1 1 1 1 1 5 1 1 6 4 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 9 6 1 1 1 1 1 6 1 1 1 1 6 1 1 1 1 1 1 4 1 1 1 1 6 1 1 1 9 1 1 1 1 1 4 1 1 1 6 1 1 1 1 1 4 1 9 1 1 6 1 1 1 1 1 1 1 1 13 1 8 1 1 1 7 1 5 1 1 1 1 1 10 2 1 1 1 4 1 1 1 6 6 2 4 7 1 1 4 6 1 1 1 1 1 10 1 1 1 1 8 7 7 1 1 ...

output:

-1

result:

ok ok, n = 1991

Test #245:

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

input:

1953
2 5 3 4 1 3 3 3 5 3 2 4 2 2 3 3 3 5 3 3 3 3 2 3 3 1 3 3 2 4 3 3 2 4 3 3 3 3 2 2 2 2 3 2 3 2 2 2 2 4 3 4 3 1 1 5 3 3 5 3 3 3 3 3 3 2 2 3 2 3 2 3 2 2 1 3 3 3 2 1 3 3 3 3 3 2 3 3 2 2 2 3 3 3 3 2 5 4 3 3 3 5 2 2 5 3 3 2 1 3 2 2 3 5 3 3 2 2 4 1 2 2 2 3 3 2 5 2 3 4 3 2 2 3 3 2 3 5 2 3 3 2 2 2 3 2 3 2...

output:

-1

result:

ok ok, n = 1953

Test #246:

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

input:

1998
4 1 1 1 1 1 4 12 9 4 1 1 1 4 1 1 1 1 4 1 1 1 4 1 1 1 6 1 1 6 4 1 1 6 1 1 1 6 6 4 6 14 1 1 2 1 3 1 1 1 1 12 2 4 1 1 9 1 4 2 1 4 1 1 1 4 1 1 8 1 1 6 4 1 1 10 4 13 1 1 6 1 6 2 1 6 1 1 1 1 1 1 13 4 1 1 4 4 1 1 8 2 1 6 1 10 2 1 1 1 2 1 1 1 1 1 9 10 1 1 1 1 4 4 6 4 1 6 1 4 1 1 6 2 1 4 4 7 2 1 1 1 6 4...

output:

-1

result:

ok ok, n = 1998

Test #247:

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

input:

1994
1 11 1 7 5 1 1 1 1 1 1 1 1 1 1 1 3 9 1 1 11 1 7 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 5 1 1 1 1 1 1 1 13 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 5 1 5 5 1 1 1 1 1 3 1 1 1 3 1 5 5 1 1 1 3 1 9 1 1 7 1 1 1 1 1 1 1 1 1 1 6 1 1 1 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 7 1 13 9 1 1 ...

output:

-1

result:

ok ok, n = 1994

Test #248:

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

input:

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

output:

-1

result:

ok ok, n = 1970

Test #249:

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

input:

1991
2 1 3 3 7 5 1 3 1 1 1 7 2 7 1 5 1 1 7 3 5 4 1 1 1 3 1 7 1 1 2 2 5 1 2 1 1 1 3 1 2 5 3 1 5 4 2 3 1 1 2 3 5 2 4 1 2 5 1 1 3 1 2 1 3 3 1 1 1 4 1 5 1 3 5 5 7 3 6 1 1 4 5 4 9 1 5 4 1 1 1 2 1 1 1 2 3 1 1 1 1 1 1 3 3 3 2 1 1 5 2 5 1 1 5 1 1 2 3 4 5 1 2 2 2 1 2 2 4 1 1 1 5 7 4 3 1 4 3 1 2 3 5 5 1 3 1 1...

output:

2464
2 1 254
2 1 3
2 2 252
2 3 476
2 3 254
2 4 478
2 4 258
2 4 5
2 5 463
2 5 464
2 5 465
2 5 470
2 5 480
2 5 258
2 6 459
2 6 462
2 6 482
2 6 258
2 6 8
2 7 252
2 8 483
2 8 258
2 9 252
2 10 252
2 11 251
2 12 455
2 12 456
2 12 457
2 12 458
2 12 484
2 12 263
2 12 13
2 13 263
2 14 448
2 14 449
2 14 451
2...

result:

ok ok, n = 1991

Test #250:

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

input:

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

output:

-1

result:

ok ok, n = 1991

Test #251:

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

input:

1965
1 1 1 4 1 1 1 1 1 6 1 1 1 7 1 1 1 6 1 1 2 1 1 1 1 1 1 5 1 7 7 1 1 1 4 1 2 1 1 1 4 1 11 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 7 1 1 1 1 1 1 10 1 6 1 1 1 1 1 1 1 1 1 1 1 1 9 1 1 1 1 1 7 1 1 1 7 1 1 1 1 1 1 1 1 1 1 5 4 1 1 1 7 1 6 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 4 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 5 3 1 1...

output:

1994
2 1 1858
2 2 1858
2 3 1849
2 4 1742
2 4 1744
2 4 1858
2 4 10
2 5 1849
2 6 1844
2 7 1844
2 8 1841
2 9 1841
2 10 1737
2 10 1738
2 10 1740
2 10 1741
2 10 1858
2 11 1841
2 12 1841
2 13 1824
2 14 1733
2 14 1734
2 14 1735
2 14 1736
2 14 1745
2 14 1859
2 14 18
2 15 1824
2 16 1824
2 17 1824
2 18 1728
2...

result:

ok ok, n = 1965

Test #252:

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

input:

1995
3 1 3 2 3 2 2 3 3 3 4 3 3 2 5 2 3 3 4 2 2 3 2 3 3 2 3 1 3 2 2 3 3 3 7 4 5 2 5 3 2 5 4 2 3 3 2 4 3 3 3 2 2 5 1 2 2 3 4 3 3 2 3 3 1 3 3 3 3 3 3 3 3 1 3 2 1 3 5 3 3 1 5 3 3 3 3 3 1 2 2 3 3 5 4 4 3 3 3 5 3 3 3 5 3 3 1 1 4 2 2 2 3 4 3 3 1 3 3 3 3 3 3 2 1 3 3 3 1 3 3 4 5 5 3 3 5 2 3 3 2 3 1 3 2 7 3 5...

output:

-1

result:

ok ok, n = 1995

Test #253:

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

input:

1974
4 4 4 1 2 4 2 1 1 1 2 1 2 1 4 1 4 6 1 2 1 1 1 1 1 8 4 2 2 2 1 2 4 4 2 6 2 1 1 1 1 4 1 4 1 4 2 1 4 1 2 4 4 4 1 12 2 6 2 1 4 1 8 2 1 1 1 4 4 2 1 4 4 1 1 1 1 4 2 4 2 1 1 1 1 6 1 2 6 1 2 1 1 4 1 2 1 2 2 2 2 2 4 1 2 1 2 2 2 2 1 2 1 1 4 1 2 1 4 2 1 6 1 1 2 1 2 1 2 4 1 2 2 2 2 6 2 4 2 2 1 1 4 1 2 1 4 ...

output:

2420
2 1 1936
2 1 1937
2 1 954
2 1 2
2 2 1933
2 2 1935
2 2 954
2 3 1928
2 3 1931
2 3 955
2 3 5
2 4 946
2 5 955
2 6 1923
2 6 1926
2 6 955
2 6 7
2 7 955
2 8 946
2 9 941
2 10 941
2 11 960
2 11 13
2 12 940
2 13 960
2 14 940
2 15 1921
2 15 1922
2 15 960
2 15 17
2 16 939
2 17 1907
2 17 1918
2 17 960
2 18 ...

result:

ok ok, n = 1974

Test #254:

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

input:

1990
1 2 3 3 1 1 3 1 3 3 1 7 5 9 5 5 1 1 1 1 1 1 3 1 3 5 3 5 1 1 5 3 1 1 1 1 3 2 7 1 7 1 1 3 1 3 1 1 1 3 1 1 3 1 5 2 2 1 5 6 3 3 1 3 3 6 1 1 3 1 1 5 3 3 5 1 1 1 1 1 3 3 5 5 1 1 1 1 1 1 3 3 5 1 5 1 5 3 5 2 1 1 5 1 1 2 3 1 1 1 1 1 5 1 5 1 1 2 3 1 5 2 1 1 3 7 1 1 5 1 1 1 1 1 1 3 1 5 1 6 1 1 3 3 5 1 3 9...

output:

2355
2 1 486
2 2 489
2 2 3
2 3 476
2 3 489
2 4 477
2 4 490
2 4 7
2 5 486
2 6 486
2 7 483
2 7 490
2 8 486
2 9 484
2 9 510
2 9 10
2 10 485
2 10 510
2 11 482
2 12 465
2 12 468
2 12 469
2 12 473
2 12 487
2 12 531
2 12 13
2 13 458
2 13 462
2 13 488
2 13 531
2 14 450
2 14 451
2 14 453
2 14 454
2 14 455
2 ...

result:

ok ok, n = 1990

Test #255:

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

input:

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

output:

-1

result:

ok ok, n = 1999

Test #256:

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

input:

1996
3 3 3 3 3 1 1 1 1 1 3 3 1 1 3 3 1 3 1 1 5 2 1 3 1 1 3 3 3 4 3 3 3 3 3 1 2 3 2 3 3 1 1 1 1 3 3 1 1 3 3 3 2 1 3 3 1 3 3 1 3 1 3 1 1 1 3 3 1 1 1 1 1 3 3 3 3 3 1 1 1 3 1 2 1 1 5 1 1 3 3 1 3 3 1 1 5 3 1 3 3 2 3 3 4 1 3 4 1 5 7 1 3 3 1 1 3 2 3 3 1 1 1 1 1 3 1 3 1 3 1 3 3 1 3 3 1 3 3 3 3 1 1 3 3 5 1 1...

output:

2309
2 1 2
2 1 39
2 1 4
2 2 22
2 2 37
2 3 4
2 3 53
2 3 11
2 4 39
2 5 11
2 5 84
2 5 15
2 6 358
2 7 359
2 8 360
2 9 361
2 10 362
2 11 53
2 12 15
2 12 102
2 12 18
2 13 363
2 14 365
2 15 84
2 16 18
2 16 118
2 16 24
2 17 366
2 18 102
2 19 367
2 20 369
2 21 24
2 21 168
2 21 28
2 21 167
2 21 164
2 22 37
2 ...

result:

ok ok, n = 1996

Test #257:

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

input:

2000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

2998
2 1 850
2 1 2
2 2 850
2 3 850
2 3 4
2 4 850
2 5 850
2 5 6
2 6 850
2 7 850
2 7 8
2 8 850
2 9 850
2 9 10
2 10 850
2 11 850
2 11 12
2 12 850
2 13 850
2 13 14
2 14 850
2 15 850
2 15 16
2 16 850
2 17 850
2 17 18
2 18 850
2 19 850
2 19 20
2 20 850
2 21 850
2 21 22
2 22 850
2 23 850
2 23 24
2 24 850
2...

result:

ok ok, n = 2000

Test #258:

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

input:

2000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

2998
2 1 1913
2 1 2
2 2 1913
2 3 1581
2 3 4
2 4 1581
2 5 1581
2 5 6
2 6 1581
2 7 1581
2 7 8
2 8 1581
2 9 1581
2 9 10
2 10 1581
2 11 1581
2 11 12
2 12 1581
2 13 1581
2 13 14
2 14 1581
2 15 1581
2 15 16
2 16 1581
2 17 1581
2 17 18
2 18 1581
2 19 1581
2 19 20
2 20 1581
2 21 1581
2 21 22
2 22 1581
2 23 ...

result:

ok ok, n = 2000

Test #259:

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

input:

2000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

2998
2 1 1650
2 1 2
2 2 1650
2 3 1650
2 3 4
2 4 1650
2 5 1650
2 5 6
2 6 1650
2 7 1650
2 7 8
2 8 1650
2 9 1650
2 9 10
2 10 1650
2 11 1650
2 11 12
2 12 1650
2 13 1650
2 13 14
2 14 1650
2 15 1650
2 15 16
2 16 1650
2 17 1650
2 17 18
2 18 1650
2 19 1650
2 19 20
2 20 1650
2 21 1650
2 21 22
2 22 1650
2 23 ...

result:

ok ok, n = 2000

Test #260:

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

input:

2000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

2998
2 1 191
2 1 2
2 2 191
2 3 191
2 3 4
2 4 191
2 5 191
2 5 6
2 6 191
2 7 191
2 7 8
2 8 191
2 9 191
2 9 10
2 10 191
2 11 191
2 11 12
2 12 191
2 13 191
2 13 14
2 14 191
2 15 191
2 15 16
2 16 191
2 17 191
2 17 18
2 18 191
2 19 191
2 19 20
2 20 191
2 21 191
2 21 22
2 22 191
2 23 191
2 23 24
2 24 191
2...

result:

ok ok, n = 2000

Test #261:

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

input:

2000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

-1

result:

ok ok, n = 2000