QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#431924 | #6537. One, Two, Three | grass8cow | AC ✓ | 87ms | 56944kb | C++14 | 1.6kb | 2024-06-06 12:06:50 | 2024-06-06 12:06:51 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n,a[1010000];
#define pb push_back
vector<int>p0,p1,p2;
int A,B,C,s[1001000][3];
int L[1010000],R[1010000],e,M[1001000];
vector<int>g[1001000];
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
scanf("%d",&a[i]),a[i]--;
for(int j=0;j<3;j++)
s[i][j]=s[i-1][j]+(a[i]==j);
if(a[i]==0)p0.pb(i);
if(a[i]==1)p1.pb(i);
if(a[i]==2)p2.pb(i);
}
A=B=C=min(min(p0.size(),p2.size()),p1.size());
for(int i=0;i<=n;i++)A=min(A,s[i][0]+s[n][2]-s[i][2]);
for(int i=0;i<=n;i++)B=min(B,s[i][2]+s[n][0]-s[i][0]);
int t0=p0.size(),t2=p2.size();
int m1=1e9,m2=1e9,m3=1e9;
for(int r=0;r<=n;r++){
m1=min(m1,s[r][0]+s[r][2]-s[r][1]);
m2=min(m2,s[r][0]-s[r][1]);
m3=min(m3,s[r][2]-s[r][1]);
C=min(C,(s[n][2]-s[r][2])+(s[n][0]-s[r][0])+s[r][1]+m1);
A=min(A,s[r][1]+(s[n][2]-s[r][2])+m2);
B=min(B,s[r][1]+(s[n][0]-s[r][0])+m3);
}
/*for(int l=0;l<=n;l++)for(int r=l;r<=n;r++){
int a1=s[l][0]+(s[n][2]-s[r][2]),a2=s[l][2]+(s[n][0]-s[r][0]),e=s[r][1]-s[l][1];
C=min(C,e+a1+a2),A=min(A,e+a1),B=min(B,e+a2);
//max(X-a1,0)+max(Y-a2,0)<=s[r][1]-s[l][1]
}*/
C=min(C,A+B),B=min(B,C-A);
printf("%d\n",A+B);
for(int i=0;i<A;i++)L[++e]=p0[i],R[e]=p2[t2-A+i];
for(int i=0;i<B;i++)L[++e]=p2[i],R[e]=p0[t0-B+i];
for(int i=1;i<=e;i++)g[L[i]].pb(i);
priority_queue<pair<int,int> >q;
for(int i=1;i<=n;i++){
for(int x:g[i])q.push({-R[x],x});
if(a[i]==1&&!q.empty()){
int o=q.top().second;q.pop();
assert(i<=R[o]);
M[o]=i;
}
}
for(int i=1;i<=e;i++)assert(M[i]);
for(int i=1;i<=e;i++)printf("%d %d %d\n",L[i]-1,M[i]-1,R[i]-1);
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 7ms
memory: 31844kb
input:
6 3 1 2 2 3 1
output:
2 1 2 4 0 3 5
result:
ok count=2
Test #2:
score: 0
Accepted
time: 6ms
memory: 30832kb
input:
6 2 1 3 1 3 2
output:
0
result:
ok count=0
Test #3:
score: 0
Accepted
time: 4ms
memory: 32812kb
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 0 14 47 1 18 48 2 20 72 3 27 77 4 29 78 6 30 81 7 39 85 10 46 88 12 51 98 13 54 117 16 60 119 17 67 120 19 71 125 21 79 132 25 84 133 26 87 145 28 92 146 32 97 151 33 99 164 34 105 171 35 113 180 36 128 184 37 138 191 38 144 192 40 148 193 41 162 199 42 167 217 43 168 218 44 176 220 45 181 223 4...
result:
ok count=499
Test #4:
score: 0
Accepted
time: 4ms
memory: 31828kb
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: 0ms
memory: 32500kb
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: 3ms
memory: 32556kb
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 0 3 521 1 7 524 2 8 526 4 9 527 5 10 529 6 11 530 12 16 532 13 17 533 15 20 534 19 21 536 24 25 537 26 27 542 28 32 544 29 33 545 31 34 547 36 41 550 37 42 554 39 44 557 40 49 558 45 50 559 47 51 563 48 53 564 52 54 566 58 59 570 66 68 573 69 70 576 77 364 577 78 450 580 80 490 581 82 574 582 86...
result:
ok count=500
Test #7:
score: 0
Accepted
time: 0ms
memory: 32628kb
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 1 7 1877 2 11 1878 3 79 1884 4 122 1885 8 138 1888 9 139 1890 10 140 1892 13 141 1893 18 142 1894 19 143 1895 21 144 1897 24 146 1900 25 147 1901 26 148 1902 27 149 1903 28 152 1906 31 153 1907 32 157 1911 33 159 1913 34 162 1916 36 163 1917 38 165 1919 39 166 1920 44 167 1921 46 168 1922 48 17...
result:
ok count=1000
Test #8:
score: 0
Accepted
time: 0ms
memory: 31648kb
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 2 41 1620 3 55 1625 5 56 1626 6 58 1628 7 59 1629 8 61 1631 10 62 1632 11 63 1633 13 64 1634 14 65 1635 15 67 1637 21 71 1641 22 77 1647 24 81 1651 25 82 1652 27 83 1653 30 87 1657 34 88 1658 38 91 1662 43 92 1663 44 93 1667 47 94 1672 48 95 1674 96 208 1677 100 209 1678 101 210 1679 ...
result:
ok count=1000
Test #9:
score: 0
Accepted
time: 4ms
memory: 32136kb
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 1 2 1205 4 21 1206 5 26 1207 6 27 1208 7 30 1209 8 31 1214 9 32 1219 11 33 1221 14 34 1223 18 35 1224 20 36 1225 22 37 1227 23 39 1229 25 40 1230 28 41 1231 29 44 1234 50 73 1235 53 74 1236 54 75 1237 56 76 1242 58 79 1246 59 80 1247 62 82 1249 64 84 1251 68 85 1252 69 87 1254 70 90 1257 98 128 ...
result:
ok count=999
Test #10:
score: 0
Accepted
time: 0ms
memory: 32040kb
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 1914 1 4 1915 3 6 1916 5 7 1922 9 18 1924 14 31 1925 16 39 1927 17 49 1928 21 51 1929 26 59 1930 27 61 1931 28 62 1932 33 63 1933 35 64 1936 38 65 1937 41 66 1939 45 67 1941 47 70 1944 52 71 1945 53 75 1949 55 76 1950 56 78 1952 57 80 1954 60 82 1956 103 105 1957 104 118 1959 112 123 1960 11...
result:
ok count=998
Test #11:
score: 0
Accepted
time: 3ms
memory: 33272kb
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 0 4 149 1 6 158 2 12 159 8 15 160 9 17 166 10 21 168 11 22 169 14 25 171 16 27 178 18 28 179 34 36 182 37 38 186 45 49 189 50 54 194 51 59 197 52 60 201 53 61 202 55 63 204 57 67 206 62 72 212 68 76 213 70 80 216 74 82 223 79 83 226 81 87 228 85 88 232 89 91 233 90 98 234 93 99 240 94 101 249 9...
result:
ok count=1000
Test #12:
score: 0
Accepted
time: 0ms
memory: 32936kb
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 1661 13 14 1662 19 21 1668 32 34 1669 44 46 1670 49 50 1671 54 55 1672 63 64 1674 73 74 1675 79 80 1677 83 86 1678 92 93 1679 97 98 1683 101 102 1690 103 105 1691 104 106 1692 108 109 1693 115 116 1694 118 119 1695 120 121 1698 134 135 1700 143 144 1701 146 147 1703 150 153 1704 158 159 1705...
result:
ok count=673
Test #13:
score: 0
Accepted
time: 4ms
memory: 33028kb
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 5 9 1650 7 10 1651 8 17 1652 19 20 1653 26 28 1654 32 33 1656 39 40 1658 49 50 1659 66 68 1660 67 69 1662 71 72 1663 74 76 1664 75 77 1667 81 82 1668 91 93 1669 92 94 1670 99 100 1671 108 109 1673 112 113 1674 116 118 1675 117 119 1677 122 124 1678 123 125 1679 138 139 1681 140 142 1683 147 149 ...
result:
ok count=683
Test #14:
score: 0
Accepted
time: 0ms
memory: 32180kb
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 1 2 1648 3 5 1650 12 13 1652 20 21 1655 22 23 1656 34 35 1657 41 45 1658 43 46 1659 47 48 1661 56 57 1663 59 60 1665 70 71 1667 81 82 1668 83 84 1669 93 94 1670 103 104 1671 117 119 1672 118 120 1673 124 125 1683 135 136 1686 137 138 1688 141 142 1690 149 150 1695 154 155 1696 158 159 1697 162 1...
result:
ok count=629
Test #15:
score: 0
Accepted
time: 4ms
memory: 33196kb
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 1635 1 6 1637 8 9 1639 15 18 1641 28 30 1643 44 46 1644 45 47 1645 51 52 1648 58 61 1652 59 63 1653 60 65 1655 62 66 1658 64 68 1659 67 75 1660 69 76 1661 71 77 1662 74 78 1664 81 82 1665 91 92 1667 96 97 1668 103 106 1669 105 107 1672 109 111 1673 113 114 1674 118 120 1676 127 128 1677 131 ...
result:
ok count=712
Test #16:
score: 0
Accepted
time: 0ms
memory: 33372kb
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: 32236kb
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: 7ms
memory: 32380kb
input:
15 2 3 3 2 1 3 2 1 1 1 3 2 3 1 2
output:
3 4 6 10 7 11 12 1 3 13
result:
ok count=3
Test #19:
score: 0
Accepted
time: 3ms
memory: 31396kb
input:
18 3 3 3 1 1 3 2 2 1 2 1 2 3 2 2 1 3 1
output:
6 3 9 12 4 13 16 0 6 8 1 7 10 2 11 15 5 14 17
result:
ok count=6
Test #20:
score: 0
Accepted
time: 3ms
memory: 32952kb
input:
16 1 3 3 2 1 3 1 2 2 2 3 1 3 2 1 2
output:
5 0 3 5 4 7 10 6 9 12 1 8 11 2 13 14
result:
ok count=5
Test #21:
score: 0
Accepted
time: 0ms
memory: 32628kb
input:
15 1 3 1 2 3 2 3 3 2 1 2 2 1 1 3
output:
5 0 3 6 2 5 7 9 11 14 1 8 12 4 10 13
result:
ok count=5
Test #22:
score: 0
Accepted
time: 4ms
memory: 31788kb
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 8 11 5 9 13 6 14 17 1 10 15 3 12 16
result:
ok count=6
Test #23:
score: 0
Accepted
time: 4ms
memory: 32924kb
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 4 12 13 5 14 15 6 16 17 1 7 10 2 9 11
result:
ok count=6
Test #24:
score: 0
Accepted
time: 3ms
memory: 31672kb
input:
18 1 2 1 2 3 2 3 3 2 2 3 1 1 3 3 1 2 1
output:
6 0 1 13 2 3 14 4 5 11 6 8 12 7 9 15 10 16 17
result:
ok count=6
Test #25:
score: 0
Accepted
time: 0ms
memory: 32316kb
input:
15 1 2 1 2 3 3 1 1 1 2 3 2 3 2 3
output:
5 0 1 4 2 3 5 6 9 10 7 11 12 8 13 14
result:
ok count=5
Test #26:
score: 0
Accepted
time: 0ms
memory: 32420kb
input:
18 3 2 1 2 1 3 3 1 1 3 2 1 2 3 2 1 2 3
output:
6 2 3 9 4 12 13 7 16 17 0 1 8 5 10 11 6 14 15
result:
ok count=6
Test #27:
score: 0
Accepted
time: 3ms
memory: 33540kb
input:
15 1 2 3 2 3 3 3 1 3 2 1 2 1 2 1
output:
5 0 1 8 2 3 7 4 9 10 5 11 12 6 13 14
result:
ok count=5
Test #28:
score: 0
Accepted
time: 3ms
memory: 32704kb
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: 3ms
memory: 32868kb
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: 3ms
memory: 32188kb
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: 0ms
memory: 32956kb
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: 0ms
memory: 32108kb
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: 0ms
memory: 30592kb
input:
6 2 1 3 3 1 2
output:
0
result:
ok count=0
Test #34:
score: 0
Accepted
time: 5ms
memory: 32352kb
input:
6 3 1 2 2 3 1
output:
2 1 2 4 0 3 5
result:
ok count=2
Test #35:
score: 0
Accepted
time: 3ms
memory: 32416kb
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 489 3 13 498 4 14 504 7 15 506 9 18 510 10 23 512 11 26 513 16 27 516 24 42 518 25 48 520 28 50 521 29 52 525 30 59 527 31 60 528 32 63 529 33 67 531 39 69 537 41 71 539 43 78 541 44 80 543 45 83 546 46 89 549 47 91 550 49 94 551 51 96 553 53 98 557 61 102 558 62 104 562 70 107 569 72 112 5...
result:
ok count=4997
Test #36:
score: 0
Accepted
time: 10ms
memory: 32868kb
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 1 4 182 5 9 184 6 10 185 8 13 187 12 15 192 14 17 194 16 20 196 18 21 199 19 23 204 22 25 206 30 32 209 31 34 211 33 35 217 42 45 219 43 46 223 48 49 228 50 56 233 52 62 236 54 63 248 57 67 250 58 69 253 59 71 254 66 72 255 74 75 261 79 83 264 80 88 266 84 89 273 90 95 275 91 96 276 93 100 277 ...
result:
ok count=4999
Test #37:
score: 0
Accepted
time: 3ms
memory: 33060kb
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 218 2 4 223 11 18 224 14 23 227 15 25 232 17 27 233 20 30 234 21 37 236 24 44 240 26 52 245 28 57 247 29 63 248 31 64 256 32 65 258 33 69 259 36 71 261 41 74 262 45 76 265 50 80 270 55 90 273 59 93 274 62 94 278 66 96 280 77 98 281 78 103 286 83 112 288 84 113 299 85 116 305 87 122 308 89 1...
result:
ok count=4998
Test #38:
score: 0
Accepted
time: 3ms
memory: 35508kb
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 264 2 5 268 3 8 278 4 12 279 7 13 280 14 15 283 16 19 284 22 24 285 23 29 286 27 32 289 28 36 290 30 37 291 34 38 293 35 42 295 39 45 296 41 46 300 47 48 301 62 63 312 66 74 314 69 76 315 70 81 316 77 85 317 79 88 319 80 90 324 82 92 328 84 93 332 86 96 335 87 97 336 89 101 337 98 104 339 1...
result:
ok count=5000
Test #39:
score: 0
Accepted
time: 9ms
memory: 32884kb
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 2 52 5315 3 54 5317 4 55 5318 5 58 5321 11 59 5322 13 62 5325 15 65 5328 16 66 5329 18 67 5330 23 68 5331 35 74 5337 37 76 5339 38 78 5341 82 83 5343 85 88 5345 86 147 5349 89 149 5350 90 157 5355 91 160 5358 92 161 5359 95 162 5360 98 163 5361 100 164 5362 102 165 5363 103 166 5364 105 169 536...
result:
ok count=5000
Test #40:
score: 0
Accepted
time: 3ms
memory: 33292kb
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 1 30 6127 3 42 6128 6 43 6129 7 45 6130 8 46 6133 9 47 6135 16 48 6136 17 49 6137 19 50 6139 20 51 6140 32 52 6147 39 53 6148 41 54 6151 84 96 6153 86 97 6155 87 98 6156 88 99 6157 90 101 6158 91 102 6159 93 103 6162 94 104 6165 110 132 6169 111 134 6170 112 200 6174 114 205 6175 115 211 6176 1...
result:
ok count=5000
Test #41:
score: 0
Accepted
time: 9ms
memory: 33204kb
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 2 475 6962 3 476 6963 4 478 6965 5 480 6967 9 483 6970 11 486 6973 13 487 6974 15 490 6977 20 492 6979 23 493 6980 24 494 6981 25 495 6982 27 497 6984 28 498 6985 29 502 6989 30 505 6992 32 507 6994 33 510 6997 36 511 6998 37 513 7000 38 514 7001 40 521 7008 42 523 7010 45 525 7012 46 527 7014 ...
result:
ok count=5000
Test #42:
score: 0
Accepted
time: 4ms
memory: 31700kb
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 104 2564 2 105 2566 3 106 2567 7 107 2568 8 108 2569 9 110 2571 10 111 2572 11 112 2573 13 117 2578 14 118 2579 15 121 2582 17 128 2589 21 129 2590 23 130 2591 24 131 2592 25 133 2594 30 134 2595 31 135 2596 33 136 2597 35 139 2600 46 141 2602 48 144 2605 50 148 2609 51 154 2615 52 155 2616 5...
result:
ok count=2000
Test #43:
score: 0
Accepted
time: 4ms
memory: 32188kb
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 14 4217 1 16 4218 2 17 4219 3 18 4220 4 19 4221 5 20 4222 6 21 4224 7 22 4225 8 23 4227 10 24 4230 11 25 4232 12 26 4234 15 27 4235 29 48 4238 30 49 4239 33 50 4240 36 51 4244 56 96 4246 59 99 4249 61 101 4251 63 103 4255 64 104 4256 69 105 4257 71 106 4260 72 107 4261 73 108 4262 74 109 4263...
result:
ok count=3000
Test #44:
score: 0
Accepted
time: 6ms
memory: 33704kb
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 5 30 6531 7 56 6535 9 233 6538 10 270 6539 12 309 6540 13 334 6541 15 335 6542 19 339 6543 20 342 6547 21 343 6550 23 345 6554 24 349 6558 25 351 6560 26 352 6561 31 353 6562 32 357 6566 33 359 6568 38 360 6569 40 361 6570 42 363 6572 43 365 6574 44 366 6575 45 367 6576 46 369 6578 49 370 6579 ...
result:
ok count=4000
Test #45:
score: 0
Accepted
time: 5ms
memory: 32140kb
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 2 5 5410 8 10 5412 9 17 5417 11 18 5420 13 19 5422 14 20 5423 16 22 5425 21 23 5426 30 32 5427 31 34 5429 36 70 5430 37 108 5432 38 118 5438 39 119 5440 40 120 5442 41 121 5443 42 122 5445 46 123 5447 47 124 5450 49 125 5451 51 126 5453 52 127 5454 56 128 5455 58 129 5457 60 130 5458 61 131 545...
result:
ok count=5000
Test #46:
score: 0
Accepted
time: 3ms
memory: 33172kb
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 4 51 6947 5 65 6948 6 89 6949 8 121 6952 9 124 6954 10 128 6955 12 132 6956 13 136 6960 14 137 6961 16 139 6963 22 140 6964 23 141 6965 25 143 6967 26 144 6968 30 151 6975 31 152 6976 32 156 6980 34 158 6982 35 161 6985 37 163 6987 38 164 6988 39 167 6991 40 169 6993 41 171 6995 42 172 6996 43 ...
result:
ok count=5000
Test #47:
score: 0
Accepted
time: 3ms
memory: 32996kb
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 2 7 6104 5 33 6106 6 34 6107 8 36 6109 9 39 6112 11 40 6113 12 41 6115 14 42 6118 16 43 6119 17 44 6120 18 45 6121 21 46 6124 24 47 6128 26 48 6135 27 49 6138 28 50 6139 29 51 6142 35 52 6144 38 53 6148 70 389 6154 71 410 6156 72 435 6157 73 436 6160 75 437 6163 80 438 6165 81 439 6171 85 440 6...
result:
ok count=5000
Test #48:
score: 0
Accepted
time: 5ms
memory: 33628kb
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 0 1 8346 3 4 8348 11 12 8349 13 15 8350 24 25 8355 27 28 8360 42 44 8363 43 45 8367 47 51 8370 48 52 8374 57 58 8375 61 65 8376 64 66 8381 79 80 8384 93 97 8385 95 98 8386 102 104 8392 103 105 8393 109 110 8394 118 119 8395 125 126 8396 140 145 8398 142 148 8400 144 149 8401 154 160 8402 155 16...
result:
ok count=3267
Test #49:
score: 0
Accepted
time: 0ms
memory: 31876kb
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 8367 4 5 8369 10 11 8370 14 19 8371 17 20 8372 18 22 8373 21 23 8374 31 36 8377 34 48 8378 35 49 8379 39 50 8382 41 51 8383 42 52 8386 43 53 8387 47 54 8388 58 59 8390 62 64 8393 65 69 8394 66 72 8395 79 80 8396 89 91 8398 92 93 8399 96 97 8400 134 135 8402 141 142 8404 144 145 8406 154 155...
result:
ok count=3340
Test #50:
score: 0
Accepted
time: 4ms
memory: 32092kb
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 0 1 7684 2 3 7685 4 5 7686 10 11 7687 24 26 7691 36 40 7692 38 41 7696 39 42 7697 44 46 7698 48 49 7699 52 53 7700 57 58 7702 63 64 7706 69 70 7708 79 80 7709 84 85 7710 88 89 7711 99 101 7712 100 102 7713 104 105 7717 108 109 7720 120 121 7722 122 124 7723 132 135 7724 133 136 7725 138 139 772...
result:
ok count=3042
Test #51:
score: 0
Accepted
time: 3ms
memory: 32088kb
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 7 8 7145 11 12 7149 13 14 7154 16 20 7155 19 22 7159 21 24 7161 23 26 7164 32 33 7166 35 40 7167 39 41 7172 46 47 7173 51 52 7174 53 54 7177 58 59 7178 69 70 7182 77 78 7183 79 80 7186 83 84 7187 86 88 7191 87 91 7192 90 92 7193 93 94 7195 95 96 7196 100 102 7201 109 111 7202 110 113 7203 120 1...
result:
ok count=2941
Test #52:
score: 0
Accepted
time: 6ms
memory: 31904kb
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 11 12 6042 13 14 6044 18 19 6045 29 30 6046 42 43 6047 44 46 6049 64 66 6051 67 69 6052 68 70 6054 73 74 6056 79 80 6058 85 86 6062 93 95 6063 94 96 6072 109 111 6073 115 116 6075 131 132 6079 135 136 6081 147 150 6082 151 155 6083 153 156 6084 157 159 6087 158 161 6089 164 166 6090 165 167 609...
result:
ok count=2460
Test #53:
score: 0
Accepted
time: 5ms
memory: 35236kb
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 6207 5 7 6210 17 18 6211 20 21 6213 24 25 6214 29 30 6215 43 44 6218 45 46 6219 48 50 6221 49 53 6224 51 54 6225 52 57 6226 63 64 6230 67 70 6233 68 75 6234 71 81 6235 74 82 6236 79 84 6239 83 85 6240 93 96 6242 95 97 6243 102 103 6247 105 112 6249 113 114 6250 120 122 6251 123 124 6252 134...
result:
ok count=2423
Test #54:
score: 0
Accepted
time: 0ms
memory: 31908kb
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 1 4 6168 2 5 6170 25 26 6171 38 39 6172 40 41 6173 42 43 6180 56 57 6181 59 64 6184 68 72 6185 70 73 6186 78 80 6187 84 85 6189 94 95 6193 116 118 6196 117 121 6198 123 127 6199 124 128 6200 126 129 6201 132 133 6202 140 141 6204 156 158 6207 157 159 6208 164 167 6211 168 169 6214 173 176 6215 ...
result:
ok count=2372
Test #55:
score: 0
Accepted
time: 8ms
memory: 32344kb
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 2 3 6084 7 8 6085 12 13 6087 23 24 6088 32 34 6089 33 36 6090 46 48 6091 58 59 6092 61 64 6097 74 76 6099 75 77 6100 87 88 6103 95 96 6104 103 107 6107 105 110 6108 106 111 6109 115 116 6111 120 121 6112 123 124 6113 131 134 6114 132 135 6115 136 137 6117 142 144 6118 143 145 6121 152 154 6122 ...
result:
ok count=2490
Test #56:
score: 0
Accepted
time: 4ms
memory: 31668kb
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 14999
result:
ok count=1
Test #57:
score: 0
Accepted
time: 8ms
memory: 33360kb
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 5343 5344 8595
result:
ok count=1
Test #58:
score: 0
Accepted
time: 6ms
memory: 33664kb
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: 0ms
memory: 33496kb
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: 4ms
memory: 32640kb
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: 4ms
memory: 32468kb
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: 0ms
memory: 31644kb
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 1 2 25 4 7 31 6 9 34 8 10 36 11 12 39 15 16 48 19 27 55 21 29 56 23 35 58 24 38 59 26 40 60 28 41 61 30 42 64 32 43 66 33 45 67 37 49 69 44 50 70 46 51 71 47 54 72 52 57 73 53 65 79 62 74 81 63 76 84 68 77 86 75 78 88 5 17 85 13 18 87 14 80 89 20 82 90
result:
ok count=29
Test #63:
score: 0
Accepted
time: 4ms
memory: 32840kb
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 1 9 31 7 17 32 10 18 34 14 20 35 15 22 37 16 23 38 19 24 44 21 26 45 27 30 49 41 42 52 51 53 61 54 55 63 56 65 72 57 68 75 58 71 83 59 85 87 60 86 88 0 33 64 2 36 66 3 39 67 4 40 73 5 43 74 6 46 77 8 47 78 11 48 79 12 50 80 13 69 81 25 70 82 28 76 84
result:
ok count=29
Test #64:
score: 0
Accepted
time: 4ms
memory: 32288kb
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 0 8 27 1 13 30 3 16 31 4 23 33 6 28 39 7 29 42 10 37 44 11 38 45 12 41 47 17 46 49 18 48 51 20 50 53 26 52 55 32 54 56 34 57 59 35 70 74 36 76 78 40 77 79 43 83 89 58 85 90 2 60 64 5 61 66 9 65 67 14 68 71 15 69 72 19 73 75 21 80 81 22 82 84
result:
ok count=28
Test #65:
score: 0
Accepted
time: 0ms
memory: 33400kb
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 2 5 27 3 8 28 6 10 29 9 13 33 11 14 40 12 15 46 20 24 48 21 26 50 23 30 51 25 31 57 32 34 60 35 36 61 38 39 62 41 42 65 43 44 66 45 52 67 47 53 69 49 54 80 55 58 84 56 59 85 71 72 87 74 76 89 75 81 90 77 82 91 0 16 78 1 18 79 4 19 83 7 37 86 17 63 88 22 64 93
result:
ok count=30
Test #66:
score: 0
Accepted
time: 8ms
memory: 32936kb
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 4 5 32 6 9 40 10 12 42 14 16 43 17 18 45 23 27 46 26 31 47 28 33 55 29 35 56 30 36 57 34 37 60 41 44 62 48 51 65 49 64 66 50 67 71 52 70 76 53 72 78 54 74 79 58 75 83 59 84 85 61 87 91 0 1 73 2 3 77 7 19 80 8 20 81 11 38 82 13 39 86 15 88 92 21 89 93
result:
ok count=29
Test #67:
score: 0
Accepted
time: 0ms
memory: 32520kb
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 3 9 39 4 10 40 5 12 41 6 17 42 11 19 52 13 22 53 20 24 56 23 26 58 30 31 61 33 37 68 34 45 71 36 48 72 43 49 75 44 50 76 46 57 80 47 62 82 51 66 83 54 69 84 55 70 85 59 73 87 60 74 88 1 2 78 7 27 79 8 29 81 14 32 86 15 89 92 16 90 93 18 91 94
result:
ok count=28
Test #68:
score: 0
Accepted
time: 4ms
memory: 32528kb
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 3 4 41 6 10 44 11 15 45 13 16 46 14 17 47 19 21 50 20 22 52 23 24 57 25 27 58 28 32 60 31 34 64 33 38 66 35 40 67 36 43 68 39 48 75 42 49 77 51 53 80 54 61 84 55 62 86 56 71 87 59 74 89 63 76 90 65 78 92 69 83 94 70 88 96 1 2 93 7 18 95
result:
ok count=27
Test #69:
score: 0
Accepted
time: 0ms
memory: 32564kb
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 15 2 9 16 4 10 19 5 11 22 8 18 26 12 23 27 17 24 31 20 25 33 21 28 39 29 34 41 30 35 43 32 42 48 36 44 49 37 45 55 38 46 59 40 56 60 47 57 63 50 58 65 51 61 66 52 64 77 53 70 79 54 71 81 62 72 83 67 73 86 68 74 87 69 78 92 75 80 93 76 88 94 82 90 95 84 91 98
result:
ok count=30
Test #70:
score: 0
Accepted
time: 4ms
memory: 31916kb
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: 0ms
memory: 32764kb
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: 33276kb
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 7 65 10 11 66 12 20 67 14 21 68 17 22 71 23 25 73 30 31 77 32 33 80 38 39 82 40 43 83 42 46 85 45 48 86 50 52 87 53 56 91 58 59 92 61 88 94 62 93 95 2 8 69 3 9 70 13 24 72 15 26 74 16 27 75 18 28 76 19 29 78 34 35 79 36 37 81 41 44 84 47 49 89 51 54 90 55 57 96 60 97 98
result:
ok count=33
Test #73:
score: 0
Accepted
time: 4ms
memory: 31616kb
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 2 3 54 5 8 58 7 10 59 9 11 60 12 14 62 13 15 65 18 21 66 22 23 68 26 27 69 32 37 70 38 44 71 39 74 75 40 76 77 41 78 79 43 84 85 45 86 87 46 90 91 0 1 49 4 6 52 16 17 55 19 20 56 24 25 57 28 33 61 29 34 63 30 35 64 31 36 67 42 72 73 47 80 81 48 82 83 50 88 89 51 92 93 53 94 95
result:
ok count=32
Test #74:
score: 0
Accepted
time: 4ms
memory: 32984kb
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 2 3 27 4 8 29 5 11 35 6 13 42 10 43 44 12 45 46 17 47 49 21 51 55 22 56 60 28 61 62 30 63 66 31 65 68 32 71 72 33 75 82 34 78 85 36 79 86 37 87 88 38 89 92 39 90 95 40 93 97 0 1 41 7 48 50 9 52 57 14 53 58 15 54 59 16 64 67 18 69 70 19 73 80 20 74 81 23 76 83 24 77 84 25 91 96 26 94 98
result:
ok count=33
Test #75:
score: 0
Accepted
time: 4ms
memory: 31952kb
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 6 7 42 15 40 46 17 41 49 19 45 50 20 47 52 21 53 60 24 54 62 28 55 63 29 59 67 31 69 71 32 77 78 33 83 88 0 1 36 2 3 39 4 5 43 8 9 44 10 11 48 12 13 51 14 56 64 16 57 65 18 58 66 22 61 68 23 70 72 25 73 74 26 75 76 27 79 81 30 80 82 34 84 89 35 85 90 37 86 91 38 87 92
result:
ok count=31
Test #76:
score: 0
Accepted
time: 4ms
memory: 33128kb
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 10 11 44 16 18 46 17 19 49 24 26 54 28 29 55 30 35 56 31 45 63 33 51 64 39 58 65 40 61 68 41 73 75 43 76 77 47 78 80 48 88 89 0 4 50 1 5 52 2 6 53 3 7 57 8 9 59 12 13 60 14 15 62 20 22 66 21 23 67 25 27 69 32 70 72 34 71 74 36 79 81 37 82 83 38 84 85 42 86 87
result:
ok count=30
Test #77:
score: 0
Accepted
time: 4ms
memory: 31928kb
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 1 2 56 8 9 59 10 11 61 13 14 63 18 19 64 27 28 65 33 66 67 34 69 73 35 71 80 36 78 89 37 79 92 5 6 60 21 22 62 31 68 70 32 72 81 40 74 83 41 75 84 42 76 85 45 77 86 50 82 97
result:
ok count=20
Test #78:
score: 0
Accepted
time: 4ms
memory: 32144kb
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 64 9 10 65 24 25 66 33 67 69 34 68 70 35 72 73 36 74 80 37 89 90 16 17 77 22 23 79 26 27 81 38 75 82 39 76 84 42 78 86 43 83 87 46 85 88 49 91 96 50 92 97
result:
ok count=18
Test #79:
score: 0
Accepted
time: 8ms
memory: 32488kb
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 12 13 57 14 15 60 22 28 61 24 30 62 29 31 63 32 65 74 33 66 78 34 67 83 0 1 52 7 9 55 8 10 58 21 26 59 23 64 73 25 68 85 27 69 97
result:
ok count=15
Test #80:
score: 0
Accepted
time: 0ms
memory: 31772kb
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 2 4 43 6 7 44 10 11 46 12 16 51 13 17 55 14 19 57 15 22 59 21 23 62 32 64 75 34 65 79 35 67 82 36 69 91 37 70 92 3 5 68 18 24 74 20 26 78 25 29 80 27 30 83 28 31 86 33 71 95 42 72 96
result:
ok count=21
Test #81:
score: 0
Accepted
time: 0ms
memory: 33136kb
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: 4ms
memory: 32560kb
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 4 5 19 6 10 20 7 11 22 8 18 23 9 21 26 13 25 27 15 31 36 24 39 44 28 41 45 29 43 47 30 46 53 32 49 54 33 50 55 34 52 57 35 58 66 37 59 67 38 60 73 40 61 74 42 62 76 48 63 79 51 64 82 56 65 87 68 70 89 72 77 90 75 81 95 84 85 97 0 1 86 2 69 88 3 71 91 12 78 93 14 80 94 16 83 96 17 92 98
result:
ok count=33
Test #83:
score: 0
Accepted
time: 4ms
memory: 32280kb
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 5 6 30 8 13 32 11 15 33 14 18 34 16 20 35 19 22 38 21 24 39 23 25 42 27 31 44 28 37 46 29 43 49 36 48 51 40 52 63 41 53 64 45 54 73 47 58 74 50 59 75 55 62 77 56 65 78 57 67 81 60 68 83 61 70 87 66 79 91 69 90 95 0 3 76 1 4 82 2 26 85 7 71 88 9 72 89 10 80 92 12 84 93 17 86 94
result:
ok count=32
Test #84:
score: 0
Accepted
time: 4ms
memory: 31692kb
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 5 6 129 8 10 130 11 13 131 12 15 132 19 20 134 21 23 140 26 27 141 31 38 147 39 41 152 40 42 153 43 45 154 44 49 155 47 50 160 48 54 163 53 55 166 58 63 170 59 64 171 60 71 179 62 73 181 67 76 186 68 77 188 69 80 193 72 85 194 74 88 195 78 89 196 79 91 203 87 100 210 93 101 215 98 102 222 104 10...
result:
ok count=999
Test #85:
score: 0
Accepted
time: 4ms
memory: 32928kb
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 0 4 121 2 8 125 5 9 130 11 13 132 12 19 135 17 22 137 23 24 138 26 27 139 31 34 142 35 36 146 43 57 149 45 60 152 50 63 154 53 64 155 55 86 157 59 89 164 62 96 166 67 100 168 74 109 174 75 114 177 76 122 179 79 124 186 82 127 190 83 128 192 84 129 193 93 133 195 97 134 196 98 136 198 99 141 199 ...
result:
ok count=995
Test #86:
score: 0
Accepted
time: 3ms
memory: 31468kb
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: 0ms
memory: 31864kb
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: 3ms
memory: 32820kb
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: 31688kb
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 5 8 26 6 9 28 10 15 30 11 16 32 12 18 35 13 27 36 14 29 44 17 31 46 24 33 47 25 34 52 38 39 56 43 51 57 45 55 59 48 58 60 49 61 69 50 62 71 53 63 72 54 65 73 64 67 79 66 70 81 68 76 87 74 85 89 0 1 77 2 3 78 7 37 80 19 40 82 20 41 83 21 42 86 22 84 88
result:
ok count=29
Test #90:
score: 0
Accepted
time: 0ms
memory: 32604kb
input:
15 2 3 3 2 1 3 2 1 1 1 3 2 3 1 2
output:
3 4 6 10 7 11 12 1 3 13
result:
ok count=3
Test #91:
score: 0
Accepted
time: 0ms
memory: 31284kb
input:
18 3 3 3 1 1 3 2 2 1 2 1 2 3 2 2 1 3 1
output:
6 3 9 12 4 13 16 0 6 8 1 7 10 2 11 15 5 14 17
result:
ok count=6
Test #92:
score: 0
Accepted
time: 8ms
memory: 32528kb
input:
16 1 3 3 2 1 3 1 2 2 2 3 1 3 2 1 2
output:
5 0 3 5 4 7 10 6 9 12 1 8 11 2 13 14
result:
ok count=5
Test #93:
score: 0
Accepted
time: 4ms
memory: 33264kb
input:
15 1 3 1 2 3 2 3 3 2 1 2 2 1 1 3
output:
5 0 3 6 2 5 7 9 11 14 1 8 12 4 10 13
result:
ok count=5
Test #94:
score: 0
Accepted
time: 5ms
memory: 32804kb
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 8 11 5 9 13 6 14 17 1 10 15 3 12 16
result:
ok count=6
Test #95:
score: 0
Accepted
time: 0ms
memory: 32976kb
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 4 12 13 5 14 15 6 16 17 1 7 10 2 9 11
result:
ok count=6
Test #96:
score: 0
Accepted
time: 4ms
memory: 32900kb
input:
18 1 2 1 2 3 2 3 3 2 2 3 1 1 3 3 1 2 1
output:
6 0 1 13 2 3 14 4 5 11 6 8 12 7 9 15 10 16 17
result:
ok count=6
Test #97:
score: 0
Accepted
time: 4ms
memory: 32944kb
input:
15 1 2 1 2 3 3 1 1 1 2 3 2 3 2 3
output:
5 0 1 4 2 3 5 6 9 10 7 11 12 8 13 14
result:
ok count=5
Test #98:
score: 0
Accepted
time: 0ms
memory: 32180kb
input:
18 3 2 1 2 1 3 3 1 1 3 2 1 2 3 2 1 2 3
output:
6 2 3 9 4 12 13 7 16 17 0 1 8 5 10 11 6 14 15
result:
ok count=6
Test #99:
score: 0
Accepted
time: 0ms
memory: 32908kb
input:
15 1 2 3 2 3 3 3 1 3 2 1 2 1 2 1
output:
5 0 1 8 2 3 7 4 9 10 5 11 12 6 13 14
result:
ok count=5
Test #100:
score: 0
Accepted
time: 4ms
memory: 33360kb
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 1 2 25 4 7 31 6 9 34 8 10 36 11 12 39 15 16 48 19 27 55 21 29 56 23 35 58 24 38 59 26 40 60 28 41 61 30 42 64 32 43 66 33 45 67 37 49 69 44 50 70 46 51 71 47 54 72 52 57 73 53 65 79 62 74 81 63 76 84 68 77 86 75 78 88 5 17 85 13 18 87 14 80 89 20 82 90
result:
ok count=29
Test #101:
score: 0
Accepted
time: 7ms
memory: 31552kb
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 1 9 31 7 17 32 10 18 34 14 20 35 15 22 37 16 23 38 19 24 44 21 26 45 27 30 49 41 42 52 51 53 61 54 55 63 56 65 72 57 68 75 58 71 83 59 85 87 60 86 88 0 33 64 2 36 66 3 39 67 4 40 73 5 43 74 6 46 77 8 47 78 11 48 79 12 50 80 13 69 81 25 70 82 28 76 84
result:
ok count=29
Test #102:
score: 0
Accepted
time: 8ms
memory: 31692kb
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 0 8 27 1 13 30 3 16 31 4 23 33 6 28 39 7 29 42 10 37 44 11 38 45 12 41 47 17 46 49 18 48 51 20 50 53 26 52 55 32 54 56 34 57 59 35 70 74 36 76 78 40 77 79 43 83 89 58 85 90 2 60 64 5 61 66 9 65 67 14 68 71 15 69 72 19 73 75 21 80 81 22 82 84
result:
ok count=28
Test #103:
score: 0
Accepted
time: 3ms
memory: 31408kb
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 2 5 27 3 8 28 6 10 29 9 13 33 11 14 40 12 15 46 20 24 48 21 26 50 23 30 51 25 31 57 32 34 60 35 36 61 38 39 62 41 42 65 43 44 66 45 52 67 47 53 69 49 54 80 55 58 84 56 59 85 71 72 87 74 76 89 75 81 90 77 82 91 0 16 78 1 18 79 4 19 83 7 37 86 17 63 88 22 64 93
result:
ok count=30
Test #104:
score: 0
Accepted
time: 3ms
memory: 31740kb
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 4 5 32 6 9 40 10 12 42 14 16 43 17 18 45 23 27 46 26 31 47 28 33 55 29 35 56 30 36 57 34 37 60 41 44 62 48 51 65 49 64 66 50 67 71 52 70 76 53 72 78 54 74 79 58 75 83 59 84 85 61 87 91 0 1 73 2 3 77 7 19 80 8 20 81 11 38 82 13 39 86 15 88 92 21 89 93
result:
ok count=29
Test #105:
score: 0
Accepted
time: 7ms
memory: 32408kb
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 3 9 39 4 10 40 5 12 41 6 17 42 11 19 52 13 22 53 20 24 56 23 26 58 30 31 61 33 37 68 34 45 71 36 48 72 43 49 75 44 50 76 46 57 80 47 62 82 51 66 83 54 69 84 55 70 85 59 73 87 60 74 88 1 2 78 7 27 79 8 29 81 14 32 86 15 89 92 16 90 93 18 91 94
result:
ok count=28
Test #106:
score: 0
Accepted
time: 8ms
memory: 32380kb
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 3 4 41 6 10 44 11 15 45 13 16 46 14 17 47 19 21 50 20 22 52 23 24 57 25 27 58 28 32 60 31 34 64 33 38 66 35 40 67 36 43 68 39 48 75 42 49 77 51 53 80 54 61 84 55 62 86 56 71 87 59 74 89 63 76 90 65 78 92 69 83 94 70 88 96 1 2 93 7 18 95
result:
ok count=27
Test #107:
score: 0
Accepted
time: 3ms
memory: 32712kb
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 15 2 9 16 4 10 19 5 11 22 8 18 26 12 23 27 17 24 31 20 25 33 21 28 39 29 34 41 30 35 43 32 42 48 36 44 49 37 45 55 38 46 59 40 56 60 47 57 63 50 58 65 51 61 66 52 64 77 53 70 79 54 71 81 62 72 83 67 73 86 68 74 87 69 78 92 75 80 93 76 88 94 82 90 95 84 91 98
result:
ok count=30
Test #108:
score: 0
Accepted
time: 0ms
memory: 32688kb
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: 4ms
memory: 31944kb
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: 0ms
memory: 33264kb
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 7 65 10 11 66 12 20 67 14 21 68 17 22 71 23 25 73 30 31 77 32 33 80 38 39 82 40 43 83 42 46 85 45 48 86 50 52 87 53 56 91 58 59 92 61 88 94 62 93 95 2 8 69 3 9 70 13 24 72 15 26 74 16 27 75 18 28 76 19 29 78 34 35 79 36 37 81 41 44 84 47 49 89 51 54 90 55 57 96 60 97 98
result:
ok count=33
Test #111:
score: 0
Accepted
time: 0ms
memory: 31588kb
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 2 3 54 5 8 58 7 10 59 9 11 60 12 14 62 13 15 65 18 21 66 22 23 68 26 27 69 32 37 70 38 44 71 39 74 75 40 76 77 41 78 79 43 84 85 45 86 87 46 90 91 0 1 49 4 6 52 16 17 55 19 20 56 24 25 57 28 33 61 29 34 63 30 35 64 31 36 67 42 72 73 47 80 81 48 82 83 50 88 89 51 92 93 53 94 95
result:
ok count=32
Test #112:
score: 0
Accepted
time: 4ms
memory: 32572kb
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 2 3 27 4 8 29 5 11 35 6 13 42 10 43 44 12 45 46 17 47 49 21 51 55 22 56 60 28 61 62 30 63 66 31 65 68 32 71 72 33 75 82 34 78 85 36 79 86 37 87 88 38 89 92 39 90 95 40 93 97 0 1 41 7 48 50 9 52 57 14 53 58 15 54 59 16 64 67 18 69 70 19 73 80 20 74 81 23 76 83 24 77 84 25 91 96 26 94 98
result:
ok count=33
Test #113:
score: 0
Accepted
time: 3ms
memory: 31460kb
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 6 7 42 15 40 46 17 41 49 19 45 50 20 47 52 21 53 60 24 54 62 28 55 63 29 59 67 31 69 71 32 77 78 33 83 88 0 1 36 2 3 39 4 5 43 8 9 44 10 11 48 12 13 51 14 56 64 16 57 65 18 58 66 22 61 68 23 70 72 25 73 74 26 75 76 27 79 81 30 80 82 34 84 89 35 85 90 37 86 91 38 87 92
result:
ok count=31
Test #114:
score: 0
Accepted
time: 7ms
memory: 32348kb
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 10 11 44 16 18 46 17 19 49 24 26 54 28 29 55 30 35 56 31 45 63 33 51 64 39 58 65 40 61 68 41 73 75 43 76 77 47 78 80 48 88 89 0 4 50 1 5 52 2 6 53 3 7 57 8 9 59 12 13 60 14 15 62 20 22 66 21 23 67 25 27 69 32 70 72 34 71 74 36 79 81 37 82 83 38 84 85 42 86 87
result:
ok count=30
Test #115:
score: 0
Accepted
time: 3ms
memory: 32572kb
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 1 2 56 8 9 59 10 11 61 13 14 63 18 19 64 27 28 65 33 66 67 34 69 73 35 71 80 36 78 89 37 79 92 5 6 60 21 22 62 31 68 70 32 72 81 40 74 83 41 75 84 42 76 85 45 77 86 50 82 97
result:
ok count=20
Test #116:
score: 0
Accepted
time: 4ms
memory: 31376kb
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 64 9 10 65 24 25 66 33 67 69 34 68 70 35 72 73 36 74 80 37 89 90 16 17 77 22 23 79 26 27 81 38 75 82 39 76 84 42 78 86 43 83 87 46 85 88 49 91 96 50 92 97
result:
ok count=18
Test #117:
score: 0
Accepted
time: 0ms
memory: 31876kb
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 12 13 57 14 15 60 22 28 61 24 30 62 29 31 63 32 65 74 33 66 78 34 67 83 0 1 52 7 9 55 8 10 58 21 26 59 23 64 73 25 68 85 27 69 97
result:
ok count=15
Test #118:
score: 0
Accepted
time: 3ms
memory: 32760kb
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 2 4 43 6 7 44 10 11 46 12 16 51 13 17 55 14 19 57 15 22 59 21 23 62 32 64 75 34 65 79 35 67 82 36 69 91 37 70 92 3 5 68 18 24 74 20 26 78 25 29 80 27 30 83 28 31 86 33 71 95 42 72 96
result:
ok count=21
Test #119:
score: 0
Accepted
time: 4ms
memory: 33208kb
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: 0ms
memory: 32532kb
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 4 5 19 6 10 20 7 11 22 8 18 23 9 21 26 13 25 27 15 31 36 24 39 44 28 41 45 29 43 47 30 46 53 32 49 54 33 50 55 34 52 57 35 58 66 37 59 67 38 60 73 40 61 74 42 62 76 48 63 79 51 64 82 56 65 87 68 70 89 72 77 90 75 81 95 84 85 97 0 1 86 2 69 88 3 71 91 12 78 93 14 80 94 16 83 96 17 92 98
result:
ok count=33
Test #121:
score: 0
Accepted
time: 7ms
memory: 31772kb
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 5 6 30 8 13 32 11 15 33 14 18 34 16 20 35 19 22 38 21 24 39 23 25 42 27 31 44 28 37 46 29 43 49 36 48 51 40 52 63 41 53 64 45 54 73 47 58 74 50 59 75 55 62 77 56 65 78 57 67 81 60 68 83 61 70 87 66 79 91 69 90 95 0 3 76 1 4 82 2 26 85 7 71 88 9 72 89 10 80 92 12 84 93 17 86 94
result:
ok count=32
Test #122:
score: 0
Accepted
time: 4ms
memory: 32416kb
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 5 6 129 8 10 130 11 13 131 12 15 132 19 20 134 21 23 140 26 27 141 31 38 147 39 41 152 40 42 153 43 45 154 44 49 155 47 50 160 48 54 163 53 55 166 58 63 170 59 64 171 60 71 179 62 73 181 67 76 186 68 77 188 69 80 193 72 85 194 74 88 195 78 89 196 79 91 203 87 100 210 93 101 215 98 102 222 104 10...
result:
ok count=999
Test #123:
score: 0
Accepted
time: 0ms
memory: 32628kb
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 0 4 121 2 8 125 5 9 130 11 13 132 12 19 135 17 22 137 23 24 138 26 27 139 31 34 142 35 36 146 43 57 149 45 60 152 50 63 154 53 64 155 55 86 157 59 89 164 62 96 166 67 100 168 74 109 174 75 114 177 76 122 179 79 124 186 82 127 190 83 128 192 84 129 193 93 133 195 97 134 196 98 136 198 99 141 199 ...
result:
ok count=995
Test #124:
score: 0
Accepted
time: 4ms
memory: 33472kb
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 0 14 47 1 18 48 2 20 72 3 27 77 4 29 78 6 30 81 7 39 85 10 46 88 12 51 98 13 54 117 16 60 119 17 67 120 19 71 125 21 79 132 25 84 133 26 87 145 28 92 146 32 97 151 33 99 164 34 105 171 35 113 180 36 128 184 37 138 191 38 144 192 40 148 193 41 162 199 42 167 217 43 168 218 44 176 220 45 181 223 4...
result:
ok count=499
Test #125:
score: 0
Accepted
time: 4ms
memory: 32960kb
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: 0ms
memory: 32624kb
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: 5ms
memory: 31608kb
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 0 3 521 1 7 524 2 8 526 4 9 527 5 10 529 6 11 530 12 16 532 13 17 533 15 20 534 19 21 536 24 25 537 26 27 542 28 32 544 29 33 545 31 34 547 36 41 550 37 42 554 39 44 557 40 49 558 45 50 559 47 51 563 48 53 564 52 54 566 58 59 570 66 68 573 69 70 576 77 364 577 78 450 580 80 490 581 82 574 582 86...
result:
ok count=500
Test #128:
score: 0
Accepted
time: 0ms
memory: 31520kb
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 1 7 1877 2 11 1878 3 79 1884 4 122 1885 8 138 1888 9 139 1890 10 140 1892 13 141 1893 18 142 1894 19 143 1895 21 144 1897 24 146 1900 25 147 1901 26 148 1902 27 149 1903 28 152 1906 31 153 1907 32 157 1911 33 159 1913 34 162 1916 36 163 1917 38 165 1919 39 166 1920 44 167 1921 46 168 1922 48 17...
result:
ok count=1000
Test #129:
score: 0
Accepted
time: 8ms
memory: 31656kb
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 2 41 1620 3 55 1625 5 56 1626 6 58 1628 7 59 1629 8 61 1631 10 62 1632 11 63 1633 13 64 1634 14 65 1635 15 67 1637 21 71 1641 22 77 1647 24 81 1651 25 82 1652 27 83 1653 30 87 1657 34 88 1658 38 91 1662 43 92 1663 44 93 1667 47 94 1672 48 95 1674 96 208 1677 100 209 1678 101 210 1679 ...
result:
ok count=1000
Test #130:
score: 0
Accepted
time: 4ms
memory: 31936kb
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 1 2 1205 4 21 1206 5 26 1207 6 27 1208 7 30 1209 8 31 1214 9 32 1219 11 33 1221 14 34 1223 18 35 1224 20 36 1225 22 37 1227 23 39 1229 25 40 1230 28 41 1231 29 44 1234 50 73 1235 53 74 1236 54 75 1237 56 76 1242 58 79 1246 59 80 1247 62 82 1249 64 84 1251 68 85 1252 69 87 1254 70 90 1257 98 128 ...
result:
ok count=999
Test #131:
score: 0
Accepted
time: 4ms
memory: 32236kb
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 1914 1 4 1915 3 6 1916 5 7 1922 9 18 1924 14 31 1925 16 39 1927 17 49 1928 21 51 1929 26 59 1930 27 61 1931 28 62 1932 33 63 1933 35 64 1936 38 65 1937 41 66 1939 45 67 1941 47 70 1944 52 71 1945 53 75 1949 55 76 1950 56 78 1952 57 80 1954 60 82 1956 103 105 1957 104 118 1959 112 123 1960 11...
result:
ok count=998
Test #132:
score: 0
Accepted
time: 8ms
memory: 31680kb
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 0 4 149 1 6 158 2 12 159 8 15 160 9 17 166 10 21 168 11 22 169 14 25 171 16 27 178 18 28 179 34 36 182 37 38 186 45 49 189 50 54 194 51 59 197 52 60 201 53 61 202 55 63 204 57 67 206 62 72 212 68 76 213 70 80 216 74 82 223 79 83 226 81 87 228 85 88 232 89 91 233 90 98 234 93 99 240 94 101 249 9...
result:
ok count=1000
Test #133:
score: 0
Accepted
time: 4ms
memory: 31552kb
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 1661 13 14 1662 19 21 1668 32 34 1669 44 46 1670 49 50 1671 54 55 1672 63 64 1674 73 74 1675 79 80 1677 83 86 1678 92 93 1679 97 98 1683 101 102 1690 103 105 1691 104 106 1692 108 109 1693 115 116 1694 118 119 1695 120 121 1698 134 135 1700 143 144 1701 146 147 1703 150 153 1704 158 159 1705...
result:
ok count=673
Test #134:
score: 0
Accepted
time: 4ms
memory: 33184kb
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 5 9 1650 7 10 1651 8 17 1652 19 20 1653 26 28 1654 32 33 1656 39 40 1658 49 50 1659 66 68 1660 67 69 1662 71 72 1663 74 76 1664 75 77 1667 81 82 1668 91 93 1669 92 94 1670 99 100 1671 108 109 1673 112 113 1674 116 118 1675 117 119 1677 122 124 1678 123 125 1679 138 139 1681 140 142 1683 147 149 ...
result:
ok count=683
Test #135:
score: 0
Accepted
time: 4ms
memory: 33096kb
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 1 2 1648 3 5 1650 12 13 1652 20 21 1655 22 23 1656 34 35 1657 41 45 1658 43 46 1659 47 48 1661 56 57 1663 59 60 1665 70 71 1667 81 82 1668 83 84 1669 93 94 1670 103 104 1671 117 119 1672 118 120 1673 124 125 1683 135 136 1686 137 138 1688 141 142 1690 149 150 1695 154 155 1696 158 159 1697 162 1...
result:
ok count=629
Test #136:
score: 0
Accepted
time: 8ms
memory: 32760kb
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 1635 1 6 1637 8 9 1639 15 18 1641 28 30 1643 44 46 1644 45 47 1645 51 52 1648 58 61 1652 59 63 1653 60 65 1655 62 66 1658 64 68 1659 67 75 1660 69 76 1661 71 77 1662 74 78 1664 81 82 1665 91 92 1667 96 97 1668 103 106 1669 105 107 1672 109 111 1673 113 114 1674 118 120 1676 127 128 1677 131 ...
result:
ok count=712
Test #137:
score: 0
Accepted
time: 0ms
memory: 32756kb
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: 26ms
memory: 44984kb
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: 75ms
memory: 54668kb
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 0 4 2334 1 6 2337 3 8 2339 5 11 2340 9 13 2341 10 14 2343 15 16 2352 17 20 2354 18 23 2355 21 29 2357 22 38 2362 24 39 2368 28 43 2377 32 45 2379 33 47 2382 34 48 2383 36 49 2385 40 54 2389 50 59 2390 51 71 2397 52 73 2399 53 74 2400 56 76 2402 57 78 2405 58 80 2406 60 97 2417 61 98 2420 62 1...
result:
ok count=200000
Test #140:
score: 0
Accepted
time: 87ms
memory: 51916kb
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 1 2 1292 6 9 1298 7 11 1301 8 12 1307 22 26 1311 25 32 1312 27 38 1316 29 40 1318 31 47 1320 36 51 1322 37 52 1324 39 53 1327 41 55 1332 42 56 1333 44 57 1334 46 62 1337 48 66 1338 49 69 1344 58 72 1345 59 76 1346 60 78 1352 63 79 1354 64 80 1355 65 83 1356 68 86 1357 70 89 1361 71 90 1369 81...
result:
ok count=200000
Test #141:
score: 0
Accepted
time: 10ms
memory: 34756kb
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 1 39 1594 2 54 1630 3 65 1682 4 105 1766 5 156 1768 6 240 1779 7 324 1790 8 377 1814 9 465 1885 10 500 1887 11 542 1944 12 550 1979 13 563 2082 14 568 2211 15 571 2216 16 613 2308 17 675 2372 18 686 2388 19 703 2395 20 744 2761 21 781 2841 22 792 2923 23 809 2961 24 849 3048 25 894 3071 26 979 ...
result:
ok count=4999
Test #142:
score: 0
Accepted
time: 3ms
memory: 35936kb
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 264 2 5 268 3 8 278 4 12 279 7 13 280 14 15 283 16 19 284 22 24 285 23 29 286 27 32 289 28 36 290 30 37 291 34 38 293 35 42 295 39 45 296 41 46 300 47 48 301 62 63 312 66 74 314 69 76 315 70 81 316 77 85 317 79 88 319 80 90 324 82 92 328 84 93 332 86 96 335 87 97 336 89 101 337 98 104 339 1...
result:
ok count=5000
Test #143:
score: 0
Accepted
time: 87ms
memory: 51676kb
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 2 6 1637 4 10 1640 5 12 1642 8 13 1643 9 16 1650 11 19 1656 14 20 1667 15 21 1669 17 23 1670 18 26 1672 22 27 1677 28 29 1683 31 32 1684 33 34 1689 39 42 1693 41 43 1694 45 46 1697 47 48 1699 50 51 1709 52 54 1716 53 56 1717 59 60 1725 63 64 1729 65 67 1730 69 71 1731 72 73 1733 76 80 1734 77...
result:
ok count=200000
Test #144:
score: 0
Accepted
time: 71ms
memory: 54824kb
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 0 947 351466 1 2611 351468 4 3964 351469 5 8354 351470 7 8355 351471 9 11205 351478 12 11334 351479 15 11341 351480 18 11342 351482 20 11343 351486 25 11344 351487 27 11345 351490 30 11346 351493 31 11347 351494 32 11348 351496 33 11349 351499 35 11350 351502 36 11351 351503 39 11352 351506 4...
result:
ok count=200000
Test #145:
score: 0
Accepted
time: 72ms
memory: 56944kb
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 1 11048 339137 5 11049 339138 6 11051 339140 7 11052 339141 8 11053 339142 11 11054 339143 13 11055 339144 15 11056 339145 16 11060 339149 20 11066 339155 32 11067 339156 36 11068 339157 37 11069 339158 41 11070 339159 42 11071 339160 43 11072 339161 46 11075 339164 47 11077 339166 50 11081 3...
result:
ok count=200000
Test #146:
score: 0
Accepted
time: 70ms
memory: 52360kb
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 2778 343204 4 2783 343209 6 2785 343211 8 2787 343213 9 2788 343214 11 2790 343216 13 2791 343217 17 2793 343219 18 2795 343221 19 2799 343225 21 2804 343230 22 2805 343231 23 2806 343232 25 2807 343233 29 2811 343237 36 2812 343238 37 2813 343239 38 2814 343240 42 2816 343242 43 2818 34324...
result:
ok count=200000
Test #147:
score: 0
Accepted
time: 8ms
memory: 33312kb
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 2 348 27466 5 397 27468 8 402 27469 9 406 27470 10 428 27472 12 433 27473 14 434 27474 16 436 27476 18 439 27479 19 440 27480 20 445 27486 21 455 27496 24 459 27500 25 460 27501 26 461 27502 28 462 27503 29 464 27505 31 469 27510 32 470 27511 35 472 27513 39 473 27514 4...
result:
ok count=20000
Test #148:
score: 0
Accepted
time: 11ms
memory: 36352kb
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 1 254 31470 2 282 31471 5 283 31473 12 303 31474 13 304 31478 16 315 31479 17 319 31481 18 320 31482 21 321 31486 23 322 31487 24 323 31489 25 324 31490 31 325 31494 32 326 31496 33 327 31497 34 328 31498 35 329 31502 36 330 31503 37 331 31504 41 332 31506 42 333 31509 46 334 31511 47 335 3151...
result:
ok count=30000
Test #149:
score: 0
Accepted
time: 21ms
memory: 37544kb
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 2 556 62541 9 819 62544 11 933 62545 12 947 62549 14 949 62551 15 970 62554 16 976 62556 18 993 62557 24 995 62558 25 997 62559 26 998 62560 27 999 62561 28 1000 62563 29 1001 62566 30 1002 62571 33 1003 62573 37 1004 62574 38 1005 62575 39 1006 62577 42 1007 62578 43 1008 62580 44 1009 62583 ...
result:
ok count=40000
Test #150:
score: 0
Accepted
time: 24ms
memory: 38524kb
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 4 134 95052 7 1872 95054 8 3709 95057 9 4402 95059 13 4591 95060 16 4600 95062 21 4601 95063 25 4654 95064 29 4658 95066 31 4664 95069 33 4666 95072 34 4668 95074 37 4669 95075 38 4670 95076 40 4671 95078 42 4672 95080 44 4673 95084 47 4674 95085 48 4675 95086 49 4676 95087 50 4677 95089 51 46...
result:
ok count=50000
Test #151:
score: 0
Accepted
time: 20ms
memory: 38160kb
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 0 2483 66906 1 3463 66907 2 5543 66908 3 5668 66911 5 6350 66912 8 6434 66913 9 6437 66914 10 6446 66915 11 6449 66916 12 6450 66920 13 6451 66922 16 6452 66924 18 6453 66926 19 6454 66928 20 6455 66931 22 6456 66932 30 6457 66933 32 6458 66934 34 6459 66935 35 6460 66937 36 6461 66938 38 6462...
result:
ok count=50000
Test #152:
score: 0
Accepted
time: 19ms
memory: 40028kb
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 0 995 91493 7 1072 91494 8 1337 91495 9 1349 91497 11 1392 91499 12 1402 91501 13 1403 91503 14 1404 91504 16 1405 91507 17 1406 91509 18 1407 91511 20 1408 91513 21 1409 91514 22 1410 91515 26 1411 91521 27 1412 91522 28 1413 91525 30 1414 91531 32 1415 91534 33 1416 91537 34 1417 91541 35 14...
result:
ok count=50000
Test #153:
score: 0
Accepted
time: 63ms
memory: 55756kb
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 5 8 333212 6 9 333217 13 14 333222 24 27 333223 25 28 333226 31 32 333230 37 38 333232 40 42 333235 41 43 333242 51 53 333244 52 54 333245 55 56 333246 62 63 333247 69 70 333249 75 77 333251 76 78 333253 79 80 333254 81 82 333255 83 84 333258 87 92 333262 91 93 333263 105 106 333264 113 114 3...
result:
ok count=133513
Test #154:
score: 0
Accepted
time: 63ms
memory: 50944kb
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 5 6 332954 11 13 332955 12 14 332956 21 23 332957 25 27 332959 33 34 332962 46 47 332964 48 49 332965 56 59 332967 57 64 332970 79 82 332971 100 102 332973 101 103 332976 108 109 332981 110 111 332982 114 115 332983 119 120 332985 123 125 332988 124 126 332989 130 131 332990 135 138 332991 13...
result:
ok count=133361
Test #155:
score: 0
Accepted
time: 63ms
memory: 51352kb
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 27 29 333128 28 30 333129 31 32 333131 34 35 333132 48 50 333134 76 77 333135 78 79 333139 91 92 333140 95 97 333141 99 100 333142 101 102 333146 103 104 333147 115 116 333149 119 120 333156 123 124 333159 139 140 333160 145 147 333161 146 148 333162 158 159 333163 162 164 333164 163 165 3331...
result:
ok count=133217
Test #156:
score: 0
Accepted
time: 60ms
memory: 55204kb
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 13 14 333274 16 17 333275 44 46 333277 45 47 333278 57 58 333279 65 67 333281 70 72 333287 71 73 333290 75 76 333291 86 87 333292 93 94 333294 112 114 333296 118 119 333298 123 125 333305 127 129 333308 128 131 333309 130 132 333312 134 136 333313 135 141 333314 138 142 333316 143 144 333318 ...
result:
ok count=133621
Test #157:
score: 0
Accepted
time: 52ms
memory: 47016kb
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 2 7 261403 5 12 261405 6 13 261409 56 57 261411 70 76 261412 74 77 261416 75 78 261422 85 88 261423 87 89 261425 107 108 261426 125 130 261431 132 135 261432 136 137 261439 145 150 261442 163 164 261443 166 173 261444 170 174 261448 172 177 261449 180 183 261451 221 222 261452 226 227 261453 ...
result:
ok count=104516
Test #158:
score: 0
Accepted
time: 41ms
memory: 46908kb
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 7 261154 16 19 261155 17 22 261156 20 23 261157 30 32 261158 38 39 261159 53 55 261160 54 57 261161 56 58 261162 59 61 261163 80 81 261165 86 87 261166 91 93 261170 92 96 261172 105 108 261176 107 109 261177 114 115 261178 126 129 261180 130 131 261181 132 133 261182 136 140 261186 137 142 ...
result:
ok count=104147
Test #159:
score: 0
Accepted
time: 40ms
memory: 46856kb
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 3 8 261103 4 9 261106 7 10 261108 12 19 261109 37 40 261111 44 47 261113 48 54 261119 50 55 261120 51 56 261122 52 57 261124 59 60 261128 64 65 261130 72 85 261131 77 91 261132 83 92 261133 84 93 261136 86 94 261137 95 96 261138 99 103 261139 101 104 261144 112 122 261145 119 123 261146 124 1...
result:
ok count=104570
Test #160:
score: 0
Accepted
time: 48ms
memory: 46048kb
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 7 12 261787 25 26 261789 27 28 261791 33 36 261792 45 47 261796 46 48 261800 49 50 261801 52 53 261802 58 60 261806 59 61 261808 70 71 261812 72 73 261814 77 81 261815 82 83 261818 86 87 261819 98 99 261821 100 101 261822 113 114 261824 127 128 261825 130 140 261828 139 153 261830 142 157 261...
result:
ok count=103891
Test #161:
score: 0
Accepted
time: 30ms
memory: 45012kb
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: 11ms
memory: 36764kb
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: 66ms
memory: 53992kb
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: 33ms
memory: 43012kb
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: 68ms
memory: 53328kb
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: 0ms
memory: 32128kb
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: 67ms
memory: 53908kb
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