QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#112817#6537. One, Two, ThreeflowerAC ✓87ms24332kbC++142.5kb2023-06-13 22:03:102023-06-13 22:03:14

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 7496kb

input:

6
3 1 2 2 3 1

output:

2
0 3 5
1 2 4

result:

ok count=2

Test #2:

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

input:

6
2 1 3 1 3 2

output:

0

result:

ok count=0

Test #3:

score: 0
Accepted
time: 3ms
memory: 7584kb

input:

3000
1 1 1 1 1 3 1 1 3 3 1 3 1 1 2 3 1 1 2 1 2 1 3 3 3 1 1 2 1 2 2 3 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 3 3 1 1 2 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 2 3 1 1 1 1 3 3 2 1 3 1 1 2 3 1 2 3 1 1 1 2 1 1 1 1 2 3 2 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 3 1 3 3 1 1 1 1 3 1 1 2 1 1 1 3 3 1 1 1 1 2 1 1 1 1 1 2 3 3 1...

output:

499
3 27 2420
5 30 2424
6 39 2425
7 46 2426
8 51 2428
9 54 2429
11 67 2432
15 84 2435
17 92 2437
23 113 2443
24 128 2444
31 162 2448
34 176 2451
35 181 2452
36 188 2453
48 249 2463
58 281 2472
62 291 2475
63 296 2476
65 311 2478
68 314 2480
72 332 2486
77 377 2491
78 381 2492
81 387 2494
85 409 2497...

result:

ok count=499

Test #4:

score: 0
Accepted
time: 3ms
memory: 7616kb

input:

3000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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
0 1374 2901

result:

ok count=1

Test #5:

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

input:

3000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
1755 1756 2819

result:

ok count=1

Test #6:

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

input:

1500
1 1 1 2 1 1 1 2 2 2 2 2 1 1 3 1 2 2 3 1 2 2 2 2 1 2 1 2 1 1 3 1 2 2 2 2 1 1 3 1 1 2 2 3 2 1 3 1 1 2 2 2 1 2 2 2 2 2 1 2 3 2 3 2 3 2 1 3 2 1 2 3 2 2 3 2 3 1 1 3 1 3 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 1 1 1 3 1 3 1 3 3 1 1 1 3 1 1 3 1 1 1 1 1 3 3 3 3 1 3 1 1 1 1 3 3 3 3 3 3 1 3 1 1 1 3 1 3 1 1 1 1 3 1...

output:

500
1 7 542
4 9 544
5 10 545
12 16 547
14 20 549
15 21 550
18 22 551
26 27 554
31 35 558
36 41 559
38 44 561
40 50 563
58 59 570
60 61 571
62 63 572
69 72 577
71 73 578
74 75 579
77 450 581
78 490 582
80 583 601
83 586 604
84 587 605
85 588 606
86 589 607
89 592 610
90 593 611
94 597 615
96 600 617
...

result:

ok count=500

Test #7:

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

input:

3000
3 1 1 1 1 3 3 2 1 1 1 2 3 1 3 3 3 3 1 1 3 1 3 3 1 1 1 1 1 3 3 1 1 1 1 3 1 3 1 1 3 3 3 3 1 3 1 3 1 3 1 3 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 3 1 1 1 1 3 1 1 1 3 3 1 2 3 3 1 3 3 3 3 3 3 3 1 1 1 1 3 1 3 1 3 3 3 3 1 3 1 1 3 3 1 1 1 3 3 1 3 3 1 3 1 3 1 3 2 3 1 3 1 1 3 1 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2...

output:

1000
0 7 1887
1 11 1888
3 122 1890
8 141 1894
9 142 1895
21 153 1907
22 154 1908
23 155 1909
25 157 1911
27 159 1913
29 161 1915
31 163 1917
33 165 1919
34 166 1920
36 168 1922
37 169 1923
41 173 1927
42 174 1928
43 175 1929
46 178 1932
47 179 1933
51 183 1937
53 185 1939
55 187 1941
58 190 1944
61 ...

result:

ok count=1000

Test #8:

score: 0
Accepted
time: 4ms
memory: 7664kb

input:

3000
1 3 1 1 3 1 1 1 1 3 1 1 3 1 1 1 3 3 3 3 3 1 1 3 1 1 3 1 3 3 1 2 2 3 1 3 3 3 1 3 3 2 3 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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 3 3 3 1 1 1 1 3 1 1 1 3 1 1 1 1 1 3 3 3 3 3 1 3 3 3 1 1 1 3 1 1 3 1 1 3 1 3 3 3 1 1 1 3 3 3 3 3 1 1 1...

output:

1000
0 31 1618
1 32 1619
2 41 1620
4 52 1622
7 55 1625
8 56 1626
9 57 1627
10 58 1628
11 59 1629
12 60 1630
13 61 1631
14 62 1632
15 63 1633
18 66 1636
20 68 1638
26 74 1644
28 76 1646
33 79 1649
39 85 1655
40 86 1656
43 88 1658
45 90 1660
46 91 1661
47 92 1662
48 93 1663
49 94 1665
50 95 1666
96 18...

result:

ok count=1000

Test #9:

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

input:

2997
3 1 2 2 1 1 1 1 1 1 3 1 3 3 1 3 3 3 1 3 1 2 1 1 3 1 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 3 1 1 3 1 3 1 1 3 3 1 3 1 3 3 3 1 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 1 3 1 1 1 1 1 3 3 3 1 3 1 1 3 3 3 1 3 3 1 1 1 3 1 1 3 1 1 3 2 3 3 3 2 3 2 3 1 2 1 1 3 1 1 3 2 2 2 2...

output:

999
0 2 1215
6 27 1219
8 31 1221
11 34 1224
13 36 1226
14 37 1227
15 38 1228
18 41 1231
19 42 1232
22 44 1234
23 45 1235
25 47 1237
51 74 1241
55 78 1245
56 79 1246
59 82 1249
60 83 1250
62 85 1252
63 86 1253
64 87 1254
65 88 1255
66 89 1256
69 92 1259
70 93 1260
71 94 1261
72 95 1262
96 128 1263
97...

result:

ok count=999

Test #10:

score: 0
Accepted
time: 4ms
memory: 7616kb

input:

2994
1 1 2 1 2 1 2 2 3 1 3 3 3 3 1 3 1 1 2 3 3 1 3 3 3 3 1 1 1 3 3 2 3 1 3 1 3 3 1 2 3 1 3 3 3 1 3 1 3 2 3 2 1 1 3 1 1 1 3 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 3 1 1 2 3 3 3 3 3 3 1 3 1 3 1 1 2 1 3 3 3 2 2 3 2 1 3 3 3 1 2 1 1 2 3 3 1 3 2 2 2 2 2 2 2 2...

output:

998
0 2 1925
3 6 1927
5 7 1928
9 31 1930
13 59 1934
16 63 1937
20 66 1940
21 67 1941
22 68 1942
23 69 1943
32 77 1951
33 78 1952
34 79 1953
35 80 1954
36 81 1955
38 83 1957
40 84 1958
41 85 1959
44 88 1962
45 89 1963
46 90 1964
47 91 1965
50 93 1967
55 97 1971
57 99 1973
102 105 1976
108 132 1981
11...

result:

ok count=998

Test #11:

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

input:

3000
1 1 1 3 2 3 2 3 1 1 1 1 2 3 1 2 1 2 1 3 3 2 2 3 3 2 3 2 2 3 3 3 3 3 1 3 2 1 2 3 2 3 3 3 2 1 3 3 3 2 1 1 1 1 2 1 3 1 3 2 2 2 1 2 3 3 3 2 1 3 1 3 2 3 1 3 2 3 3 1 2 1 2 2 3 1 3 2 2 1 1 2 3 1 1 3 1 3 2 2 3 2 2 1 3 2 2 2 3 3 2 3 1 2 2 1 1 1 2 3 2 1 3 2 1 1 1 3 3 1 3 1 3 2 2 1 1 1 1 2 1 2 3 1 2 1 2 2...

output:

1000
1 6 1501
7 21 1507
8 22 1508
9 25 1509
10 27 1510
13 36 1513
18 44 1517
19 49 1519
26 61 1526
29 63 1527
31 72 1530
37 87 1537
39 88 1538
46 102 1551
47 105 1553
51 110 1558
56 120 1563
57 123 1564
58 133 1565
62 134 1566
74 156 1578
75 161 1580
77 165 1581
84 181 1585
85 183 1586
89 190 1590
9...

result:

ok count=1000

Test #12:

score: 0
Accepted
time: 3ms
memory: 7724kb

input:

3000
2 2 1 3 2 2 2 3 2 2 2 2 2 1 2 2 2 2 2 1 3 2 2 2 2 3 2 2 2 2 2 2 1 3 2 2 2 2 2 2 2 2 2 2 1 3 2 2 2 1 2 3 2 3 1 2 2 3 2 3 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 3 2 2 1 2 3 2 1 3 3 2 3 2 2 2 3 1 2 2 2 2 1 2 3 3 1 2 1 1 2 2 2 1 2 2 2 2 2 2 1 2 3 1 2 1 2 2 3 2 2 2 2 2 2 2 2 2 3 1 2 2 2 2 3 2 3 3 1 2 2 1 2...

output:

673
2 4 1672
3 5 1673
13 14 1675
32 34 1679
33 35 1680
45 47 1682
49 50 1683
51 52 1684
53 55 1685
57 58 1687
59 60 1688
73 74 1690
79 80 1692
83 86 1694
85 89 1696
87 90 1697
97 98 1700
100 105 1702
101 106 1703
103 107 1704
104 109 1705
108 110 1706
117 119 1708
118 121 1709
123 124 1711
134 136 1...

result:

ok count=673

Test #13:

score: 0
Accepted
time: 3ms
memory: 7704kb

input:

2999
2 2 3 3 2 1 2 1 1 2 2 3 2 3 2 3 2 2 2 1 2 3 2 2 2 2 1 3 2 3 3 2 1 2 3 2 2 2 2 1 2 2 2 2 2 3 2 2 3 1 2 2 2 3 2 2 2 3 3 2 2 2 3 3 3 2 1 1 2 2 2 1 2 2 1 1 2 2 2 2 2 1 2 2 2 3 2 2 3 3 3 1 1 2 2 3 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 3 3 1 1 2 2 2 2 1 1 2 2 3 2 3 2 3 2 2 2 3 2 2 2 1 2 1 3 2 3 2 2 2 1...

output:

683
3 6 1645
5 9 1646
7 10 1647
11 14 1649
19 20 1652
26 28 1654
27 31 1655
30 35 1657
32 36 1658
39 40 1660
45 46 1661
49 51 1663
57 59 1665
58 60 1666
66 70 1670
67 72 1671
74 76 1673
75 77 1674
81 82 1675
85 86 1676
92 98 1681
95 100 1682
99 101 1683
108 109 1684
112 113 1685
114 118 1686
115 119...

result:

ok count=683

Test #14:

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

input:

2998
2 1 2 1 3 2 2 2 2 2 2 2 1 2 2 2 2 3 3 2 1 2 1 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 3 1 3 2 2 1 2 2 2 3 2 2 2 2 1 2 2 1 2 2 2 2 2 2 2 2 3 2 1 2 3 2 2 3 3 2 2 2 2 1 2 1 2 2 2 2 3 2 3 3 3 1 2 2 2 2 2 3 2 2 2 1 2 2 2 2 2 2 2 3 2 2 3 3 2 1 1 2 2 3 3 2 1 2 2 2 2 2 2 2 2 3 2 1 2 1 2 2 3 1 2 3 2 2 2 2...

output:

629
3 5 1683
4 6 1684
18 21 1687
20 23 1688
42 46 1693
47 50 1696
68 69 1700
76 78 1704
92 96 1710
99 100 1712
115 119 1716
117 120 1717
118 123 1718
122 126 1720
135 136 1723
137 138 1724
140 142 1725
143 145 1727
153 155 1729
154 156 1730
158 159 1731
167 169 1733
168 170 1734
174 175 1735
176 177...

result:

ok count=629

Test #15:

score: 0
Accepted
time: 3ms
memory: 7628kb

input:

2997
1 1 3 2 3 3 2 2 1 2 2 2 2 2 2 1 3 3 2 2 2 3 2 2 2 2 3 2 1 3 2 3 2 3 2 3 3 2 2 2 2 2 2 2 1 1 2 2 3 3 2 1 2 2 3 3 2 2 1 1 1 2 1 2 1 2 2 1 2 1 3 1 3 3 1 2 2 2 2 2 2 1 2 2 2 3 2 2 3 2 2 1 2 2 3 2 1 2 2 2 3 2 2 1 3 1 2 2 2 1 3 2 2 1 2 3 2 3 1 3 2 2 3 2 2 2 2 1 2 2 2 1 1 2 3 2 2 2 3 2 3 1 2 2 3 2 2 2...

output:

712
0 3 1641
17 20 1649
21 22 1650
26 27 1651
28 30 1652
31 34 1654
35 38 1656
36 39 1657
44 46 1658
45 47 1659
51 53 1662
54 56 1663
58 61 1665
60 65 1667
62 66 1668
64 68 1669
71 78 1673
73 80 1675
74 82 1676
81 83 1677
91 92 1680
96 97 1682
103 106 1684
104 107 1685
113 114 1689
119 123 1693
122 ...

result:

ok count=712

Test #16:

score: 0
Accepted
time: 3ms
memory: 7620kb

input:

3000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

1000
0 1000 2000
1 1001 2001
2 1002 2002
3 1003 2003
4 1004 2004
5 1005 2005
6 1006 2006
7 1007 2007
8 1008 2008
9 1009 2009
10 1010 2010
11 1011 2011
12 1012 2012
13 1013 2013
14 1014 2014
15 1015 2015
16 1016 2016
17 1017 2017
18 1018 2018
19 1019 2019
20 1020 2020
21 1021 2021
22 1022 2022
23 102...

result:

ok count=1000

Test #17:

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

input:

3000
1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
0 2 2999

result:

ok count=1

Test #18:

score: 0
Accepted
time: 3ms
memory: 7540kb

input:

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

output:

3
1 3 4
10 11 13
2 6 9

result:

ok count=3

Test #19:

score: 0
Accepted
time: 3ms
memory: 7528kb

input:

18
3 3 3 1 1 3 2 2 1 2 1 2 3 2 2 1 3 1

output:

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

result:

ok count=6

Test #20:

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

input:

16
1 3 3 2 1 3 1 2 2 2 3 1 3 2 1 2

output:

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

result:

ok count=5

Test #21:

score: 0
Accepted
time: 3ms
memory: 7528kb

input:

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

output:

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

result:

ok count=5

Test #22:

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

input:

18
1 3 1 3 2 1 1 3 2 2 2 3 2 3 2 1 1 3

output:

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

result:

ok count=6

Test #23:

score: 0
Accepted
time: 3ms
memory: 7588kb

input:

18
1 3 3 2 1 1 1 2 3 2 1 1 2 3 2 3 2 3

output:

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

result:

ok count=6

Test #24:

score: 0
Accepted
time: 3ms
memory: 7632kb

input:

18
1 2 1 2 3 2 3 3 2 2 3 1 1 3 3 1 2 1

output:

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

result:

ok count=6

Test #25:

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

input:

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

output:

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

result:

ok count=5

Test #26:

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

input:

18
3 2 1 2 1 3 3 1 1 3 2 1 2 3 2 1 2 3

output:

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

result:

ok count=6

Test #27:

score: 0
Accepted
time: 3ms
memory: 7492kb

input:

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

output:

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

result:

ok count=5

Test #28:

score: 0
Accepted
time: 3ms
memory: 7500kb

input:

18
2 1 2 2 2 2 1 3 1 3 3 3 2 2 2 2 3 2

output:

2
1 2 11
6 12 16

result:

ok count=2

Test #29:

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

input:

17
1 2 2 2 2 1 1 1 1 3 2 2 1 2 1 2 2

output:

1
0 1 9

result:

ok count=1

Test #30:

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

input:

16
1 2 2 2 2 3 3 1 3 3 2 2 2 2 3 2

output:

2
0 1 9
7 10 14

result:

ok count=2

Test #31:

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

input:

18
1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3

output:

5
0 5 13
1 6 14
2 7 15
3 8 16
4 9 17

result:

ok count=5

Test #32:

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

input:

6
1 2 3 2 3 1

output:

2
0 1 4
2 3 5

result:

ok count=2

Test #33:

score: 0
Accepted
time: 3ms
memory: 7520kb

input:

6
2 1 3 3 1 2

output:

0

result:

ok count=0

Test #34:

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

input:

6
3 1 2 2 3 1

output:

2
0 3 5
1 2 4

result:

ok count=2

Test #35:

score: 0
Accepted
time: 5ms
memory: 7836kb

input:

15000
2 1 3 1 1 2 3 1 3 1 1 1 3 2 2 2 1 3 2 3 3 3 3 2 1 1 2 2 1 1 1 1 1 1 3 3 3 3 3 1 3 1 2 1 1 1 1 1 2 1 2 1 2 1 3 3 3 3 3 2 2 1 1 2 3 3 3 2 3 2 1 2 1 1 1 1 1 3 2 3 2 1 1 2 1 1 1 1 3 2 1 2 1 1 2 1 2 1 2 1 3 3 2 3 2 3 1 2 1 3 3 1 2 2 3 1 2 3 2 3 3 1 1 1 3 3 2 2 2 2 2 1 3 3 3 2 2 1 2 1 3 3 3 3 2 2 1 ...

output:

4997
1 5 7467
7 23 7473
8 26 7475
11 48 7479
12 50 7481
20 63 7485
22 69 7491
25 78 7494
31 91 7502
32 94 7503
34 98 7505
35 102 7506
39 113 7514
41 118 7516
46 129 7520
54 144 7530
56 150 7533
58 155 7536
61 165 7538
64 175 7541
65 178 7542
72 191 7548
73 193 7551
74 195 7552
79 209 7560
82 214 756...

result:

ok count=4997

Test #36:

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

input:

15000
3 1 3 3 2 1 1 3 1 2 2 3 1 2 1 2 1 2 1 1 2 2 1 2 3 2 3 2 3 3 1 1 2 1 2 2 3 3 3 2 3 2 1 1 3 2 2 3 1 2 1 3 1 3 1 3 2 1 1 1 3 3 2 2 3 3 1 2 3 2 3 2 2 2 1 2 3 2 2 1 1 3 3 2 1 3 3 3 2 2 1 1 3 1 3 2 2 3 3 1 2 2 2 3 1 1 2 1 1 1 1 1 2 2 1 2 1 3 3 3 3 3 2 3 1 1 1 1 1 1 2 1 1 2 3 2 1 3 3 3 2 1 1 3 2 1 1 ...

output:

4999
3 13 7474
6 17 7478
8 21 7480
11 23 7481
14 27 7483
19 35 7488
36 67 7498
37 69 7500
38 71 7505
40 72 7506
44 77 7509
47 78 7510
48 83 7511
50 88 7513
51 89 7515
52 95 7516
58 106 7524
60 113 7526
74 144 7537
82 161 7543
84 168 7544
85 169 7546
90 172 7551
93 181 7554
97 186 7557
98 188 7558
10...

result:

ok count=4999

Test #37:

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

input:

15000
1 2 1 3 2 3 2 3 2 3 3 1 3 3 1 1 3 1 2 3 1 1 3 2 1 2 1 2 1 1 2 1 1 1 3 3 1 2 3 3 3 1 3 3 2 1 3 3 3 3 1 3 2 3 3 1 3 2 3 1 3 3 1 2 2 2 1 3 3 2 3 2 3 3 2 3 2 1 1 3 2 3 3 1 1 1 3 1 3 1 2 1 3 2 2 1 2 1 2 3 3 1 1 2 1 1 3 3 3 3 1 1 2 2 3 1 2 1 3 1 1 3 2 3 1 2 1 3 1 1 3 3 3 1 3 3 3 1 2 2 2 1 2 1 3 2 3 ...

output:

4998
0 1 7470
2 4 7471
3 6 7472
11 27 7481
13 37 7485
14 44 7487
22 71 7496
29 90 7500
31 93 7502
42 138 7515
45 140 7518
46 142 7519
48 149 7523
49 150 7524
53 158 7529
59 170 7535
62 187 7539
66 189 7540
67 190 7542
70 194 7547
72 199 7550
73 200 7551
77 206 7554
79 209 7556
81 214 7558
83 226 756...

result:

ok count=4998

Test #38:

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

input:

15000
1 2 1 1 1 2 3 1 2 3 3 3 2 2 1 2 1 3 3 2 3 2 1 1 2 3 3 1 1 2 1 3 2 3 1 1 2 2 2 1 3 1 2 3 3 2 2 1 2 3 3 2 2 2 2 3 3 3 2 3 3 2 1 2 3 3 1 3 3 1 1 3 3 3 2 3 2 1 3 1 1 2 1 3 1 2 1 1 2 1 2 3 2 2 3 3 2 2 1 3 3 2 3 1 2 2 3 3 2 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 1 3 1 3 2 2 2 2 3 2 1 2 2 3 3 1 2 3 1 1 3 1 2 ...

output:

5000
0 1 7454
7 15 7465
9 19 7467
14 29 7470
16 32 7475
27 51 7490
28 52 7491
30 53 7492
31 54 7493
34 61 7498
39 74 7501
41 81 7503
44 88 7505
55 96 7512
57 101 7517
62 108 7520
68 129 7526
69 130 7527
70 131 7528
71 133 7529
75 140 7534
77 146 7535
78 147 7537
79 148 7538
82 156 7541
83 161 7545
8...

result:

ok count=5000

Test #39:

score: 0
Accepted
time: 5ms
memory: 7832kb

input:

15000
3 3 1 1 1 1 3 3 3 3 3 1 3 1 3 1 1 3 1 3 3 3 3 1 2 3 3 3 3 3 3 3 3 3 3 1 3 1 1 3 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 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 3 1 1 3 2 1 1 1 1 3 3 1 3 3 1 3 1 3 1 1 3 1 3 3 1 1 1 1 1 3 1 1 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 3 3 3 3 3 1 3 3 3 2 1 3 2 3 1 1 ...

output:

5000
3 43 5307
6 47 5310
7 48 5311
10 51 5314
11 52 5315
12 53 5316
13 54 5317
18 59 5322
19 60 5323
20 61 5324
22 63 5326
29 69 5332
30 70 5333
31 71 5334
32 72 5335
33 73 5336
38 78 5341
39 79 5342
45 81 5344
82 83 5345
84 88 5346
89 149 5350
93 156 5354
96 159 5357
98 161 5359
100 163 5361
102 16...

result:

ok count=5000

Test #40:

score: 0
Accepted
time: 5ms
memory: 9932kb

input:

15000
3 1 3 1 3 3 1 1 1 1 3 3 3 3 3 3 1 1 3 1 1 3 3 3 3 3 3 3 3 3 2 3 1 3 3 3 3 3 3 1 3 1 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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 3 1 1 1 3 1 1 3 1 1 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 1 1 1 3 1 1 1 3 3 3 3 1 1 1 1 3 1 3 1 1 3 1 2 1 2 1 3 1 3 1 1 1 1 3 3 3 3 ...

output:

5000
0 30 6171
2 43 6173
3 45 6174
6 48 6177
8 50 6179
9 51 6180
12 54 6183
13 55 6184
14 56 6185
15 57 6186
16 58 6187
17 59 6188
21 63 6192
23 65 6194
24 66 6195
27 69 6198
29 71 6200
36 77 6206
37 78 6207
38 79 6208
41 82 6211
85 97 6214
87 99 6216
88 101 6217
89 102 6218
92 105 6221
94 107 6223
...

result:

ok count=5000

Test #41:

score: 0
Accepted
time: 5ms
memory: 7880kb

input:

15000
3 3 1 1 1 1 3 3 3 1 3 1 3 1 3 1 3 3 3 3 1 3 3 1 1 1 3 1 1 1 1 3 1 1 3 3 1 1 1 3 1 3 1 3 3 1 1 1 3 1 3 3 3 3 3 3 3 1 3 3 3 1 3 1 3 3 3 3 3 3 3 3 3 1 1 1 1 3 3 1 3 3 3 1 3 3 1 3 3 1 3 3 3 3 1 1 1 1 3 3 1 3 1 3 3 1 3 1 1 3 1 3 1 3 3 3 1 1 1 1 3 3 3 3 1 3 1 3 1 1 3 1 1 1 3 1 1 1 3 2 3 3 3 3 1 1 1 ...

output:

5000
0 139 6958
4 475 6962
5 476 6963
6 477 6964
8 479 6966
9 480 6967
10 481 6968
14 485 6972
15 486 6973
17 488 6975
18 489 6976
23 494 6981
24 495 6982
27 498 6985
35 506 6993
36 507 6994
40 511 6998
41 512 6999
42 513 7000
44 515 7002
48 519 7006
51 522 7009
53 524 7011
55 526 7013
58 529 7016
6...

result:

ok count=5000

Test #42:

score: 0
Accepted
time: 4ms
memory: 7748kb

input:

6000
1 3 1 1 3 3 3 1 1 1 1 1 3 1 1 1 3 1 3 3 3 1 3 1 1 1 3 3 3 3 1 1 3 1 3 1 3 3 3 3 3 3 3 3 3 3 1 3 1 3 1 1 1 1 3 3 3 1 1 1 1 3 1 3 1 3 1 3 1 1 1 1 3 3 1 3 3 3 1 3 3 3 1 3 3 3 1 1 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...

output:

2000
0 89 2549
3 92 2552
4 93 2553
6 95 2555
8 97 2557
10 99 2559
11 100 2560
12 101 2561
13 102 2562
14 103 2563
15 104 2564
17 106 2567
20 109 2570
21 110 2571
23 112 2573
26 115 2576
27 116 2577
34 123 2584
36 125 2586
37 126 2587
38 127 2588
43 132 2593
46 135 2596
49 138 2599
50 139 2600
52 141...

result:

ok count=2000

Test #43:

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

input:

9000
1 1 1 1 1 1 1 1 1 3 1 1 1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 3 1 1 3 2 1 3 3 1 3 3 2 3 2 3 2 2 2 2 2 2 2 2 2 3 3 3 3 1 3 3 1 3 1 3 1 1 3 2 3 3 1 3 1 1 1 1 3 3 1 1 1 3 3 1 3 2 2 2 2 2 2 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 3 1 1 3 3 3 1 1 1 3 1 3 3 1 1 3 3 3 1 3 1 1 3 3 1 1 1 1 3 1 3 1 1...

output:

3000
0 13 4207
2 16 4209
4 18 4211
5 19 4212
6 20 4213
8 22 4215
10 24 4217
11 25 4218
12 26 4219
15 27 4220
29 39 4222
33 44 4225
34 45 4226
37 48 4229
40 50 4231
52 66 4233
55 86 4236
59 90 4240
60 91 4241
62 93 4243
63 94 4244
67 97 4247
68 98 4248
69 99 4249
70 100 4250
71 101 4251
77 107 4257
8...

result:

ok count=3000

Test #44:

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

input:

12000
3 3 3 3 3 1 3 1 3 1 1 3 1 1 3 1 3 3 3 1 1 1 3 1 1 1 1 3 3 3 2 1 1 1 3 3 3 3 1 3 1 3 1 1 1 1 1 3 3 1 1 3 3 1 1 1 2 1 3 3 1 1 1 1 1 1 1 3 1 3 3 1 3 1 3 3 1 1 1 3 3 3 1 1 1 3 3 1 3 3 1 3 3 3 1 1 3 1 1 1 3 1 1 3 3 1 1 1 1 1 3 3 1 3 1 3 3 1 1 3 1 3 1 3 3 3 3 3 3 1 1 1 1 1 3 1 1 1 3 1 3 1 3 3 3 3 1 ...

output:

4000
1 56 6544
2 233 6545
3 270 6546
6 335 6549
7 339 6550
8 342 6551
14 348 6557
15 349 6558
16 350 6559
19 353 6562
22 356 6565
23 357 6566
25 359 6568
26 360 6569
28 362 6571
32 365 6574
33 366 6575
35 368 6577
38 371 6580
42 375 6584
43 376 6585
46 379 6588
48 381 6590
49 382 6591
50 383 6592
52...

result:

ok count=4000

Test #45:

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

input:

15000
3 3 1 3 3 2 3 2 1 1 2 1 3 1 1 3 1 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1 2 3 2 2 1 1 1 1 1 1 1 3 3 3 1 1 3 1 3 1 1 3 3 3 1 3 1 3 1 1 1 3 3 1 3 1 3 1 2 1 3 1 3 1 1 1 1 3 3 3 3 3 3 1 3 1 3 3 1 3 3 1 1 1 1 1 1 3 1 1 1 1 3 3 3 3 2 3 3 3 1 3 1 3 3 3 2 2 2 2 2 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:

5000
1 7 5433
3 17 5435
4 18 5436
6 19 5437
8 20 5438
11 23 5440
12 24 5441
13 25 5442
14 26 5443
15 27 5444
16 28 5445
30 32 5447
33 35 5449
36 70 5450
37 108 5451
39 119 5453
40 120 5454
41 121 5455
48 128 5462
49 129 5463
52 132 5466
56 136 5470
58 138 5472
60 140 5474
61 141 5475
63 143 5477
75 ...

result:

ok count=5000

Test #46:

score: 0
Accepted
time: 4ms
memory: 7832kb

input:

15000
3 3 3 3 1 1 1 3 1 1 1 3 1 1 1 3 1 3 3 3 3 3 1 1 3 1 1 3 3 3 1 1 1 3 1 1 3 1 1 1 1 1 1 1 1 3 3 3 1 3 3 2 3 1 1 3 3 3 3 3 1 1 1 3 3 2 3 1 1 3 3 3 3 1 3 3 3 1 1 1 1 3 3 3 1 3 3 1 1 2 3 1 1 1 3 3 1 1 3 3 3 3 1 3 3 1 1 3 1 3 3 1 1 1 3 3 1 1 1 3 1 2 1 1 2 1 1 1 2 3 3 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

5000
0 51 6950
1 65 6951
3 121 6953
4 124 6954
5 128 6955
6 132 6956
7 133 6957
10 136 6960
13 139 6963
14 140 6964
19 145 6969
20 146 6970
21 147 6971
24 150 6974
25 151 6975
26 152 6976
27 153 6977
28 154 6978
29 155 6979
30 156 6980
32 158 6982
33 159 6983
35 161 6985
36 162 6986
37 163 6987
38 1...

result:

ok count=5000

Test #47:

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

input:

15000
3 3 1 3 3 1 1 2 1 1 3 1 1 3 1 3 1 1 1 3 3 1 3 3 1 3 1 1 1 1 3 3 3 2 2 1 2 3 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 1 1 1 1 3 1 3 3 3 3 1 1 3 3 3 1 3 3 1 1 1 1 1 1 3 1 1 1 3 3 1 1 3 1 3 1 1 3 1 1 1 1 3 3 3 3 3 1 3 3 3 1 1 3 3 1 1 3 1 3 3 3 3 3 3 3 1 3 1 3 1 1 1 3 3 3 1 ...

output:

5000
0 7 6155
2 34 6157
3 36 6158
4 39 6159
5 40 6160
9 43 6163
10 44 6164
11 45 6165
13 47 6167
15 49 6169
17 51 6171
22 56 6176
24 58 6178
25 59 6179
26 60 6180
30 64 6184
37 68 6188
71 410 6191
73 436 6193
74 437 6194
77 440 6197
78 441 6198
79 442 6199
81 444 6201
82 445 6202
84 447 6204
85 448 ...

result:

ok count=5000

Test #48:

score: 0
Accepted
time: 5ms
memory: 9820kb

input:

15000
1 2 2 1 2 2 3 2 2 2 2 1 2 1 3 2 2 2 2 3 2 2 2 2 1 2 2 1 2 2 2 2 3 2 2 2 2 3 2 2 2 2 1 1 2 2 2 1 1 3 2 2 2 2 3 2 2 1 2 2 2 1 3 2 1 2 2 2 2 2 2 3 2 2 3 2 2 3 2 1 2 2 2 2 2 3 2 2 2 2 2 3 3 1 2 1 2 2 2 2 3 2 1 1 2 2 2 2 2 1 2 2 2 2 2 3 2 2 1 2 3 3 2 2 2 1 2 2 2 2 3 2 2 2 2 2 3 3 3 2 1 2 1 2 1 2 3 ...

output:

3267
6 7 8354
11 12 8355
14 16 8357
19 20 8358
27 28 8360
32 33 8361
37 38 8362
42 44 8363
54 55 8368
61 63 8370
62 65 8371
71 72 8373
79 80 8376
85 86 8377
91 94 8378
92 96 8379
95 98 8381
100 101 8382
103 105 8384
109 110 8385
120 122 8388
121 123 8389
130 131 8391
140 145 8395
142 147 8396
153 15...

result:

ok count=3267

Test #49:

score: 0
Accepted
time: 5ms
memory: 7900kb

input:

15000
1 2 2 2 1 2 2 2 2 2 1 2 2 2 1 3 2 1 1 2 2 1 2 2 2 2 2 2 2 2 2 1 3 2 1 1 2 3 3 1 2 1 1 1 3 2 2 1 2 2 2 2 2 2 2 2 3 2 1 2 2 3 1 2 2 1 1 3 2 2 3 2 2 3 3 2 3 2 2 1 2 2 3 2 2 2 2 2 3 1 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 3 2 3 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 3 2 1 2 2 2 2 3 2 1 2 2 1 2 2 ...

output:

3340
0 1 8342
10 11 8344
14 16 8345
17 20 8347
18 22 8348
21 23 8349
31 33 8350
34 40 8352
35 45 8353
37 46 8354
38 48 8355
39 49 8356
41 50 8357
44 53 8360
47 54 8361
58 59 8363
66 69 8367
67 71 8368
79 80 8373
88 90 8375
92 93 8377
96 97 8378
108 109 8380
111 112 8381
139 140 8385
141 142 8386
144...

result:

ok count=3340

Test #50:

score: 0
Accepted
time: 4ms
memory: 7948kb

input:

14000
1 2 1 2 1 2 2 3 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 2 2 2 2 2 3 2 2 2 3 1 3 1 1 2 2 2 2 1 3 2 2 1 2 2 2 1 2 3 2 2 1 2 2 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 3 2 2 3 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 3 3 1 1 2 2 2 1 2 2 3 1 2 2 2 2 2 2 2 3 2 2 2 1 2 1 3 2 3 2 2 3 2 2 2 1 1 3 2 2 2 1 2 2 2 2 2 1 2 1 ...

output:

3042
2 3 7762
24 26 7766
36 41 7770
37 42 7771
39 46 7773
44 47 7774
45 49 7775
48 50 7776
52 53 7777
63 64 7780
69 70 7781
75 76 7782
78 80 7783
79 81 7784
84 85 7785
88 89 7786
98 102 7788
99 103 7789
107 109 7792
116 117 7794
120 121 7795
128 129 7799
133 136 7801
134 137 7802
138 139 7803
144 14...

result:

ok count=3042

Test #51:

score: 0
Accepted
time: 4ms
memory: 7928kb

input:

13000
2 2 3 3 2 2 2 1 2 3 2 1 2 1 2 3 1 3 3 1 2 1 2 1 2 3 2 2 2 2 2 2 1 2 2 1 3 3 3 1 2 2 3 2 3 2 1 2 2 2 2 1 2 1 2 2 2 2 1 2 2 2 2 3 3 2 2 2 2 1 2 3 2 2 3 2 2 1 2 1 2 2 2 1 2 2 1 1 2 3 1 2 2 1 2 1 2 2 2 2 1 3 2 2 2 2 2 2 2 1 1 2 3 2 2 2 2 2 2 2 1 2 1 2 2 3 1 2 2 3 1 2 2 2 1 2 3 3 2 2 1 1 1 2 3 1 2 ...

output:

2941
2 4 7190
7 8 7192
13 14 7195
17 24 7198
18 26 7199
21 28 7201
23 29 7202
32 33 7204
38 45 7208
39 47 7209
44 49 7211
51 52 7213
86 88 7224
89 92 7226
90 94 7227
93 96 7228
95 97 7229
100 102 7230
101 103 7231
109 111 7232
110 113 7233
112 114 7234
126 128 7238
129 131 7239
140 143 7244
141 146 ...

result:

ok count=2941

Test #52:

score: 0
Accepted
time: 3ms
memory: 7824kb

input:

11000
2 2 2 3 2 2 2 2 2 2 2 1 2 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 3 2 2 2 2 1 2 1 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 1 3 2 1 1 2 2 2 2 1 2 2 3 2 2 1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 3 2 2 3 2 1 3 2 2 2 2 1 2 2 3 2 2 3 2 2 2 2 2 2 2 3 2 1 2 2 3 1 2 2 3 2 2 3 2 3 2 2 2 ...

output:

2460
3 4 6097
11 12 6098
18 19 6100
29 30 6101
42 43 6103
44 46 6104
65 70 6108
68 72 6110
79 80 6113
85 86 6114
110 112 6120
118 119 6122
135 137 6127
138 139 6128
141 142 6129
148 155 6132
151 159 6134
153 163 6136
154 166 6137
160 169 6140
162 171 6141
164 172 6142
165 173 6143
186 189 6147
188 1...

result:

ok count=2460

Test #53:

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

input:

11000
2 2 3 1 2 1 2 2 2 3 2 2 2 2 2 3 2 1 2 2 1 2 3 2 1 2 3 2 2 1 2 2 2 2 2 2 3 3 2 2 2 2 2 1 2 1 2 2 1 1 2 1 1 2 2 3 2 2 2 2 2 2 2 1 2 2 3 1 1 2 2 1 3 2 1 2 3 2 3 1 2 2 2 1 2 2 2 2 3 2 2 2 3 1 2 1 2 2 2 2 3 2 1 2 2 1 3 2 3 3 2 2 2 1 2 2 2 2 2 3 1 2 2 1 2 2 3 2 2 3 2 2 2 2 1 3 2 2 2 2 2 1 2 2 3 2 2 ...

output:

2423
3 6 6104
15 16 6107
17 18 6108
20 21 6109
24 25 6111
29 30 6113
43 44 6116
45 46 6117
51 54 6120
52 56 6121
55 57 6122
63 64 6123
72 77 6128
74 80 6129
78 82 6131
83 85 6133
88 89 6134
93 96 6136
95 97 6137
100 101 6138
106 110 6141
108 111 6142
120 122 6146
123 124 6147
135 137 6151
141 142 61...

result:

ok count=2423

Test #54:

score: 0
Accepted
time: 5ms
memory: 7796kb

input:

11000
2 1 1 3 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 3 2 2 2 3 2 1 2 1 2 1 2 2 2 2 3 2 2 2 2 2 2 3 2 1 2 3 1 3 2 2 3 2 2 3 2 1 3 1 3 2 2 2 2 2 2 1 3 2 2 2 2 1 2 2 2 2 3 2 2 3 3 1 2 2 2 2 2 2 2 2 2 2 3 2 2 3 2 2 2 2 3 2 2 1 1 2 3 3 2 3 1 1 3 1 2 2 2 3 2 1 2 2 2 3 3 3 2 1 2 2 2 3 2 2 ...

output:

2372
2 5 6170
25 26 6173
32 33 6174
36 37 6175
47 48 6179
56 57 6181
58 61 6182
68 72 6187
69 73 6188
70 74 6189
71 75 6190
79 81 6192
84 85 6193
89 90 6194
92 95 6195
116 118 6201
117 121 6202
119 127 6203
122 129 6205
124 133 6207
130 139 6210
132 141 6211
136 142 6212
137 143 6213
140 146 6215
14...

result:

ok count=2372

Test #55:

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

input:

11000
2 2 1 2 3 2 2 1 2 2 2 3 1 2 2 2 2 2 2 2 3 2 2 1 2 2 2 2 2 3 2 2 1 1 2 3 2 3 2 2 2 2 2 2 2 2 1 3 2 3 3 2 2 2 3 2 2 2 1 2 2 1 3 3 2 2 2 3 2 2 2 2 3 2 1 1 2 2 2 2 2 2 2 2 2 2 2 1 2 3 2 2 2 2 2 1 2 2 2 2 2 2 2 1 3 1 1 2 3 3 2 2 2 2 2 1 2 2 2 2 1 2 2 1 2 3 2 2 2 2 2 1 1 3 2 2 1 2 3 2 2 2 1 1 2 2 2 ...

output:

2490
4 5 6094
11 13 6096
12 14 6097
20 21 6098
23 24 6099
47 51 6106
61 64 6111
75 77 6117
87 88 6118
89 90 6119
103 107 6121
106 112 6124
108 113 6125
123 124 6129
125 126 6130
131 134 6131
133 137 6133
138 140 6135
143 145 6137
149 150 6138
152 154 6139
157 159 6142
163 166 6143
165 172 6145
167 1...

result:

ok count=2490

Test #56:

score: 0
Accepted
time: 4ms
memory: 7768kb

input:

15000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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
7734 8258 14998

result:

ok count=1

Test #57:

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

input:

15000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
1354 1355 5343

result:

ok count=1

Test #58:

score: 0
Accepted
time: 6ms
memory: 7796kb

input:

15000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

5000
0 5000 10000
1 5001 10001
2 5002 10002
3 5003 10003
4 5004 10004
5 5005 10005
6 5006 10006
7 5007 10007
8 5008 10008
9 5009 10009
10 5010 10010
11 5011 10011
12 5012 10012
13 5013 10013
14 5014 10014
15 5015 10015
16 5016 10016
17 5017 10017
18 5018 10018
19 5019 10019
20 5020 10020
21 5021 100...

result:

ok count=5000

Test #59:

score: 0
Accepted
time: 4ms
memory: 9848kb

input:

15000
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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
0 1 14999

result:

ok count=1

Test #60:

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

input:

15000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

3000
0 6000 12000
1 6001 12001
2 6002 12002
3 6003 12003
4 6004 12004
5 6005 12005
6 6006 12006
7 6007 12007
8 6008 12008
9 6009 12009
10 6010 12010
11 6011 12011
12 6012 12012
13 6013 12013
14 6014 12014
15 6015 12015
16 6016 12016
17 6017 12017
18 6018 12018
19 6019 12019
20 6020 12020
21 6021 120...

result:

ok count=3000

Test #61:

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

input:

14997
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

4977
0 4977 10020
1 4978 10021
2 4979 10022
3 4980 10023
4 4981 10024
5 4982 10025
6 4983 10026
7 4984 10027
8 4985 10028
9 4986 10029
10 4987 10030
11 4988 10031
12 4989 10032
13 4990 10033
14 4991 10034
15 4992 10035
16 4993 10036
17 4994 10037
18 4995 10038
19 4996 10039
20 4997 10040
21 4998 100...

result:

ok count=4977

Test #62:

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

input:

91
2 1 2 2 1 3 1 2 1 2 2 1 2 3 3 1 2 2 2 1 3 1 3 1 1 3 1 2 1 2 1 3 1 1 3 2 3 1 2 3 2 2 2 2 1 2 1 1 3 2 2 2 1 1 2 3 3 2 3 3 3 3 1 1 3 2 3 3 1 3 3 3 3 3 2 1 2 2 2 3 2 3 2 1 3 1 3 1 3 1 1

output:

29
4 7 55
6 10 58
8 12 59
11 16 60
14 18 62
19 29 64
21 38 67
22 40 68
23 41 69
24 42 70
26 45 72
28 49 73
32 54 81
36 74 85
37 76 86
39 77 87
44 78 88
1 2 56
5 9 53
13 27 63
15 17 61
20 50 75
30 35 66
25 57 83
33 43 71
31 80 89
46 51 79
34 82 90
47 65 84

result:

ok count=29

Test #63:

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

input:

92
3 1 3 3 3 3 3 1 3 2 1 3 3 3 1 1 1 2 2 1 2 1 2 2 2 3 2 1 3 3 2 3 3 2 3 3 2 3 3 2 2 1 2 2 3 3 2 2 2 3 2 1 3 2 1 2 1 1 1 1 1 3 1 3 1 2 1 1 2 2 2 2 3 1 1 3 2 1 1 1 1 1 1 3 1 2 2 3 3 2 2 2

output:

29
3 20 54
4 22 56
5 23 57
6 24 58
8 30 60
10 33 61
11 36 62
13 40 64
16 46 72
28 55 78
29 65 79
31 68 80
32 69 81
34 70 82
37 76 84
41 86 88
0 17 51
1 9 49
2 26 59
7 18 52
12 42 66
14 39 63
15 50 75
25 43 67
19 71 83
35 47 73
21 85 87
38 48 74
45 53 77

result:

ok count=29

Test #64:

score: 0
Accepted
time: 3ms
memory: 7540kb

input:

93
1 1 3 1 1 3 1 1 2 3 1 1 1 2 3 3 2 1 1 3 1 3 3 2 3 3 1 3 2 2 3 3 1 3 1 1 1 2 2 3 1 2 3 1 3 3 2 3 2 3 2 3 2 3 2 3 3 2 1 3 2 2 1 1 1 2 1 1 2 2 2 1 1 2 3 1 2 2 3 3 2 1 2 2 1 2 2 2 2 3 3 2 2

output:

28
1 13 42
2 16 43
3 23 44
4 28 45
6 37 49
7 38 51
10 46 55
11 48 56
15 54 62
19 61 66
21 68 71
22 69 72
25 73 75
26 76 78
30 80 81
31 82 84
32 83 89
0 29 47
5 8 40
9 50 58
12 41 53
14 57 63
17 52 59
18 70 74
24 60 64
20 77 79
27 65 67
36 85 90

result:

ok count=28

Test #65:

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

input:

94
3 3 1 1 3 2 1 3 2 1 2 1 1 2 2 2 2 3 2 2 1 1 3 1 2 1 2 3 3 3 2 2 1 3 2 1 2 2 1 2 3 1 2 1 2 1 3 1 3 1 3 3 2 2 2 1 1 3 2 2 3 3 3 2 2 3 3 3 2 3 2 1 2 2 1 1 2 1 1 1 3 2 2 1 3 3 1 3 1 3 3 3 2 1

output:

30
0 5 49
2 10 51
4 14 56
6 15 57
9 18 61
11 19 62
12 24 65
20 30 67
21 31 69
22 34 71
27 39 77
28 42 78
29 44 79
32 52 80
33 53 83
35 54 84
38 58 85
40 59 86
41 63 87
45 68 89
47 72 91
48 73 93
1 13 55
3 8 50
7 16 74
23 36 60
17 37 75
25 26 66
43 70 90
46 64 88

result:

ok count=30

Test #66:

score: 0
Accepted
time: 3ms
memory: 7520kb

input:

94
3 2 3 2 1 2 1 3 3 2 1 3 2 3 1 3 2 1 2 2 2 3 3 1 3 3 1 2 1 1 1 2 3 2 1 2 2 2 2 2 3 1 3 3 2 3 3 3 1 1 1 2 1 1 1 3 3 3 1 1 3 1 3 1 2 3 3 2 1 1 2 3 2 1 2 2 3 1 3 3 1 1 1 3 2 3 1 2 2 2 2 3 1 1

output:

29
0 1 54
4 5 56
6 9 57
7 12 58
8 16 59
10 18 60
11 19 61
17 33 66
21 35 68
22 36 69
23 37 71
24 38 73
28 51 78
29 64 79
32 70 81
41 75 85
42 84 86
45 88 92
46 89 93
2 3 63
14 27 55
13 20 77
26 44 62
15 67 80
30 31 65
25 72 82
34 39 76
53 74 83
52 87 91

result:

ok count=29

Test #67:

score: 0
Accepted
time: 3ms
memory: 7524kb

input:

96
2 3 2 1 1 1 1 3 3 2 2 1 2 1 3 3 3 2 3 2 1 3 2 1 2 3 2 2 3 2 1 2 2 1 1 3 1 2 3 3 3 3 3 1 1 2 1 1 2 2 2 1 3 3 1 1 3 2 3 1 1 3 2 1 1 1 2 1 3 2 2 3 3 2 2 3 3 1 1 1 3 1 3 3 3 3 1 3 3 2 2 2 1 1 1 2

output:

28
5 12 61
7 19 64
8 22 65
13 26 68
21 45 78
28 50 81
30 57 82
33 62 83
34 66 84
40 89 92
41 90 93
42 91 94
1 2 59
3 9 58
4 10 71
14 27 60
6 29 72
15 17 63
11 31 75
16 24 67
18 37 77
20 32 76
23 49 80
25 48 79
35 70 86
36 69 85
55 73 87
54 74 88

result:

ok count=28

Test #68:

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

input:

98
2 3 2 1 2 2 1 3 3 3 2 1 3 1 1 2 2 2 2 1 1 2 2 1 2 1 3 2 1 3 3 1 2 1 2 1 1 3 2 1 2 3 1 2 3 3 3 3 2 2 3 1 3 2 1 1 1 3 3 1 3 2 2 1 3 1 3 3 3 1 1 2 1 1 2 3 2 3 2 1 3 1 1 2 3 1 3 3 2 3 3 1 3 1 3 1 3 2

output:

27
6 10 66
9 17 69
12 21 72
14 24 75
19 27 77
23 34 80
26 40 82
28 43 84
29 48 85
31 53 87
33 61 89
35 62 90
1 2 65
3 4 64
7 18 70
11 15 67
8 22 73
13 16 68
20 49 86
30 32 79
25 74 92
37 38 81
36 78 94
41 71 91
39 88 96
44 76 93
60 83 95

result:

ok count=27

Test #69:

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

input:

100
1 3 1 3 1 1 2 3 1 2 2 2 1 3 3 3 3 1 2 3 1 1 3 2 2 2 3 3 2 1 1 3 1 3 2 2 1 1 1 3 1 3 2 3 2 2 2 1 3 3 1 1 1 1 1 3 2 2 2 3 3 2 1 3 2 3 3 1 1 1 2 2 2 2 2 1 1 3 2 3 2 3 1 3 1 1 3 3 2 1 2 2 3 3 3 3 1 1 3 1

output:

30
0 6 55
2 10 60
3 11 62
4 18 63
5 23 65
13 34 69
14 35 75
15 42 76
17 45 79
21 57 83
22 58 84
26 61 85
29 70 87
32 73 93
36 78 95
1 25 67
8 9 59
7 28 68
12 24 66
16 56 82
20 44 77
19 71 89
30 46 81
27 80 96
37 64 86
31 88 97
38 72 92
33 91 99
40 74 94
54 90 98

result:

ok count=30

Test #70:

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

input:

100
1 1 1 1 1 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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
0 29 58

result:

ok count=1

Test #71:

score: 0
Accepted
time: 3ms
memory: 7500kb

input:

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 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 1 2 2 2 2 2 2

output:

1
29 30 93

result:

ok count=1

Test #72:

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

input:

99
1 1 3 3 2 1 2 2 2 2 1 2 1 3 1 3 3 1 3 3 2 2 2 1 2 2 2 2 2 2 1 2 1 2 3 2 3 2 1 2 1 3 1 2 2 1 2 3 2 2 1 3 2 1 2 3 2 2 1 2 3 1 1 3 3 3 3 3 3 1 1 3 1 3 1 1 1 3 1 1 3 1 3 3 1 3 3 3 2 1 1 3 3 2 3 3 1 2 1

output:

33
0 4 63
1 6 64
5 9 67
10 11 68
13 21 70
14 22 71
15 24 72
18 27 75
19 28 76
23 29 77
36 37 81
38 39 82
40 43 83
41 44 84
42 46 85
45 48 86
51 54 90
53 56 91
58 59 94
2 7 69
12 20 65
3 8 74
17 26 66
16 25 78
30 31 73
32 33 80
34 35 79
47 49 89
50 52 87
55 57 61
92 93 96
60 97 98
62 88 95

result:

ok count=33

Test #73:

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

input:

96
3 2 1 2 3 1 2 1 2 1 2 2 1 1 2 2 3 2 1 3 2 2 1 2 3 2 1 2 3 3 3 3 1 2 2 2 2 2 1 1 1 1 3 1 2 1 1 3 3 1 3 3 1 3 3 1 1 1 3 3 3 1 3 1 1 3 3 1 3 3 3 3 2 1 2 3 2 3 2 3 2 1 2 1 2 3 2 3 2 1 2 3 2 1 2 1

output:

32
0 1 52
2 3 53
12 14 58
13 15 59
24 25 64
26 27 65
29 34 67
32 37 70
38 44 71
40 74 75
41 76 77
46 84 85
48 88 89
49 90 91
50 92 93
51 94 95
4 8 55
5 6 54
7 10 60
16 17 56
9 11 62
19 21 57
18 20 66
28 33 61
22 23 68
30 35 63
31 36 39
69 72 73
42 80 81
43 78 79
45 86 87
47 82 83

result:

ok count=32

Test #74:

score: 0
Accepted
time: 3ms
memory: 7496kb

input:

99
3 2 1 2 1 1 1 3 2 3 1 2 1 2 3 3 3 1 3 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 1 3 1 1 1 1 1 1 3 2 3 2 3 2 2 3 1 2 2 2 2 3 2 1 1 1 3 2 3 2 2 2 3 1 3 2 1 2 3 2 2 2 2 2 2 2 1 1 3 1 1 3 3 2 3 2 2 2 3 2 2 3 1 3 1

output:

33
0 1 38
6 13 42
10 47 49
15 52 57
16 53 58
22 65 68
23 69 70
25 73 80
26 74 81
29 77 84
30 78 85
31 79 86
32 87 88
33 89 92
34 90 95
35 91 96
36 93 97
2 3 7
39 43 44
4 8 9
40 45 46
5 11 14
41 51 55
12 56 60
18 48 50
17 61 62
19 54 59
20 64 67
21 63 66
24 76 83
28 71 72
27 94 98
37 75 82

result:

ok count=33

Test #75:

score: 0
Accepted
time: 3ms
memory: 7520kb

input:

93
3 2 3 2 3 2 1 2 3 2 3 2 3 2 3 1 3 1 3 1 1 1 3 3 1 3 3 3 1 1 3 1 1 1 3 3 1 3 3 1 2 2 3 1 1 2 3 2 1 3 3 1 3 2 2 2 2 2 2 2 3 2 3 3 1 1 1 3 1 2 2 3 1 2 1 2 1 2 3 2 2 1 1 2 2 2 2 2 3 1 1 1 1

output:

31
2 3 39
8 9 44
12 13 48
15 41 50
16 45 51
17 47 52
19 54 62
20 55 63
22 57 65
23 58 66
24 59 67
25 61 68
27 70 72
33 83 88
34 84 89
35 85 90
37 87 92
0 1 43
6 7 38
4 5 21
42 56 64
10 11 28
46 73 74
14 75 76
29 40 49
18 79 81
31 53 60
26 80 82
32 69 71
30 86 91
36 77 78

result:

ok count=31

Test #76:

score: 0
Accepted
time: 3ms
memory: 7492kb

input:

90
3 3 3 3 2 2 2 2 3 2 1 2 3 2 3 2 1 1 2 2 3 3 2 2 1 3 2 2 1 2 1 1 3 1 3 2 3 3 3 1 1 1 3 1 3 2 3 1 1 3 1 2 1 1 3 3 3 1 2 1 1 2 1 3 3 3 1 1 3 1 2 2 1 2 1 3 2 3 2 2 3 1 2 1 2 1 2 1 2 3

output:

30
0 4 47
1 5 48
3 7 50
8 9 52
16 18 56
20 22 59
21 23 60
28 29 64
30 35 65
32 51 67
33 58 68
34 61 69
36 70 72
37 71 74
39 76 77
40 78 80
42 82 83
44 86 87
2 6 53
10 11 49
12 13 57
17 19 54
14 15 62
24 26 55
25 27 66
31 45 63
38 79 81
41 73 75
43 88 89
46 84 85

result:

ok count=30

Test #77:

score: 0
Accepted
time: 3ms
memory: 7496kb

input:

100
2 1 2 2 2 3 2 2 1 2 1 2 2 1 2 2 2 2 1 2 2 3 2 2 2 2 2 1 2 2 2 3 3 1 1 1 1 1 1 1 3 3 3 1 1 3 1 1 1 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 3 3 2 3 2 2 1 2 2 3 2 2 2 2 2 2 3 1 2 1 1 1 1 2 2 3 2 2 3 2 2 2 2 1 2 2

output:

20
10 11 61
18 19 63
27 28 65
32 68 70
33 69 73
34 71 80
42 82 97
1 2 59
5 6 58
8 9 64
21 22 60
13 14 31
62 66 67
35 78 89
40 72 81
36 79 92
41 74 83
56 75 84
55 76 85
54 77 86

result:

ok count=20

Test #78:

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

input:

99
2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 3 2 2 2 2 2 3 2 1 2 3 2 2 2 2 2 2 1 1 1 1 1 3 3 1 1 3 3 1 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 1 1 3 3 3 3 3 2 2 3 3 1 2 3 2 2 2 1 2 1 3 1 1 2 1 2 1 1 1 2 3 2 2 2 2 2 1 1 2

output:

18
7 8 65
9 10 66
35 72 80
38 76 84
39 78 86
43 91 96
16 17 71
24 25 69
22 23 77
33 67 70
26 27 79
34 68 73
36 89 90
42 74 81
64 75 82
63 83 87
62 85 88
58 92 97

result:

ok count=18

Test #79:

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

input:

98
3 2 2 2 2 2 2 3 3 2 2 2 1 2 1 2 2 2 2 2 2 3 1 3 1 3 2 3 2 1 2 2 1 1 1 3 3 3 3 1 3 1 1 1 3 3 1 3 3 3 1 3 1 3 3 1 3 3 1 1 3 3 3 3 2 2 2 2 2 2 2 2 2 1 3 2 2 2 3 2 2 2 2 3 2 1 2 2 2 2 2 2 2 2 2 2 2 1

output:

15
0 1 55
22 28 61
24 31 63
25 64 73
29 66 78
32 67 83
7 9 58
12 13 56
8 10 59
14 15 57
21 26 33
60 68 85
23 30 34
62 69 97
52 65 74

result:

ok count=15

Test #80:

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

input:

97
2 2 1 3 2 2 1 2 2 2 1 2 1 1 1 1 2 2 3 2 3 1 2 2 2 3 2 3 3 2 2 2 1 3 1 1 1 1 1 1 1 1 3 3 3 1 3 1 1 1 1 3 1 1 1 3 1 3 1 3 1 1 3 1 2 2 1 2 1 2 2 2 2 2 1 3 2 2 1 3 1 2 3 1 2 2 1 2 2 2 2 3 3 2 2 1 1

output:

21
13 17 55
15 22 57
18 23 58
25 29 61
28 31 63
33 65 68
35 69 75
37 71 79
39 73 82
44 85 95
2 5 51
3 4 50
6 7 59
20 24 52
10 11 62
27 30 53
12 16 42
54 81 91
14 19 43
56 84 92
21 26 46

result:

ok count=21

Test #81:

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

input:

99
1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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:

33
0 33 66
1 34 67
2 35 68
3 36 69
4 37 70
5 38 71
6 39 72
7 40 73
8 41 74
9 42 75
10 43 76
11 44 77
12 45 78
13 46 79
14 47 80
15 48 81
16 49 82
17 50 83
18 51 84
19 52 85
20 53 86
21 54 87
22 55 88
23 56 89
24 57 90
25 58 91
26 59 92
27 60 93
28 61 94
29 62 95
30 63 96
31 64 97
32 65 98

result:

ok count=33

Test #82:

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

input:

99
3 2 3 3 1 2 1 1 1 1 2 2 3 1 3 1 3 3 2 3 3 2 3 3 1 2 3 3 1 1 1 2 1 1 1 1 3 1 1 2 1 2 1 2 3 3 2 3 1 2 2 1 2 3 3 3 1 3 2 2 2 2 2 2 2 2 3 3 1 2 2 2 1 3 3 1 3 2 2 3 2 2 3 2 1 2 1 3 1 3 3 1 2 1 1 3 1 3 1

output:

33
7 21 53
8 25 54
9 31 55
12 39 56
13 41 57
15 46 67
16 49 68
17 50 72
22 59 75
24 61 79
27 63 84
29 65 87
32 70 89
33 71 90
36 80 94
37 81 95
40 85 97
0 1 48
4 11 44
2 5 51
6 18 45
3 10 28
47 64 86
14 69 88
30 43 66
19 77 91
34 52 73
20 78 93
35 58 74
23 83 96
38 60 76
26 92 98
42 62 82

result:

ok count=33

Test #83:

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

input:

96
3 3 3 2 2 1 2 3 1 3 3 1 3 2 1 2 1 3 2 1 2 1 2 1 2 2 2 1 1 1 3 2 3 3 3 3 1 2 3 3 1 1 3 2 3 1 3 1 2 3 1 3 2 2 2 1 1 1 2 2 1 1 2 3 3 2 1 2 2 1 2 2 2 3 3 3 1 3 3 2 2 3 1 3 2 1 2 3 1 1 2 3 1 1 1 3

output:

32
1 4 47
9 20 56
10 22 57
12 25 61
14 26 63
16 31 64
17 37 66
21 48 73
23 52 74
27 53 75
29 58 77
33 65 82
35 68 85
36 70 87
38 71 88
39 72 89
40 79 91
42 84 93
44 86 94
45 90 95
0 3 50
5 13 46
2 6 55
8 18 49
7 24 60
11 15 51
19 59 78
30 43 69
28 62 81
32 54 76
34 80 92
41 67 83

result:

ok count=32

Test #84:

score: 0
Accepted
time: 3ms
memory: 7580kb

input:

3000
2 3 2 3 3 1 2 3 1 3 2 1 1 2 3 2 2 2 3 1 2 1 3 2 3 2 1 2 3 3 2 1 3 3 3 3 3 3 2 1 1 2 2 1 1 2 3 1 1 2 2 3 3 1 2 2 3 2 1 1 1 3 1 2 2 3 3 1 1 1 3 2 1 2 1 3 2 2 1 1 2 3 3 3 3 2 3 1 2 2 3 2 3 1 3 3 3 3 1 3 2 2 2 2 1 3 2 2 2 1 2 2 3 2 2 1 1 1 1 1 2 3 2 1 2 3 3 3 2 3 3 3 3 2 3 2 2 2 2 1 3 3 1 1 1 1 2 3...

output:

999
4 10 1485
5 13 1486
11 20 1490
12 23 1491
14 25 1492
18 27 1493
19 30 1495
22 41 1499
24 42 1503
29 50 1507
31 54 1510
34 63 1519
35 64 1520
36 71 1522
37 73 1523
43 80 1529
46 88 1535
58 106 1544
59 107 1545
62 111 1549
66 114 1553
67 120 1554
68 122 1555
69 124 1556
75 136 1562
78 137 1563
79 ...

result:

ok count=999

Test #85:

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

input:

2997
1 3 1 3 2 1 3 3 2 2 2 1 1 2 3 3 3 1 3 2 3 3 2 1 2 3 1 2 2 2 2 1 3 3 2 1 2 2 3 2 2 2 2 1 3 1 3 3 3 3 1 3 3 1 3 1 3 2 3 1 2 3 1 2 2 3 3 1 3 3 3 3 3 3 1 1 1 3 3 1 3 3 1 1 1 3 2 3 3 2 3 3 3 1 3 3 2 1 1 1 2 1 1 1 1 3 3 3 3 2 3 1 3 3 2 1 3 1 3 1 1 3 2 1 2 3 1 2 2 2 3 1 3 2 2 3 2 3 3 3 1 2 3 2 1 1 3 1...

output:

995
3 10 1496
7 22 1499
14 28 1502
15 29 1504
16 30 1505
17 34 1506
18 36 1507
20 37 1509
23 40 1514
26 42 1516
31 57 1517
32 60 1519
33 63 1520
45 100 1531
46 109 1532
48 122 1534
50 127 1536
51 128 1537
54 134 1543
55 136 1544
56 141 1545
58 143 1547
65 163 1552
66 167 1553
67 170 1555
70 176 1560...

result:

ok count=995

Test #86:

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

input:

18
2 1 2 2 2 2 1 3 1 3 3 3 2 2 2 2 3 2

output:

2
1 2 11
6 12 16

result:

ok count=2

Test #87:

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

input:

17
1 2 2 2 2 1 1 1 1 3 2 2 1 2 1 2 2

output:

1
0 1 9

result:

ok count=1

Test #88:

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

input:

16
1 2 2 2 2 3 3 1 3 3 2 2 2 2 3 2

output:

2
0 1 9
7 10 14

result:

ok count=2

Test #89:

score: 0
Accepted
time: 3ms
memory: 7584kb

input:

90
3 2 3 2 2 1 1 3 2 2 1 1 1 1 1 2 2 1 2 3 3 3 3 3 1 1 3 2 3 2 3 2 3 2 2 3 3 2 1 2 2 2 2 1 3 1 3 3 1 1 1 2 3 1 1 2 3 3 2 3 3 2 2 2 1 2 1 2 1 3 2 3 3 3 1 1 2 1 1 3 1 3 1 1 2 2 1 3 1 3

output:

29
0 1 49
2 3 50
5 8 52
7 15 54
10 16 56
11 18 57
12 27 59
13 29 60
19 34 68
26 55 77
28 58 78
32 62 80
36 65 82
6 9 69
20 37 53
14 39 71
21 31 64
17 40 72
22 33 66
23 42 74
24 41 73
25 61 79
30 51 75
35 67 83
38 63 81
43 76 87
44 70 86
45 85 89
46 84 88

result:

ok count=29

Test #90:

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

input:

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

output:

3
1 3 4
10 11 13
2 6 9

result:

ok count=3

Test #91:

score: 0
Accepted
time: 3ms
memory: 7540kb

input:

18
3 3 3 1 1 3 2 2 1 2 1 2 3 2 2 1 3 1

output:

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

result:

ok count=6

Test #92:

score: 0
Accepted
time: 3ms
memory: 5492kb

input:

16
1 3 3 2 1 3 1 2 2 2 3 1 3 2 1 2

output:

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

result:

ok count=5

Test #93:

score: 0
Accepted
time: 3ms
memory: 7540kb

input:

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

output:

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

result:

ok count=5

Test #94:

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

input:

18
1 3 1 3 2 1 1 3 2 2 2 3 2 3 2 1 1 3

output:

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

result:

ok count=6

Test #95:

score: 0
Accepted
time: 3ms
memory: 7532kb

input:

18
1 3 3 2 1 1 1 2 3 2 1 1 2 3 2 3 2 3

output:

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

result:

ok count=6

Test #96:

score: 0
Accepted
time: 3ms
memory: 7532kb

input:

18
1 2 1 2 3 2 3 3 2 2 3 1 1 3 3 1 2 1

output:

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

result:

ok count=6

Test #97:

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

input:

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

output:

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

result:

ok count=5

Test #98:

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

input:

18
3 2 1 2 1 3 3 1 1 3 2 1 2 3 2 1 2 3

output:

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

result:

ok count=6

Test #99:

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

input:

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

output:

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

result:

ok count=5

Test #100:

score: 0
Accepted
time: 3ms
memory: 7636kb

input:

91
2 1 2 2 1 3 1 2 1 2 2 1 2 3 3 1 2 2 2 1 3 1 3 1 1 3 1 2 1 2 1 3 1 1 3 2 3 1 2 3 2 2 2 2 1 2 1 1 3 2 2 2 1 1 2 3 3 2 3 3 3 3 1 1 3 2 3 3 1 3 3 3 3 3 2 1 2 2 2 3 2 3 2 1 3 1 3 1 3 1 1

output:

29
4 7 55
6 10 58
8 12 59
11 16 60
14 18 62
19 29 64
21 38 67
22 40 68
23 41 69
24 42 70
26 45 72
28 49 73
32 54 81
36 74 85
37 76 86
39 77 87
44 78 88
1 2 56
5 9 53
13 27 63
15 17 61
20 50 75
30 35 66
25 57 83
33 43 71
31 80 89
46 51 79
34 82 90
47 65 84

result:

ok count=29

Test #101:

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

input:

92
3 1 3 3 3 3 3 1 3 2 1 3 3 3 1 1 1 2 2 1 2 1 2 2 2 3 2 1 3 3 2 3 3 2 3 3 2 3 3 2 2 1 2 2 3 3 2 2 2 3 2 1 3 2 1 2 1 1 1 1 1 3 1 3 1 2 1 1 2 2 2 2 3 1 1 3 2 1 1 1 1 1 1 3 1 2 2 3 3 2 2 2

output:

29
3 20 54
4 22 56
5 23 57
6 24 58
8 30 60
10 33 61
11 36 62
13 40 64
16 46 72
28 55 78
29 65 79
31 68 80
32 69 81
34 70 82
37 76 84
41 86 88
0 17 51
1 9 49
2 26 59
7 18 52
12 42 66
14 39 63
15 50 75
25 43 67
19 71 83
35 47 73
21 85 87
38 48 74
45 53 77

result:

ok count=29

Test #102:

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

input:

93
1 1 3 1 1 3 1 1 2 3 1 1 1 2 3 3 2 1 1 3 1 3 3 2 3 3 1 3 2 2 3 3 1 3 1 1 1 2 2 3 1 2 3 1 3 3 2 3 2 3 2 3 2 3 2 3 3 2 1 3 2 2 1 1 1 2 1 1 2 2 2 1 1 2 3 1 2 2 3 3 2 1 2 2 1 2 2 2 2 3 3 2 2

output:

28
1 13 42
2 16 43
3 23 44
4 28 45
6 37 49
7 38 51
10 46 55
11 48 56
15 54 62
19 61 66
21 68 71
22 69 72
25 73 75
26 76 78
30 80 81
31 82 84
32 83 89
0 29 47
5 8 40
9 50 58
12 41 53
14 57 63
17 52 59
18 70 74
24 60 64
20 77 79
27 65 67
36 85 90

result:

ok count=28

Test #103:

score: 0
Accepted
time: 3ms
memory: 7520kb

input:

94
3 3 1 1 3 2 1 3 2 1 2 1 1 2 2 2 2 3 2 2 1 1 3 1 2 1 2 3 3 3 2 2 1 3 2 1 2 2 1 2 3 1 2 1 2 1 3 1 3 1 3 3 2 2 2 1 1 3 2 2 3 3 3 2 2 3 3 3 2 3 2 1 2 2 1 1 2 1 1 1 3 2 2 1 3 3 1 3 1 3 3 3 2 1

output:

30
0 5 49
2 10 51
4 14 56
6 15 57
9 18 61
11 19 62
12 24 65
20 30 67
21 31 69
22 34 71
27 39 77
28 42 78
29 44 79
32 52 80
33 53 83
35 54 84
38 58 85
40 59 86
41 63 87
45 68 89
47 72 91
48 73 93
1 13 55
3 8 50
7 16 74
23 36 60
17 37 75
25 26 66
43 70 90
46 64 88

result:

ok count=30

Test #104:

score: 0
Accepted
time: 3ms
memory: 7528kb

input:

94
3 2 3 2 1 2 1 3 3 2 1 3 2 3 1 3 2 1 2 2 2 3 3 1 3 3 1 2 1 1 1 2 3 2 1 2 2 2 2 2 3 1 3 3 2 3 3 3 1 1 1 2 1 1 1 3 3 3 1 1 3 1 3 1 2 3 3 2 1 1 2 3 2 1 2 2 3 1 3 3 1 1 1 3 2 3 1 2 2 2 2 3 1 1

output:

29
0 1 54
4 5 56
6 9 57
7 12 58
8 16 59
10 18 60
11 19 61
17 33 66
21 35 68
22 36 69
23 37 71
24 38 73
28 51 78
29 64 79
32 70 81
41 75 85
42 84 86
45 88 92
46 89 93
2 3 63
14 27 55
13 20 77
26 44 62
15 67 80
30 31 65
25 72 82
34 39 76
53 74 83
52 87 91

result:

ok count=29

Test #105:

score: 0
Accepted
time: 3ms
memory: 7540kb

input:

96
2 3 2 1 1 1 1 3 3 2 2 1 2 1 3 3 3 2 3 2 1 3 2 1 2 3 2 2 3 2 1 2 2 1 1 3 1 2 3 3 3 3 3 1 1 2 1 1 2 2 2 1 3 3 1 1 3 2 3 1 1 3 2 1 1 1 2 1 3 2 2 3 3 2 2 3 3 1 1 1 3 1 3 3 3 3 1 3 3 2 2 2 1 1 1 2

output:

28
5 12 61
7 19 64
8 22 65
13 26 68
21 45 78
28 50 81
30 57 82
33 62 83
34 66 84
40 89 92
41 90 93
42 91 94
1 2 59
3 9 58
4 10 71
14 27 60
6 29 72
15 17 63
11 31 75
16 24 67
18 37 77
20 32 76
23 49 80
25 48 79
35 70 86
36 69 85
55 73 87
54 74 88

result:

ok count=28

Test #106:

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

input:

98
2 3 2 1 2 2 1 3 3 3 2 1 3 1 1 2 2 2 2 1 1 2 2 1 2 1 3 2 1 3 3 1 2 1 2 1 1 3 2 1 2 3 1 2 3 3 3 3 2 2 3 1 3 2 1 1 1 3 3 1 3 2 2 1 3 1 3 3 3 1 1 2 1 1 2 3 2 3 2 1 3 1 1 2 3 1 3 3 2 3 3 1 3 1 3 1 3 2

output:

27
6 10 66
9 17 69
12 21 72
14 24 75
19 27 77
23 34 80
26 40 82
28 43 84
29 48 85
31 53 87
33 61 89
35 62 90
1 2 65
3 4 64
7 18 70
11 15 67
8 22 73
13 16 68
20 49 86
30 32 79
25 74 92
37 38 81
36 78 94
41 71 91
39 88 96
44 76 93
60 83 95

result:

ok count=27

Test #107:

score: 0
Accepted
time: 3ms
memory: 7584kb

input:

100
1 3 1 3 1 1 2 3 1 2 2 2 1 3 3 3 3 1 2 3 1 1 3 2 2 2 3 3 2 1 1 3 1 3 2 2 1 1 1 3 1 3 2 3 2 2 2 1 3 3 1 1 1 1 1 3 2 2 2 3 3 2 1 3 2 3 3 1 1 1 2 2 2 2 2 1 1 3 2 3 2 3 1 3 1 1 3 3 2 1 2 2 3 3 3 3 1 1 3 1

output:

30
0 6 55
2 10 60
3 11 62
4 18 63
5 23 65
13 34 69
14 35 75
15 42 76
17 45 79
21 57 83
22 58 84
26 61 85
29 70 87
32 73 93
36 78 95
1 25 67
8 9 59
7 28 68
12 24 66
16 56 82
20 44 77
19 71 89
30 46 81
27 80 96
37 64 86
31 88 97
38 72 92
33 91 99
40 74 94
54 90 98

result:

ok count=30

Test #108:

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

input:

100
1 1 1 1 1 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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
0 29 58

result:

ok count=1

Test #109:

score: 0
Accepted
time: 3ms
memory: 7608kb

input:

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 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 1 2 2 2 2 2 2

output:

1
29 30 93

result:

ok count=1

Test #110:

score: 0
Accepted
time: 3ms
memory: 7580kb

input:

99
1 1 3 3 2 1 2 2 2 2 1 2 1 3 1 3 3 1 3 3 2 2 2 1 2 2 2 2 2 2 1 2 1 2 3 2 3 2 1 2 1 3 1 2 2 1 2 3 2 2 1 3 2 1 2 3 2 2 1 2 3 1 1 3 3 3 3 3 3 1 1 3 1 3 1 1 1 3 1 1 3 1 3 3 1 3 3 3 2 1 1 3 3 2 3 3 1 2 1

output:

33
0 4 63
1 6 64
5 9 67
10 11 68
13 21 70
14 22 71
15 24 72
18 27 75
19 28 76
23 29 77
36 37 81
38 39 82
40 43 83
41 44 84
42 46 85
45 48 86
51 54 90
53 56 91
58 59 94
2 7 69
12 20 65
3 8 74
17 26 66
16 25 78
30 31 73
32 33 80
34 35 79
47 49 89
50 52 87
55 57 61
92 93 96
60 97 98
62 88 95

result:

ok count=33

Test #111:

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

input:

96
3 2 1 2 3 1 2 1 2 1 2 2 1 1 2 2 3 2 1 3 2 2 1 2 3 2 1 2 3 3 3 3 1 2 2 2 2 2 1 1 1 1 3 1 2 1 1 3 3 1 3 3 1 3 3 1 1 1 3 3 3 1 3 1 1 3 3 1 3 3 3 3 2 1 2 3 2 3 2 3 2 1 2 1 2 3 2 3 2 1 2 3 2 1 2 1

output:

32
0 1 52
2 3 53
12 14 58
13 15 59
24 25 64
26 27 65
29 34 67
32 37 70
38 44 71
40 74 75
41 76 77
46 84 85
48 88 89
49 90 91
50 92 93
51 94 95
4 8 55
5 6 54
7 10 60
16 17 56
9 11 62
19 21 57
18 20 66
28 33 61
22 23 68
30 35 63
31 36 39
69 72 73
42 80 81
43 78 79
45 86 87
47 82 83

result:

ok count=32

Test #112:

score: 0
Accepted
time: 3ms
memory: 7588kb

input:

99
3 2 1 2 1 1 1 3 2 3 1 2 1 2 3 3 3 1 3 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 1 3 1 1 1 1 1 1 3 2 3 2 3 2 2 3 1 2 2 2 2 3 2 1 1 1 3 2 3 2 2 2 3 1 3 2 1 2 3 2 2 2 2 2 2 2 1 1 3 1 1 3 3 2 3 2 2 2 3 2 2 3 1 3 1

output:

33
0 1 38
6 13 42
10 47 49
15 52 57
16 53 58
22 65 68
23 69 70
25 73 80
26 74 81
29 77 84
30 78 85
31 79 86
32 87 88
33 89 92
34 90 95
35 91 96
36 93 97
2 3 7
39 43 44
4 8 9
40 45 46
5 11 14
41 51 55
12 56 60
18 48 50
17 61 62
19 54 59
20 64 67
21 63 66
24 76 83
28 71 72
27 94 98
37 75 82

result:

ok count=33

Test #113:

score: 0
Accepted
time: 3ms
memory: 7532kb

input:

93
3 2 3 2 3 2 1 2 3 2 3 2 3 2 3 1 3 1 3 1 1 1 3 3 1 3 3 3 1 1 3 1 1 1 3 3 1 3 3 1 2 2 3 1 1 2 3 2 1 3 3 1 3 2 2 2 2 2 2 2 3 2 3 3 1 1 1 3 1 2 2 3 1 2 1 2 1 2 3 2 2 1 1 2 2 2 2 2 3 1 1 1 1

output:

31
2 3 39
8 9 44
12 13 48
15 41 50
16 45 51
17 47 52
19 54 62
20 55 63
22 57 65
23 58 66
24 59 67
25 61 68
27 70 72
33 83 88
34 84 89
35 85 90
37 87 92
0 1 43
6 7 38
4 5 21
42 56 64
10 11 28
46 73 74
14 75 76
29 40 49
18 79 81
31 53 60
26 80 82
32 69 71
30 86 91
36 77 78

result:

ok count=31

Test #114:

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

input:

90
3 3 3 3 2 2 2 2 3 2 1 2 3 2 3 2 1 1 2 2 3 3 2 2 1 3 2 2 1 2 1 1 3 1 3 2 3 3 3 1 1 1 3 1 3 2 3 1 1 3 1 2 1 1 3 3 3 1 2 1 1 2 1 3 3 3 1 1 3 1 2 2 1 2 1 3 2 3 2 2 3 1 2 1 2 1 2 1 2 3

output:

30
0 4 47
1 5 48
3 7 50
8 9 52
16 18 56
20 22 59
21 23 60
28 29 64
30 35 65
32 51 67
33 58 68
34 61 69
36 70 72
37 71 74
39 76 77
40 78 80
42 82 83
44 86 87
2 6 53
10 11 49
12 13 57
17 19 54
14 15 62
24 26 55
25 27 66
31 45 63
38 79 81
41 73 75
43 88 89
46 84 85

result:

ok count=30

Test #115:

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

input:

100
2 1 2 2 2 3 2 2 1 2 1 2 2 1 2 2 2 2 1 2 2 3 2 2 2 2 2 1 2 2 2 3 3 1 1 1 1 1 1 1 3 3 3 1 1 3 1 1 1 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 3 3 2 3 2 2 1 2 2 3 2 2 2 2 2 2 3 1 2 1 1 1 1 2 2 3 2 2 3 2 2 2 2 1 2 2

output:

20
10 11 61
18 19 63
27 28 65
32 68 70
33 69 73
34 71 80
42 82 97
1 2 59
5 6 58
8 9 64
21 22 60
13 14 31
62 66 67
35 78 89
40 72 81
36 79 92
41 74 83
56 75 84
55 76 85
54 77 86

result:

ok count=20

Test #116:

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

input:

99
2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 3 2 2 2 2 2 3 2 1 2 3 2 2 2 2 2 2 1 1 1 1 1 3 3 1 1 3 3 1 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 1 1 3 3 3 3 3 2 2 3 3 1 2 3 2 2 2 1 2 1 3 1 1 2 1 2 1 1 1 2 3 2 2 2 2 2 1 1 2

output:

18
7 8 65
9 10 66
35 72 80
38 76 84
39 78 86
43 91 96
16 17 71
24 25 69
22 23 77
33 67 70
26 27 79
34 68 73
36 89 90
42 74 81
64 75 82
63 83 87
62 85 88
58 92 97

result:

ok count=18

Test #117:

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

input:

98
3 2 2 2 2 2 2 3 3 2 2 2 1 2 1 2 2 2 2 2 2 3 1 3 1 3 2 3 2 1 2 2 1 1 1 3 3 3 3 1 3 1 1 1 3 3 1 3 3 3 1 3 1 3 3 1 3 3 1 1 3 3 3 3 2 2 2 2 2 2 2 2 2 1 3 2 2 2 3 2 2 2 2 3 2 1 2 2 2 2 2 2 2 2 2 2 2 1

output:

15
0 1 55
22 28 61
24 31 63
25 64 73
29 66 78
32 67 83
7 9 58
12 13 56
8 10 59
14 15 57
21 26 33
60 68 85
23 30 34
62 69 97
52 65 74

result:

ok count=15

Test #118:

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

input:

97
2 2 1 3 2 2 1 2 2 2 1 2 1 1 1 1 2 2 3 2 3 1 2 2 2 3 2 3 3 2 2 2 1 3 1 1 1 1 1 1 1 1 3 3 3 1 3 1 1 1 1 3 1 1 1 3 1 3 1 3 1 1 3 1 2 2 1 2 1 2 2 2 2 2 1 3 2 2 1 3 1 2 3 1 2 2 1 2 2 2 2 3 3 2 2 1 1

output:

21
13 17 55
15 22 57
18 23 58
25 29 61
28 31 63
33 65 68
35 69 75
37 71 79
39 73 82
44 85 95
2 5 51
3 4 50
6 7 59
20 24 52
10 11 62
27 30 53
12 16 42
54 81 91
14 19 43
56 84 92
21 26 46

result:

ok count=21

Test #119:

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

input:

99
1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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:

33
0 33 66
1 34 67
2 35 68
3 36 69
4 37 70
5 38 71
6 39 72
7 40 73
8 41 74
9 42 75
10 43 76
11 44 77
12 45 78
13 46 79
14 47 80
15 48 81
16 49 82
17 50 83
18 51 84
19 52 85
20 53 86
21 54 87
22 55 88
23 56 89
24 57 90
25 58 91
26 59 92
27 60 93
28 61 94
29 62 95
30 63 96
31 64 97
32 65 98

result:

ok count=33

Test #120:

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

input:

99
3 2 3 3 1 2 1 1 1 1 2 2 3 1 3 1 3 3 2 3 3 2 3 3 1 2 3 3 1 1 1 2 1 1 1 1 3 1 1 2 1 2 1 2 3 3 2 3 1 2 2 1 2 3 3 3 1 3 2 2 2 2 2 2 2 2 3 3 1 2 2 2 1 3 3 1 3 2 2 3 2 2 3 2 1 2 1 3 1 3 3 1 2 1 1 3 1 3 1

output:

33
7 21 53
8 25 54
9 31 55
12 39 56
13 41 57
15 46 67
16 49 68
17 50 72
22 59 75
24 61 79
27 63 84
29 65 87
32 70 89
33 71 90
36 80 94
37 81 95
40 85 97
0 1 48
4 11 44
2 5 51
6 18 45
3 10 28
47 64 86
14 69 88
30 43 66
19 77 91
34 52 73
20 78 93
35 58 74
23 83 96
38 60 76
26 92 98
42 62 82

result:

ok count=33

Test #121:

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

input:

96
3 3 3 2 2 1 2 3 1 3 3 1 3 2 1 2 1 3 2 1 2 1 2 1 2 2 2 1 1 1 3 2 3 3 3 3 1 2 3 3 1 1 3 2 3 1 3 1 2 3 1 3 2 2 2 1 1 1 2 2 1 1 2 3 3 2 1 2 2 1 2 2 2 3 3 3 1 3 3 2 2 3 1 3 2 1 2 3 1 1 2 3 1 1 1 3

output:

32
1 4 47
9 20 56
10 22 57
12 25 61
14 26 63
16 31 64
17 37 66
21 48 73
23 52 74
27 53 75
29 58 77
33 65 82
35 68 85
36 70 87
38 71 88
39 72 89
40 79 91
42 84 93
44 86 94
45 90 95
0 3 50
5 13 46
2 6 55
8 18 49
7 24 60
11 15 51
19 59 78
30 43 69
28 62 81
32 54 76
34 80 92
41 67 83

result:

ok count=32

Test #122:

score: 0
Accepted
time: 3ms
memory: 7608kb

input:

3000
2 3 2 3 3 1 2 3 1 3 2 1 1 2 3 2 2 2 3 1 2 1 3 2 3 2 1 2 3 3 2 1 3 3 3 3 3 3 2 1 1 2 2 1 1 2 3 1 1 2 2 3 3 1 2 2 3 2 1 1 1 3 1 2 2 3 3 1 1 1 3 2 1 2 1 3 2 2 1 1 2 3 3 3 3 2 3 1 2 2 3 2 3 1 3 3 3 3 1 3 2 2 2 2 1 3 2 2 2 1 2 2 3 2 2 1 1 1 1 1 2 3 2 1 2 3 3 3 2 3 3 3 3 2 3 2 2 2 2 1 3 3 1 1 1 1 2 3...

output:

999
4 10 1485
5 13 1486
11 20 1490
12 23 1491
14 25 1492
18 27 1493
19 30 1495
22 41 1499
24 42 1503
29 50 1507
31 54 1510
34 63 1519
35 64 1520
36 71 1522
37 73 1523
43 80 1529
46 88 1535
58 106 1544
59 107 1545
62 111 1549
66 114 1553
67 120 1554
68 122 1555
69 124 1556
75 136 1562
78 137 1563
79 ...

result:

ok count=999

Test #123:

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

input:

2997
1 3 1 3 2 1 3 3 2 2 2 1 1 2 3 3 3 1 3 2 3 3 2 1 2 3 1 2 2 2 2 1 3 3 2 1 2 2 3 2 2 2 2 1 3 1 3 3 3 3 1 3 3 1 3 1 3 2 3 1 2 3 1 2 2 3 3 1 3 3 3 3 3 3 1 1 1 3 3 1 3 3 1 1 1 3 2 3 3 2 3 3 3 1 3 3 2 1 1 1 2 1 1 1 1 3 3 3 3 2 3 1 3 3 2 1 3 1 3 1 1 3 2 1 2 3 1 2 2 2 3 1 3 2 2 3 2 3 3 3 1 2 3 2 1 1 3 1...

output:

995
3 10 1496
7 22 1499
14 28 1502
15 29 1504
16 30 1505
17 34 1506
18 36 1507
20 37 1509
23 40 1514
26 42 1516
31 57 1517
32 60 1519
33 63 1520
45 100 1531
46 109 1532
48 122 1534
50 127 1536
51 128 1537
54 134 1543
55 136 1544
56 141 1545
58 143 1547
65 163 1552
66 167 1553
67 170 1555
70 176 1560...

result:

ok count=995

Test #124:

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

input:

3000
1 1 1 1 1 3 1 1 3 3 1 3 1 1 2 3 1 1 2 1 2 1 3 3 3 1 1 2 1 2 2 3 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 3 3 1 1 2 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 2 3 1 1 1 1 3 3 2 1 3 1 1 2 3 1 2 3 1 1 1 2 1 1 1 1 2 3 2 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 3 1 3 3 1 1 1 1 3 1 1 2 1 1 1 3 3 1 1 1 1 2 1 1 1 1 1 2 3 3 1...

output:

499
3 27 2420
5 30 2424
6 39 2425
7 46 2426
8 51 2428
9 54 2429
11 67 2432
15 84 2435
17 92 2437
23 113 2443
24 128 2444
31 162 2448
34 176 2451
35 181 2452
36 188 2453
48 249 2463
58 281 2472
62 291 2475
63 296 2476
65 311 2478
68 314 2480
72 332 2486
77 377 2491
78 381 2492
81 387 2494
85 409 2497...

result:

ok count=499

Test #125:

score: 0
Accepted
time: 3ms
memory: 7600kb

input:

3000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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
0 1374 2901

result:

ok count=1

Test #126:

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

input:

3000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
1755 1756 2819

result:

ok count=1

Test #127:

score: 0
Accepted
time: 3ms
memory: 7692kb

input:

1500
1 1 1 2 1 1 1 2 2 2 2 2 1 1 3 1 2 2 3 1 2 2 2 2 1 2 1 2 1 1 3 1 2 2 2 2 1 1 3 1 1 2 2 3 2 1 3 1 1 2 2 2 1 2 2 2 2 2 1 2 3 2 3 2 3 2 1 3 2 1 2 3 2 2 3 2 3 1 1 3 1 3 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 1 1 1 3 1 3 1 3 3 1 1 1 3 1 1 3 1 1 1 1 1 3 3 3 3 1 3 1 1 1 1 3 3 3 3 3 3 1 3 1 1 1 3 1 3 1 1 1 1 3 1...

output:

500
1 7 542
4 9 544
5 10 545
12 16 547
14 20 549
15 21 550
18 22 551
26 27 554
31 35 558
36 41 559
38 44 561
40 50 563
58 59 570
60 61 571
62 63 572
69 72 577
71 73 578
74 75 579
77 450 581
78 490 582
80 583 601
83 586 604
84 587 605
85 588 606
86 589 607
89 592 610
90 593 611
94 597 615
96 600 617
...

result:

ok count=500

Test #128:

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

input:

3000
3 1 1 1 1 3 3 2 1 1 1 2 3 1 3 3 3 3 1 1 3 1 3 3 1 1 1 1 1 3 3 1 1 1 1 3 1 3 1 1 3 3 3 3 1 3 1 3 1 3 1 3 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 3 1 1 1 1 3 1 1 1 3 3 1 2 3 3 1 3 3 3 3 3 3 3 1 1 1 1 3 1 3 1 3 3 3 3 1 3 1 1 3 3 1 1 1 3 3 1 3 3 1 3 1 3 1 3 2 3 1 3 1 1 3 1 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2...

output:

1000
0 7 1887
1 11 1888
3 122 1890
8 141 1894
9 142 1895
21 153 1907
22 154 1908
23 155 1909
25 157 1911
27 159 1913
29 161 1915
31 163 1917
33 165 1919
34 166 1920
36 168 1922
37 169 1923
41 173 1927
42 174 1928
43 175 1929
46 178 1932
47 179 1933
51 183 1937
53 185 1939
55 187 1941
58 190 1944
61 ...

result:

ok count=1000

Test #129:

score: 0
Accepted
time: 4ms
memory: 7580kb

input:

3000
1 3 1 1 3 1 1 1 1 3 1 1 3 1 1 1 3 3 3 3 3 1 1 3 1 1 3 1 3 3 1 2 2 3 1 3 3 3 1 3 3 2 3 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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 3 3 3 1 1 1 1 3 1 1 1 3 1 1 1 1 1 3 3 3 3 3 1 3 3 3 1 1 1 3 1 1 3 1 1 3 1 3 3 3 1 1 1 3 3 3 3 3 1 1 1...

output:

1000
0 31 1618
1 32 1619
2 41 1620
4 52 1622
7 55 1625
8 56 1626
9 57 1627
10 58 1628
11 59 1629
12 60 1630
13 61 1631
14 62 1632
15 63 1633
18 66 1636
20 68 1638
26 74 1644
28 76 1646
33 79 1649
39 85 1655
40 86 1656
43 88 1658
45 90 1660
46 91 1661
47 92 1662
48 93 1663
49 94 1665
50 95 1666
96 18...

result:

ok count=1000

Test #130:

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

input:

2997
3 1 2 2 1 1 1 1 1 1 3 1 3 3 1 3 3 3 1 3 1 2 1 1 3 1 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 3 1 1 3 1 3 1 1 3 3 1 3 1 3 3 3 1 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 1 3 1 1 1 1 1 3 3 3 1 3 1 1 3 3 3 1 3 3 1 1 1 3 1 1 3 1 1 3 2 3 3 3 2 3 2 3 1 2 1 1 3 1 1 3 2 2 2 2...

output:

999
0 2 1215
6 27 1219
8 31 1221
11 34 1224
13 36 1226
14 37 1227
15 38 1228
18 41 1231
19 42 1232
22 44 1234
23 45 1235
25 47 1237
51 74 1241
55 78 1245
56 79 1246
59 82 1249
60 83 1250
62 85 1252
63 86 1253
64 87 1254
65 88 1255
66 89 1256
69 92 1259
70 93 1260
71 94 1261
72 95 1262
96 128 1263
97...

result:

ok count=999

Test #131:

score: 0
Accepted
time: 3ms
memory: 7732kb

input:

2994
1 1 2 1 2 1 2 2 3 1 3 3 3 3 1 3 1 1 2 3 3 1 3 3 3 3 1 1 1 3 3 2 3 1 3 1 3 3 1 2 3 1 3 3 3 1 3 1 3 2 3 2 1 1 3 1 1 1 3 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 3 1 1 2 3 3 3 3 3 3 1 3 1 3 1 1 2 1 3 3 3 2 2 3 2 1 3 3 3 1 2 1 1 2 3 3 1 3 2 2 2 2 2 2 2 2...

output:

998
0 2 1925
3 6 1927
5 7 1928
9 31 1930
13 59 1934
16 63 1937
20 66 1940
21 67 1941
22 68 1942
23 69 1943
32 77 1951
33 78 1952
34 79 1953
35 80 1954
36 81 1955
38 83 1957
40 84 1958
41 85 1959
44 88 1962
45 89 1963
46 90 1964
47 91 1965
50 93 1967
55 97 1971
57 99 1973
102 105 1976
108 132 1981
11...

result:

ok count=998

Test #132:

score: 0
Accepted
time: 3ms
memory: 7664kb

input:

3000
1 1 1 3 2 3 2 3 1 1 1 1 2 3 1 2 1 2 1 3 3 2 2 3 3 2 3 2 2 3 3 3 3 3 1 3 2 1 2 3 2 3 3 3 2 1 3 3 3 2 1 1 1 1 2 1 3 1 3 2 2 2 1 2 3 3 3 2 1 3 1 3 2 3 1 3 2 3 3 1 2 1 2 2 3 1 3 2 2 1 1 2 3 1 1 3 1 3 2 2 3 2 2 1 3 2 2 2 3 3 2 3 1 2 2 1 1 1 2 3 2 1 3 2 1 1 1 3 3 1 3 1 3 2 2 1 1 1 1 2 1 2 3 1 2 1 2 2...

output:

1000
1 6 1501
7 21 1507
8 22 1508
9 25 1509
10 27 1510
13 36 1513
18 44 1517
19 49 1519
26 61 1526
29 63 1527
31 72 1530
37 87 1537
39 88 1538
46 102 1551
47 105 1553
51 110 1558
56 120 1563
57 123 1564
58 133 1565
62 134 1566
74 156 1578
75 161 1580
77 165 1581
84 181 1585
85 183 1586
89 190 1590
9...

result:

ok count=1000

Test #133:

score: 0
Accepted
time: 3ms
memory: 7724kb

input:

3000
2 2 1 3 2 2 2 3 2 2 2 2 2 1 2 2 2 2 2 1 3 2 2 2 2 3 2 2 2 2 2 2 1 3 2 2 2 2 2 2 2 2 2 2 1 3 2 2 2 1 2 3 2 3 1 2 2 3 2 3 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 3 2 2 1 2 3 2 1 3 3 2 3 2 2 2 3 1 2 2 2 2 1 2 3 3 1 2 1 1 2 2 2 1 2 2 2 2 2 2 1 2 3 1 2 1 2 2 3 2 2 2 2 2 2 2 2 2 3 1 2 2 2 2 3 2 3 3 1 2 2 1 2...

output:

673
2 4 1672
3 5 1673
13 14 1675
32 34 1679
33 35 1680
45 47 1682
49 50 1683
51 52 1684
53 55 1685
57 58 1687
59 60 1688
73 74 1690
79 80 1692
83 86 1694
85 89 1696
87 90 1697
97 98 1700
100 105 1702
101 106 1703
103 107 1704
104 109 1705
108 110 1706
117 119 1708
118 121 1709
123 124 1711
134 136 1...

result:

ok count=673

Test #134:

score: 0
Accepted
time: 3ms
memory: 7736kb

input:

2999
2 2 3 3 2 1 2 1 1 2 2 3 2 3 2 3 2 2 2 1 2 3 2 2 2 2 1 3 2 3 3 2 1 2 3 2 2 2 2 1 2 2 2 2 2 3 2 2 3 1 2 2 2 3 2 2 2 3 3 2 2 2 3 3 3 2 1 1 2 2 2 1 2 2 1 1 2 2 2 2 2 1 2 2 2 3 2 2 3 3 3 1 1 2 2 3 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 3 3 1 1 2 2 2 2 1 1 2 2 3 2 3 2 3 2 2 2 3 2 2 2 1 2 1 3 2 3 2 2 2 1...

output:

683
3 6 1645
5 9 1646
7 10 1647
11 14 1649
19 20 1652
26 28 1654
27 31 1655
30 35 1657
32 36 1658
39 40 1660
45 46 1661
49 51 1663
57 59 1665
58 60 1666
66 70 1670
67 72 1671
74 76 1673
75 77 1674
81 82 1675
85 86 1676
92 98 1681
95 100 1682
99 101 1683
108 109 1684
112 113 1685
114 118 1686
115 119...

result:

ok count=683

Test #135:

score: 0
Accepted
time: 3ms
memory: 7660kb

input:

2998
2 1 2 1 3 2 2 2 2 2 2 2 1 2 2 2 2 3 3 2 1 2 1 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 3 1 3 2 2 1 2 2 2 3 2 2 2 2 1 2 2 1 2 2 2 2 2 2 2 2 3 2 1 2 3 2 2 3 3 2 2 2 2 1 2 1 2 2 2 2 3 2 3 3 3 1 2 2 2 2 2 3 2 2 2 1 2 2 2 2 2 2 2 3 2 2 3 3 2 1 1 2 2 3 3 2 1 2 2 2 2 2 2 2 2 3 2 1 2 1 2 2 3 1 2 3 2 2 2 2...

output:

629
3 5 1683
4 6 1684
18 21 1687
20 23 1688
42 46 1693
47 50 1696
68 69 1700
76 78 1704
92 96 1710
99 100 1712
115 119 1716
117 120 1717
118 123 1718
122 126 1720
135 136 1723
137 138 1724
140 142 1725
143 145 1727
153 155 1729
154 156 1730
158 159 1731
167 169 1733
168 170 1734
174 175 1735
176 177...

result:

ok count=629

Test #136:

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

input:

2997
1 1 3 2 3 3 2 2 1 2 2 2 2 2 2 1 3 3 2 2 2 3 2 2 2 2 3 2 1 3 2 3 2 3 2 3 3 2 2 2 2 2 2 2 1 1 2 2 3 3 2 1 2 2 3 3 2 2 1 1 1 2 1 2 1 2 2 1 2 1 3 1 3 3 1 2 2 2 2 2 2 1 2 2 2 3 2 2 3 2 2 1 2 2 3 2 1 2 2 2 3 2 2 1 3 1 2 2 2 1 3 2 2 1 2 3 2 3 1 3 2 2 3 2 2 2 2 1 2 2 2 1 1 2 3 2 2 2 3 2 3 1 2 2 3 2 2 2...

output:

712
0 3 1641
17 20 1649
21 22 1650
26 27 1651
28 30 1652
31 34 1654
35 38 1656
36 39 1657
44 46 1658
45 47 1659
51 53 1662
54 56 1663
58 61 1665
60 65 1667
62 66 1668
64 68 1669
71 78 1673
73 80 1675
74 82 1676
81 83 1677
91 92 1680
96 97 1682
103 106 1684
104 107 1685
113 114 1689
119 123 1693
122 ...

result:

ok count=712

Test #137:

score: 0
Accepted
time: 3ms
memory: 7612kb

input:

3000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

1000
0 1000 2000
1 1001 2001
2 1002 2002
3 1003 2003
4 1004 2004
5 1005 2005
6 1006 2006
7 1007 2007
8 1008 2008
9 1009 2009
10 1010 2010
11 1011 2011
12 1012 2012
13 1013 2013
14 1014 2014
15 1015 2015
16 1016 2016
17 1017 2017
18 1018 2018
19 1019 2019
20 1020 2020
21 1021 2021
22 1022 2022
23 102...

result:

ok count=1000

Test #138:

score: 0
Accepted
time: 29ms
memory: 17312kb

input:

600000
1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
0 2 599999

result:

ok count=1

Test #139:

score: 0
Accepted
time: 84ms
memory: 21924kb

input:

600000
1 1 3 1 2 1 2 3 2 1 1 2 3 2 2 1 2 1 1 3 2 1 1 2 1 3 3 3 1 2 3 3 1 1 1 3 1 3 2 2 1 3 3 2 3 2 3 2 2 2 1 1 1 1 2 3 1 1 1 2 1 1 1 3 3 3 3 3 1 1 3 2 3 2 2 3 2 1 2 3 2 1 3 3 3 3 3 1 1 1 3 3 1 1 1 3 3 2 2 1 2 3 2 2 3 3 2 2 2 2 3 1 1 2 1 1 2 1 1 3 3 3 1 3 3 1 2 2 3 2 2 1 2 1 1 1 1 2 1 2 1 3 1 2 2 1 3...

output:

200000
1 6 299951
2 8 299953
3 11 299954
18 39 299966
22 47 299972
24 48 299973
26 54 299975
28 71 299977
30 73 299978
31 74 299979
32 76 299980
33 78 299981
36 98 299985
40 102 299987
50 109 299994
52 116 299998
56 129 300002
58 132 300004
60 137 300008
61 139 300011
62 143 300012
64 150 300014
66 ...

result:

ok count=200000

Test #140:

score: 0
Accepted
time: 78ms
memory: 23300kb

input:

600000
3 1 2 3 3 2 1 1 1 2 3 2 2 3 3 3 2 2 2 2 2 3 1 3 3 1 2 1 3 1 3 1 2 3 3 3 1 1 2 1 2 1 1 3 1 3 1 2 1 1 3 2 2 2 3 2 2 2 1 1 1 3 2 1 1 1 2 3 1 2 1 1 2 3 3 3 2 3 2 2 2 1 1 2 3 1 2 1 3 2 2 3 1 1 3 1 2 2 2 1 3 3 3 1 1 2 1 1 3 3 3 2 2 3 1 2 2 1 3 1 1 2 3 3 3 3 3 1 1 3 3 3 2 1 1 3 3 2 2 2 3 2 2 3 1 1 3...

output:

200000
3 9 299984
4 11 299985
8 17 299989
10 18 299990
13 19 299991
14 20 299993
21 32 299996
22 38 299997
23 40 299998
24 47 300000
25 51 300001
29 55 300004
31 57 300007
34 66 300010
35 69 300011
42 80 300018
46 90 300025
48 96 300026
54 105 300034
60 115 300038
61 116 300041
64 132 300044
65 137 ...

result:

ok count=200000

Test #141:

score: 0
Accepted
time: 12ms
memory: 15764kb

input:

210000
2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

4999
5 156 204894
16 613 204905
24 849 204913
47 1759 204935
114 4421 205000
122 4682 205008
130 4947 205016
132 5027 205018
200 7518 205086
251 9625 205138
257 9727 205144
267 10117 205154
297 11456 205184
332 12955 205218
345 13427 205232
347 13436 205234
354 13836 205241
366 14243 205253
395 1520...

result:

ok count=4999

Test #142:

score: 0
Accepted
time: 5ms
memory: 7864kb

input:

15000
1 2 1 1 1 2 3 1 2 3 3 3 2 2 1 2 1 3 3 2 3 2 1 1 2 3 3 1 1 2 1 3 2 3 1 1 2 2 2 1 3 1 2 3 3 2 2 1 2 3 3 2 2 2 2 3 3 3 2 3 3 2 1 2 3 3 1 3 3 1 1 3 3 3 2 3 2 1 3 1 1 2 1 3 1 2 1 1 2 1 2 3 2 2 3 3 2 2 1 3 3 2 3 1 2 2 3 3 2 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 1 3 1 3 2 2 2 2 3 2 1 2 2 3 3 1 2 3 1 1 3 1 2 ...

output:

5000
0 1 7454
7 15 7465
9 19 7467
14 29 7470
16 32 7475
27 51 7490
28 52 7491
30 53 7492
31 54 7493
34 61 7498
39 74 7501
41 81 7503
44 88 7505
55 96 7512
57 101 7517
62 108 7520
68 129 7526
69 130 7527
70 131 7528
71 133 7529
75 140 7534
77 146 7535
78 147 7537
79 148 7538
82 156 7541
83 161 7545
8...

result:

ok count=5000

Test #143:

score: 0
Accepted
time: 81ms
memory: 22848kb

input:

600000
3 2 1 3 1 1 2 3 1 1 2 1 2 2 1 1 2 1 1 2 2 2 1 2 3 3 2 2 1 2 3 1 2 1 2 2 3 2 2 1 3 1 2 2 3 1 2 1 2 3 1 2 1 1 2 3 2 2 2 1 2 3 3 1 2 1 3 2 3 1 3 2 1 2 3 2 1 1 3 1 2 3 2 1 2 3 1 3 2 1 1 1 2 2 1 1 1 2 1 3 2 2 2 3 2 2 2 3 1 2 1 3 2 3 3 2 3 1 1 3 3 3 1 1 3 1 1 1 1 1 2 1 3 2 2 3 1 2 1 1 1 2 2 1 2 2 2...

output:

200000
0 1 299818
2 6 299821
3 10 299828
5 13 299830
11 21 299834
14 23 299837
17 27 299840
22 32 299844
24 34 299845
28 37 299847
36 46 299856
40 51 299858
41 54 299859
44 56 299861
47 58 299863
50 64 299866
53 71 299870
61 80 299873
62 82 299874
65 88 299877
68 93 299879
70 100 299881
77 105 29988...

result:

ok count=200000

Test #144:

score: 0
Accepted
time: 59ms
memory: 22324kb

input:

600000
1 1 3 3 1 1 3 1 3 1 3 3 1 3 3 1 3 3 1 3 1 3 3 3 3 1 3 1 3 3 1 1 1 1 3 1 1 3 3 1 3 1 1 1 3 3 3 3 1 3 1 3 1 3 3 1 1 3 3 3 3 3 1 1 1 1 3 1 1 3 3 3 3 1 1 1 3 1 3 3 1 1 3 1 3 1 1 3 1 1 3 3 3 3 1 1 3 3 1 1 3 3 1 1 1 1 3 3 3 1 1 1 1 1 3 1 1 3 1 1 3 1 1 3 1 3 1 3 3 1 3 3 1 1 1 1 3 1 3 3 3 3 1 3 3 1 1...

output:

200000
1 2611 351502
3 8354 351504
5 11205 351506
6 11334 351507
9 11343 351510
10 11344 351511
11 11345 351512
16 11350 351517
17 11351 351518
18 11352 351519
19 11353 351520
20 11354 351521
27 11361 351528
28 11362 351529
31 11365 351532
32 11366 351533
33 11367 351534
34 11368 351535
44 11378 351...

result:

ok count=200000

Test #145:

score: 0
Accepted
time: 78ms
memory: 24332kb

input:

600000
3 1 3 3 3 1 1 1 1 3 3 1 3 1 3 1 1 3 3 3 1 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 1 1 3 3 3 1 1 1 3 3 1 1 3 3 1 1 3 1 1 1 1 1 3 3 1 1 1 3 1 3 3 3 1 1 3 3 1 3 1 1 3 3 1 3 1 3 3 3 1 1 3 3 3 1 1 1 3 3 1 1 1 3 3 1 1 3 1 3 1 1 3 3 1 1 1 3 1 1 1 3 1 1 3 3 3 3 1 1 1 1 1 3 3 1 3 3 1 1 1 1 1 3 1 3 3 1 1 3 1 3 1...

output:

200000
0 6995 338541
1 8232 338542
8 10460 338549
9 10461 338550
10 10462 338551
13 10465 338554
15 10467 338556
16 10468 338557
18 10470 338559
19 10471 338560
21 10473 338562
23 10475 338564
24 10476 338565
25 10477 338566
26 10478 338567
27 10479 338568
29 10481 338570
30 10482 338571
33 10485 33...

result:

ok count=200000

Test #146:

score: 0
Accepted
time: 85ms
memory: 22852kb

input:

600000
1 3 3 3 1 3 1 3 1 1 3 1 3 1 3 3 3 1 1 1 3 1 1 1 3 1 3 3 3 1 3 3 3 3 3 3 1 1 1 3 3 3 1 1 3 3 3 3 3 1 3 3 3 3 1 3 3 3 3 1 1 1 1 1 3 3 3 3 1 1 1 3 3 1 1 1 3 1 1 1 1 3 3 3 3 3 1 3 3 3 1 3 1 3 3 1 1 3 3 3 1 1 3 1 3 3 1 1 1 3 3 1 1 1 1 3 1 3 1 1 1 3 1 3 3 3 1 3 3 1 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 3 3...

output:

200000
0 619 342941
1 1022 342942
4 1759 342945
5 2438 342946
8 2521 342949
10 2525 342951
11 2526 342952
13 2528 342954
19 2534 342960
20 2535 342961
21 2536 342962
23 2538 342964
24 2539 342965
26 2541 342967
30 2545 342971
31 2546 342972
32 2547 342973
33 2548 342974
34 2549 342975
35 2550 342976...

result:

ok count=200000

Test #147:

score: 0
Accepted
time: 4ms
memory: 10972kb

input:

60000
1 1 1 3 3 1 3 3 1 1 1 3 1 3 1 3 1 3 1 1 1 1 3 3 1 1 1 3 1 1 3 1 1 3 3 1 3 3 3 1 1 1 3 1 1 3 1 1 1 3 3 3 3 3 1 3 3 1 1 1 1 1 1 3 3 1 1 1 3 1 1 3 1 1 1 3 3 3 3 1 1 1 1 1 3 3 3 1 3 3 1 3 3 1 3 1 3 3 1 1 3 1 3 1 3 1 3 1 3 3 3 3 3 3 1 1 3 3 3 1 1 1 1 1 1 1 3 3 3 3 1 1 3 3 3 3 3 3 3 1 1 1 3 3 3 3 1 ...

output:

20000
0 167 27463
1 289 27464
4 391 27467
5 397 27468
9 428 27472
10 433 27473
15 438 27478
16 439 27479
23 446 27487
27 450 27491
30 453 27494
32 455 27496
33 456 27497
34 457 27498
39 462 27503
41 464 27505
42 465 27506
45 468 27509
46 469 27510
47 470 27511
51 474 27515
54 477 27518
56 479 27520
...

result:

ok count=20000

Test #148:

score: 0
Accepted
time: 10ms
memory: 9244kb

input:

90000
3 1 1 3 3 1 3 3 3 3 3 3 1 1 3 3 1 1 1 3 3 1 3 1 1 1 3 3 3 3 3 1 1 1 1 1 1 1 3 3 3 1 1 3 3 3 1 1 1 3 3 1 3 1 1 1 3 1 1 3 3 3 1 1 1 1 3 3 3 3 1 1 1 1 1 1 1 3 3 3 3 3 3 1 1 1 3 1 1 3 3 1 1 3 3 1 1 3 3 1 1 3 3 1 1 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 3 3 1 3 1 3 1 3 1 3 1 3 1 3 3 3 1 1 3 3 3 3 1 3 3 1 ...

output:

30000
0 254 31570
2 283 31572
5 315 31575
6 319 31576
8 321 31578
9 322 31579
10 323 31580
11 324 31581
12 325 31582
13 326 31583
15 328 31585
19 332 31589
20 333 31590
21 334 31591
23 336 31593
25 338 31595
26 339 31596
30 343 31600
34 347 31604
38 351 31608
41 354 31611
44 357 31614
45 358 31615
5...

result:

ok count=30000

Test #149:

score: 0
Accepted
time: 11ms
memory: 10176kb

input:

120000
3 3 1 3 3 3 3 3 3 1 3 1 1 3 1 1 1 3 1 3 3 3 3 3 1 1 1 1 1 1 1 3 3 1 3 3 3 1 1 1 3 3 1 1 1 3 1 1 3 1 1 3 3 1 3 1 1 1 1 1 1 3 1 3 1 3 1 1 3 1 3 3 3 3 1 1 1 1 3 3 3 3 3 3 3 3 1 1 3 1 1 1 3 1 3 3 1 1 1 3 1 3 3 3 3 3 3 3 3 3 1 3 3 1 3 3 1 1 3 3 1 1 3 3 1 1 1 3 1 3 3 3 3 1 1 3 1 3 3 1 1 1 1 3 1 3 1...

output:

40000
0 556 62852
5 970 62857
7 993 62859
9 997 62861
12 1000 62864
13 1001 62865
15 1003 62867
17 1005 62869
18 1006 62870
19 1007 62871
20 1008 62872
21 1009 62873
22 1010 62874
26 1014 62878
28 1016 62880
30 1018 62882
36 1024 62888
38 1026 62890
41 1029 62893
46 1034 62898
47 1035 62899
50 1038 ...

result:

ok count=40000

Test #150:

score: 0
Accepted
time: 24ms
memory: 10816kb

input:

150000
3 3 3 3 1 3 3 1 1 1 3 3 3 1 3 3 1 3 3 3 3 1 3 3 3 1 3 3 3 1 3 1 3 1 1 3 3 1 1 3 1 3 1 3 1 3 3 1 1 1 1 1 1 3 1 1 3 3 1 3 1 3 3 3 3 3 3 1 3 3 3 3 3 1 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 1 3 1 3 1 1 1 1 1 3 1 3 3 1 1 3 1 3 1 1 3 1 3 3 1 1 3 1 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 1 1 2 1 1 1 3 3 1 1 3 1 1 3 1...

output:

50000
3 4402 95283
6 4601 95286
9 4664 95289
11 4668 95291
12 4669 95292
16 4673 95296
17 4674 95297
18 4675 95298
19 4676 95299
20 4677 95300
22 4679 95302
24 4681 95304
26 4683 95306
27 4684 95307
28 4685 95308
29 4686 95309
30 4687 95310
31 4688 95311
33 4690 95313
34 4691 95314
37 4694 95317
39 ...

result:

ok count=50000

Test #151:

score: 0
Accepted
time: 12ms
memory: 9568kb

input:

150000
1 1 1 1 3 1 3 3 1 1 1 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 3 3 3 3 1 3 1 3 1 1 1 3 1 1 3 3 3 3 3 1 1 1 1 3 3 1 3 1 1 3 3 1 1 1 3 3 1 3 3 3 3 1 3 3 1 1 3 3 1 1 3 1 3 3 1 1 1 3 3 1 3 1 1 1 3 3 3 1 1 1 1 3 3 1 3 3 3 3 1 1 1 3 1 1 1 3 1 1 1 1 1 3 1 3 1 1 1 3 3 1 3 3 1 3 3 1 3 3 3 3 1 3 3 3 3 1 3 3 3 3 1...

output:

50000
1 3463 66976
2 5543 66977
6 6437 66981
7 6446 66982
8 6449 66983
9 6450 66984
10 6451 66985
16 6457 66991
17 6458 66992
18 6459 66993
20 6461 66995
22 6463 66997
23 6464 66998
26 6467 67001
28 6469 67003
29 6470 67004
30 6471 67005
31 6472 67006
34 6475 67009
35 6476 67010
39 6480 67014
40 648...

result:

ok count=50000

Test #152:

score: 0
Accepted
time: 20ms
memory: 12768kb

input:

150000
1 3 3 3 3 3 3 1 1 1 3 1 1 1 1 3 1 1 1 3 1 1 1 3 3 3 1 1 1 3 1 3 1 1 1 1 3 1 3 1 3 1 1 1 3 3 1 1 1 3 3 1 1 1 3 3 3 1 3 3 3 1 3 3 1 3 1 3 3 3 3 1 1 3 3 1 1 1 3 3 3 3 1 3 1 1 3 1 3 3 1 3 3 1 3 1 1 1 1 3 3 1 1 1 3 3 1 1 1 1 3 1 3 3 3 3 1 3 1 1 1 3 1 3 1 1 1 3 3 1 1 1 1 3 1 3 1 3 1 1 3 1 1 1 3 1 1...

output:

50000
1 1072 91547
5 1402 91551
7 1404 91553
8 1405 91554
9 1406 91555
13 1410 91559
15 1412 91561
17 1414 91563
19 1416 91565
20 1417 91566
21 1418 91567
22 1419 91568
23 1420 91569
25 1422 91571
27 1424 91573
29 1426 91575
30 1427 91576
32 1429 91578
35 1432 91581
38 1435 91584
39 1436 91585
40 14...

result:

ok count=50000

Test #153:

score: 0
Accepted
time: 73ms
memory: 21404kb

input:

600000
2 2 2 3 2 1 1 3 2 2 2 3 3 1 2 2 2 2 2 3 2 2 2 3 1 1 3 2 2 2 3 1 2 2 2 2 2 1 2 2 1 1 2 2 2 2 2 3 2 3 2 1 1 2 2 1 2 2 2 2 3 2 1 2 2 3 2 2 2 1 2 2 3 2 2 1 1 2 2 1 2 1 2 1 2 2 2 1 3 3 3 1 2 2 2 2 2 2 2 3 2 2 3 2 2 1 2 2 2 2 2 2 2 1 2 2 2 1 2 3 2 2 2 2 3 2 2 2 2 2 1 2 2 1 2 2 2 3 2 1 2 1 2 2 3 1 2...

output:

133513
3 4 333285
5 8 333286
6 9 333287
11 14 333289
19 20 333292
23 27 333293
24 28 333294
40 42 333300
41 43 333301
47 48 333302
49 50 333303
55 56 333306
60 61 333307
65 66 333309
69 70 333310
75 77 333312
79 80 333314
81 82 333315
87 92 333317
89 94 333319
90 95 333320
99 100 333322
102 103 3333...

result:

ok count=133513

Test #154:

score: 0
Accepted
time: 79ms
memory: 22072kb

input:

600000
2 2 2 2 3 1 2 3 2 2 2 1 1 2 2 2 2 2 2 2 2 1 3 2 3 1 3 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 3 1 2 1 2 2 2 3 2 2 2 1 1 3 2 3 3 3 3 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 1 3 3 2 2 3 2 2 3 2 2 3 2 2 2 2 2 3 2 2 2 1 1 2 2 2 2 3 2 1 2 1 2 2 2 1 2 2 2 2 1 2 2 2 1 1 2 2 2 2 2 1 2 2 2 2 1 1 3 2 2 2 2 2 3 2 3 3...

output:

133361
4 6 333324
5 8 333325
11 13 333327
12 14 333328
22 27 333330
48 50 333337
52 53 333338
56 59 333339
58 65 333341
60 66 333342
61 67 333343
62 68 333344
63 69 333345
79 82 333347
80 83 333348
81 85 333349
84 86 333350
96 97 333353
108 109 333357
110 111 333358
114 115 333359
119 120 333360
123...

result:

ok count=133361

Test #155:

score: 0
Accepted
time: 70ms
memory: 23284kb

input:

600000
2 2 2 2 3 2 2 3 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 2 1 2 2 1 2 3 2 2 3 3 2 2 2 2 2 2 2 1 3 2 3 3 2 2 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 3 2 3 3 2 2 1 2 1 2 2 2 2 2 2 2 2 2 2 3 2 1 2 2 2 1 3 2 2 1 2 1 2 1 2 2 2 2 3 2 2 2 2 2 2 1 2 2 2 1 2 2 2 1 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 3 1 1...

output:

133217
7 8 333313
11 12 333314
28 30 333316
31 32 333317
36 37 333319
39 41 333320
48 50 333322
49 53 333323
51 54 333324
56 58 333326
70 71 333328
72 74 333329
73 75 333330
89 90 333333
91 92 333334
95 97 333335
101 102 333338
108 109 333340
115 116 333341
119 120 333342
123 124 333343
145 148 3333...

result:

ok count=133217

Test #156:

score: 0
Accepted
time: 61ms
memory: 20676kb

input:

600000
2 2 2 2 2 2 3 3 2 2 3 3 3 1 2 2 1 2 2 2 2 2 2 2 2 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 1 1 2 2 2 2 2 2 2 2 2 2 2 1 2 3 2 2 2 2 3 1 3 2 3 2 1 1 2 2 2 1 2 2 2 2 2 3 2 2 2 2 1 2 2 2 2 3 2 1 2 2 3 2 3 2 2 2 2 3 2 3 2 2 2 2 2 2 1 3 2 2 2 2 1 2 2 2 3 1 3 2 2 1 1 2 1 2 2 2 1 1 2 3 1 3 3 2 2 1 2 3 1...

output:

133621
12 17 333341
13 18 333342
26 28 333344
27 29 333345
44 47 333347
57 58 333349
65 69 333352
68 73 333354
71 76 333356
81 82 333358
103 104 333364
105 106 333365
113 115 333367
124 129 333371
128 132 333373
130 133 333374
134 136 333375
137 142 333377
139 147 333379
143 151 333381
145 152 33338...

result:

ok count=133621

Test #157:

score: 0
Accepted
time: 53ms
memory: 17152kb

input:

470000
2 2 1 3 2 1 1 2 3 3 2 2 2 2 3 2 2 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 3 2 2 2 2 2 2 2 2 3 2 2 2 2 3 2 2 2 1 2 3 2 3 3 3 2 3 2 2 2 2 3 1 2 3 2 1 1 2 2 2 2 2 2 3 3 2 1 2 1 2 2 2 3 2 2 2 2 3 2 2 3 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 2 2 3 1 3 2 2 2 2 2 1 3 2 2 1 2 2 2 2 2 2 2 2 1 3...

output:

104516
3 7 261139
5 10 261140
6 11 261141
8 12 261142
14 15 261144
17 18 261145
22 23 261146
35 36 261147
38 39 261148
47 48 261149
61 65 261154
69 71 261157
70 73 261158
75 78 261161
82 84 261162
85 88 261164
91 92 261166
96 97 261167
99 100 261168
119 122 261170
125 129 261174
126 130 261175
132 1...

result:

ok count=104516

Test #158:

score: 0
Accepted
time: 32ms
memory: 18596kb

input:

470000
2 2 2 2 2 3 1 2 2 2 2 2 2 2 2 2 1 1 3 2 1 3 2 2 2 2 2 3 2 3 1 3 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 3 2 2 2 2 2 1 1 2 1 2 2 1 3 2 2 2 3 3 2 2 2 2 2 2 2 2 3 2 2 3 2 2 1 2 2 2 2 2 1 2 2 3 2 1 1 2 3 3 2 2 3 2 3 2 2 2 3 1 3 1 2 2 2 2 2 2 1 2 2 2 3 2 2 3 2 2 2 2 1 3 3 2 1 2 1 2 3 2 1 1 3 3 2 3 2 2 2 2 1...

output:

104147
6 8 261242
17 22 261244
27 28 261248
30 33 261250
38 39 261252
53 55 261254
54 57 261255
56 58 261256
59 61 261257
60 62 261258
64 66 261259
65 67 261260
77 78 261262
86 87 261264
91 93 261266
94 97 261268
98 101 261270
104 108 261272
105 109 261273
107 111 261275
114 115 261276
128 133 26128...

result:

ok count=104147

Test #159:

score: 0
Accepted
time: 56ms
memory: 19228kb

input:

470000
2 2 2 1 1 3 2 1 2 2 2 2 1 3 2 3 3 2 2 2 2 2 2 2 3 2 2 2 2 3 3 2 2 3 3 3 2 1 2 2 2 2 2 2 1 3 2 2 1 3 1 1 1 2 2 2 2 2 2 1 2 3 2 2 1 2 2 2 2 2 2 3 1 3 3 3 2 1 2 2 3 2 2 1 1 2 1 3 3 2 2 2 2 2 2 1 2 3 2 1 3 1 2 2 2 2 2 2 3 2 3 2 1 3 2 3 2 3 3 1 2 2 2 2 1 1 2 3 2 2 3 2 2 2 1 2 2 3 2 2 2 2 2 1 1 2 2...

output:

104570
12 14 260981
15 18 260983
16 19 260984
24 25 260985
29 31 260986
30 32 260987
33 36 260988
34 38 260989
35 39 260990
37 40 260991
44 46 260992
45 47 260993
49 54 260995
59 60 260999
61 62 261000
71 76 261002
74 81 261005
80 89 261008
83 90 261009
84 91 261010
86 92 261011
87 93 261012
88 94 2...

result:

ok count=104570

Test #160:

score: 0
Accepted
time: 46ms
memory: 16720kb

input:

469999
2 2 2 2 2 2 2 1 3 3 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 1 2 1 2 2 3 2 2 1 3 2 2 2 2 2 3 2 2 2 2 1 1 2 2 1 2 2 1 2 2 2 2 2 1 1 2 2 2 2 2 3 2 2 2 2 1 2 1 2 2 2 3 1 2 3 2 2 1 2 2 2 1 2 3 2 2 2 2 2 2 2 2 2 1 2 1 2 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 2 3 2 2 2 2 2 2 2 1 2 2 1 3 3 3 2 3 2 2 2 1 2 3 1 1 3 2 1...

output:

103891
8 11 261406
9 12 261407
27 28 261410
34 36 261413
40 41 261414
45 47 261415
46 48 261416
49 50 261417
52 53 261418
58 60 261419
65 66 261421
76 78 261424
86 87 261428
88 89 261429
113 114 261433
127 128 261435
131 136 261437
132 137 261438
133 138 261439
139 145 261441
141 147 261442
144 153 ...

result:

ok count=103891

Test #161:

score: 0
Accepted
time: 48ms
memory: 21580kb

input:

600000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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
0 120192 386125

result:

ok count=1

Test #162:

score: 0
Accepted
time: 13ms
memory: 6140kb

input:

149980
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
77404 77405 96783

result:

ok count=1

Test #163:

score: 0
Accepted
time: 72ms
memory: 21068kb

input:

600000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

200000
0 200000 400000
1 200001 400001
2 200002 400002
3 200003 400003
4 200004 400004
5 200005 400005
6 200006 400006
7 200007 400007
8 200008 400008
9 200009 400009
10 200010 400010
11 200011 400011
12 200012 400012
13 200013 400013
14 200014 400014
15 200015 400015
16 200016 400016
17 200017 4000...

result:

ok count=200000

Test #164:

score: 0
Accepted
time: 43ms
memory: 16328kb

input:

600000
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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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
0 1 599999

result:

ok count=1

Test #165:

score: 0
Accepted
time: 66ms
memory: 19376kb

input:

600000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

120000
0 240000 480000
1 240001 480001
2 240002 480002
3 240003 480003
4 240004 480004
5 240005 480005
6 240006 480006
7 240007 480007
8 240008 480008
9 240009 480009
10 240010 480010
11 240011 480011
12 240012 480012
13 240013 480013
14 240014 480014
15 240015 480015
16 240016 480016
17 240017 4800...

result:

ok count=120000

Test #166:

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

input:

6
1 2 3 2 3 1

output:

2
0 1 4
2 3 5

result:

ok count=2

Test #167:

score: 0
Accepted
time: 87ms
memory: 20980kb

input:

599700
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

197700
0 197700 402000
1 197701 402001
2 197702 402002
3 197703 402003
4 197704 402004
5 197705 402005
6 197706 402006
7 197707 402007
8 197708 402008
9 197709 402009
10 197710 402010
11 197711 402011
12 197712 402012
13 197713 402013
14 197714 402014
15 197715 402015
16 197716 402016
17 197717 4020...

result:

ok count=197700