QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#30463 | #3318. Four-Coloring | yuyue | AC ✓ | 11ms | 5148kb | C++ | 1.7kb | 2022-04-28 22:21:59 | 2022-04-28 22:22:00 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=10010;
int n,ans[N],col[N],m,x,y,p[5],q[N],l,r,ccc;
pair<int,int> a[N],b[N];
map<pair<int,int>,int> M1,M2;
vector<int> v[N],V[N];
bool bo[5],inq[N];
bool bfs(int lim,int s,int t,int c1,int c2)
{
q[l=r=1]=s,inq[s]=1;
while (l<=r)
{
x=q[l++];
for (int i=0,sz=V[x].size(); i<sz; i++)
if (V[x][i]>=lim&&!inq[V[x][i]]&&col[V[x][i]]==c1+c2-col[x]) inq[q[++r]=V[x][i]]=1;
}
if (inq[t])
{
for (int i=1; i<=r; i++) inq[q[i]]=0;
return 0;
}
col[lim-1]=col[s];
for (int i=1; i<=r; i++) inq[q[i]]=0,col[q[i]]=c1+c2-col[q[i]];
return 1;
}
int main()
{
// freopen("construct.in","r",stdin);freopen("construct.out","w",stdout);
memset(inq,0,sizeof(inq));
scanf("%d%d",&n,&m),M1.clear(),M2.clear();
for (int i=1; i<=n; i++) scanf("%d%d",&a[i].first,&a[i].second),M1[a[i]]=i,b[i]=a[i],v[i].clear(),V[i].clear();
sort(a+1,a+1+n);
for (int i=1; i<=n; i++) M2[a[i]]=i;
while (m--)
{
scanf("%d%d",&x,&y),x=M2[b[x]],y=M2[b[y]];
V[x].push_back(y),V[y].push_back(x);
if (x<y) swap(x,y);
v[y].push_back(x);
}
for (int i=n; i; i--)
{
memset(bo,0,sizeof(bo)),col[i]=-1;
for (int j=0,sz=v[i].size(); j<sz; j++) bo[col[v[i][j]]]=1;
for (int j=0; j<4; j++) if (!bo[j]) {col[i]=j; break;}
if (col[i]!=-1) continue;
for (int j=0; j<4; j++)
if (a[v[i][j]].first==a[i].first) p[0]=v[i][j]; else
if (a[v[i][j]].second==a[i].second) p[2]=v[i][j]; else
if (a[v[i][j]].second>a[i].second) p[1]=v[i][j]; else p[3]=v[i][j];
if (!bfs(i+1,p[0],p[2],col[p[0]],col[p[2]])) bfs(i+1,p[1],p[3],col[p[1]],col[p[3]]);
}
for (int i=1; i<=n; i++) ans[M1[a[i]]]=col[i];
for (int i=1; i<=n; i++) printf("%d\n",ans[i]+1);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 10ms
memory: 5120kb
input:
4009 9537 0 20 20 0 20 20 0 40 10 30 20 40 10 27 10 26 12 27 11 26 9 26 9 24 10 25 10 24 11 24 12 24 10 23 12 23 12 25 12 26 13 24 13 26 10 50 40 40 20 60 30 30 30 50 40 60 30 47 30 46 32 47 31 46 29 46 29 44 30 45 30 44 31 44 32 44 30 43 32 43 32 45 32 46 33 44 33 46 30 70 60 60 40 80 50 50 50 70 6...
output:
2 1 4 4 1 3 3 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 4 4 2 1 3 3 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 4 4 2 1 3 3 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 4 4 2 1 3 3 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 4 4 2 1 3 3 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 4 4 2 1 3 3 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 4 4 2 1 3 3 2 2 1 1 2 3 1 2 1 4 3 ...
result:
ok ...
Test #2:
score: 0
Accepted
time: 10ms
memory: 5140kb
input:
3977 9260 0 20 20 0 20 20 0 40 10 30 20 40 10 27 10 33 7 30 13 30 13 32 14 30 14 31 14 29 16 29 15 30 16 30 16 31 16 32 17 30 17 32 15 32 14 32 14 33 16 33 7 32 6 30 6 31 6 29 4 29 5 30 4 30 4 31 4 32 3 30 3 32 5 32 6 32 4 33 6 33 10 34 12 33 11 34 9 34 9 36 10 35 10 36 11 36 12 36 10 37 12 37 12 35...
output:
4 3 2 3 1 4 3 4 2 2 1 1 3 4 3 2 1 4 3 2 1 1 2 3 2 1 1 4 3 4 2 1 3 2 2 1 1 3 3 2 1 3 2 2 1 3 2 1 3 3 2 4 1 2 1 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 2 3 1 1 4 3 4 2 2 1 1 3 4 3 2 1 4 3 2 1 1 2 3 2 1 1 4 3 4 2 1 3 2 2 1 1 3 3 2 1 3 2 2 1 3 2 1 3 3 2 4 1 2 1 2 2 1 1 2 3 1 2 1 4 3 4 3 2 1 1 2 3 1 1 4 3 4 2 2 ...
result:
ok ...
Test #3:
score: 0
Accepted
time: 3ms
memory: 5036kb
input:
3365 9976 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 2 3 3 2 4 3 4 2 5 4 3 4 4 3 5 4 5 3 6 5 4 5 5 4 6 5 6 4 7 6 5 6 6 5 7 6 7 5 8 7 6 7 7 6 8 7 8 6 9 8 7 8 8 7 9 8 9 7 10 9 8 9 9 8 10 9 10 8 11 10 9 10 10 9 11 10 11 9 12 11 10 11 11 10 12 11 12 10 13 12 11 12 12 11 13 12 13 11 14 13 12 13 13 12 14 1...
output:
4 3 1 2 3 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 ...
result:
ok ...
Test #4:
score: 0
Accepted
time: 11ms
memory: 5056kb
input:
3340 9876 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 2 4 3 2 4 3 4 2 5 1 5 1 6 3 5 2 6 3 6 2 7 4 5 4 6 3 7 4 7 3 8 5 6 5 7 4 8 5 8 4 9 6 7 6 8 5 9 6 9 5 10 7 8 7 9 6 10 7 10 6 11 8 9 8 10 7 11 8 11 9 10 9 11 8 12 9 12 8 13 10 12 9 13 10 13 9 14 11 12 11 13 10 14 11 14 10 15 12 13 12 14 11 15 12 15 11...
output:
4 3 2 1 3 1 2 2 1 3 3 4 2 3 4 1 3 1 1 2 4 4 1 1 3 2 2 1 1 2 4 4 1 1 4 2 2 1 1 3 4 2 1 2 4 3 1 1 3 4 2 1 4 3 1 2 2 1 4 3 4 2 3 1 2 4 2 1 4 2 1 2 3 1 3 4 2 4 3 1 3 4 2 3 1 2 4 2 1 3 2 3 2 1 4 1 3 2 1 4 2 3 3 4 2 1 3 1 2 4 1 1 3 2 2 4 1 2 3 3 1 1 3 2 2 1 1 2 4 3 1 3 4 1 2 3 1 2 4 3 3 2 1 1 3 3 1 2 4 3 ...
result:
ok ...
Test #5:
score: 0
Accepted
time: 3ms
memory: 5040kb
input:
3325 9815 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 3 2 4 3 4 2 5 4 4 3 5 4 5 3 6 5 4 5 5 4 6 5 6 4 7 3 7 3 8 5 7 4 8 5 8 4 9 6 7 6 8 5 9 6 9 5 10 4 10 4 11 6 10 5 11 6 11 5 12 7 10 7 11 6 12 7 12 6 13 5 13 5 14 7 13 6 14 7 14 6 15 8 13 8 14 7 15 8 15 9 15 8 16 7 16 7 17 9 16 8 17 7 18 9 17 8 18 9 1...
output:
4 3 1 3 2 4 3 1 4 2 1 1 3 4 2 2 1 4 3 2 3 4 1 2 4 2 3 4 2 3 2 3 1 4 3 1 2 3 1 2 4 2 4 1 3 4 1 2 2 1 4 3 4 3 2 1 4 1 2 2 3 1 1 2 4 3 3 1 2 3 1 2 1 4 2 3 2 1 1 2 3 3 1 4 3 1 2 1 4 2 3 4 1 1 4 2 2 1 3 2 1 4 3 2 4 1 4 4 3 1 1 4 4 1 3 4 3 2 4 1 3 3 4 1 2 3 3 2 4 4 3 3 4 2 2 3 1 2 3 1 3 4 2 4 1 3 3 1 2 4 ...
result:
ok ...
Test #6:
score: 0
Accepted
time: 6ms
memory: 5016kb
input:
3300 9721 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 3 2 3 3 2 4 3 4 2 5 4 3 4 4 3 5 4 5 3 6 5 4 5 5 4 6 5 6 4 7 6 5 6 6 5 7 6 7 5 8 7 6 7 7 6 8 7 8 6 9 8 7 8 8 7 9 8 9 7 10 9 8 9 9 8 10 9 10 8 11 10 9 10 10 9 11 10 11 9 12 11 10 11 11 10 12 11 12 10 13 9 13 11 13 10 14 11 14 10 15 12 13 12 14 11 15 12 15 ...
output:
2 1 3 3 1 2 4 4 3 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 4 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 4 2 2 1 3 2 4 1 1 3 2 1 3 1 3 2 4 3 2 1 1 2 3 4 3 1 2 3 3 2 1 4 3 3 1 2 2 3 4 2 1 3 1 2 4 3 3 1 2 2 3 3 2 4 1 4 1 2 3 1 2 1 1 2 3 4 1 1 4 2 3 1 1 2 3 4 1 1 3 4 2 1 1 4 2 3 1 1 2 3 4 1 1 3 2 2 4 1 2 3 1 1 3 ...
result:
ok ...
Test #7:
score: 0
Accepted
time: 4ms
memory: 5044kb
input:
3277 9620 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 3 2 3 3 2 4 3 4 2 5 4 3 4 4 3 5 4 5 3 6 5 4 5 5 4 6 5 6 4 7 6 5 6 6 5 7 6 7 5 8 7 6 7 7 6 8 7 8 6 9 8 7 8 8 7 9 8 9 7 10 9 8 8 10 9 10 8 11 10 9 10 10 9 11 10 11 9 12 11 10 11 11 10 12 11 12 10 13 12 11 12 12 11 13 12 13 11 14 13 12 13 13 12 14 13 14 12 ...
output:
3 4 1 1 2 3 1 4 3 2 1 1 2 4 4 3 1 4 3 2 1 1 3 2 2 1 1 2 3 3 1 1 4 2 2 3 1 2 3 1 1 3 2 2 1 1 2 3 3 4 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 4 3 3 1 2 3 4 1 2 1 3 2 4 1 1 4 2 3 1 1 2 3 4 1 1 3 2 2 1 3 4 2 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 4 1 2 3 3 1 3 2 4 1 1 2 3 3 1 4 2 2 1 1 2 3 3 1 1 3 4 2 4 2 1 3 4 1 3 2 4 ...
result:
ok ...
Test #8:
score: 0
Accepted
time: 8ms
memory: 5008kb
input:
3243 9479 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 2 3 3 2 4 3 4 2 5 4 3 4 4 3 5 4 5 3 6 5 4 5 5 4 6 5 6 6 6 5 7 6 7 5 8 7 6 7 7 6 8 7 8 6 9 5 10 7 9 6 10 7 10 6 11 8 9 8 10 7 11 8 11 7 12 9 10 9 11 8 12 9 12 8 13 10 11 10 12 9 13 10 13 9 14 11 12 11 13 10 14 11 14 10 15 12 13 12 14 11 15 12 15 11 ...
output:
2 4 1 3 4 3 1 1 3 2 2 1 1 2 3 4 1 1 3 2 2 1 1 2 3 3 1 2 4 2 4 1 3 4 4 2 1 3 3 2 2 4 3 1 2 1 3 2 4 2 1 4 3 1 3 2 1 4 4 2 3 4 1 3 1 2 3 4 2 1 1 4 2 3 1 1 2 4 4 1 1 4 2 2 3 1 2 3 1 4 1 3 2 1 2 4 3 3 1 2 4 1 4 3 1 4 3 3 4 2 2 1 1 2 4 3 1 1 3 2 2 1 1 2 4 4 1 3 4 1 3 2 2 1 4 2 4 3 1 1 2 4 1 3 3 2 2 3 1 4 ...
result:
ok ...
Test #9:
score: 0
Accepted
time: 5ms
memory: 5016kb
input:
3232 9454 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 2 3 3 2 4 3 4 2 5 4 3 4 4 3 5 4 5 3 6 5 4 5 5 4 6 5 6 4 7 6 5 6 6 5 7 6 7 5 8 7 6 6 8 7 8 6 9 8 7 8 8 7 9 8 9 7 10 8 10 9 9 9 10 8 11 9 11 10 11 9 12 8 12 8 13 10 12 9 13 10 13 9 14 11 12 11 13 10 14 11 14 10 15 12 13 12 14 12 15 11 16 13 14 13 15 ...
output:
2 4 1 3 4 3 1 1 3 2 2 1 1 2 3 4 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 2 3 3 1 4 3 2 1 4 2 3 4 3 2 1 4 1 1 4 2 2 1 1 2 4 4 1 4 2 2 3 1 2 3 1 1 3 4 4 2 1 4 3 3 2 1 4 3 3 1 2 2 3 3 4 1 1 3 3 2 4 4 1 1 3 2 2 1 1 2 3 3 4 1 3 2 1 1 2 4 4 3 1 4 2 1 2 3 1 3 2 3 4 1 2 1 1 3 4 2 3 4 2 1 4 2 1 4 1 1 4 2 3 3 2 4 4 1 ...
result:
ok ...
Test #10:
score: 0
Accepted
time: 10ms
memory: 5000kb
input:
3223 9416 0 1 1 0 1 1 0 3 1 2 2 1 1 3 2 3 1 4 3 2 3 3 3 4 2 5 4 3 5 4 3 5 4 5 3 6 4 6 5 6 4 7 3 7 3 8 4 8 5 8 4 9 6 7 6 8 5 9 6 9 7 8 7 9 6 10 7 10 6 11 8 9 8 10 7 11 8 11 7 12 9 10 9 11 8 12 9 12 8 13 10 11 10 12 9 13 10 13 9 14 11 12 11 13 10 14 11 14 10 15 12 13 12 14 11 15 12 15 13 15 12 16 13 1...
output:
2 4 1 4 3 2 1 2 3 3 1 4 2 2 3 1 2 4 3 1 2 1 4 1 4 2 2 1 3 2 4 1 1 4 3 2 3 1 2 4 1 3 1 4 3 2 1 2 3 1 4 2 2 1 3 3 4 4 3 2 2 4 3 3 2 2 3 1 1 4 2 3 4 1 3 3 4 2 1 1 3 4 2 1 1 2 3 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 2 1 1 4 3 3 1 1 2 4 4 1 3 4 1 3 1 2 3 4 1 1 2 3 3 1 1 3 2 4 1 4 2 3 1 2 1 1 2 4 3 1 1 3 2 4 1 1 ...
result:
ok ...
Test #11:
score: 0
Accepted
time: 7ms
memory: 5012kb
input:
3186 9270 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 4 2 3 3 2 3 3 2 4 3 4 2 5 4 3 4 4 3 5 4 5 5 4 5 5 4 6 5 6 4 7 6 5 6 6 5 7 6 7 5 8 7 6 7 7 6 8 7 8 6 9 8 8 7 9 8 9 7 10 9 9 9 10 8 11 10 9 10 10 9 11 10 11 9 12 11 10 11 11 10 12 11 12 10 13 12 11 12 10 13 10 13 11 13 12 12 13 14 11 14 12 13 13 14 13 13 14 15 1...
output:
2 4 1 1 4 3 1 2 3 2 1 1 2 3 4 3 1 4 2 3 3 1 2 4 2 4 3 1 1 4 2 1 4 3 3 4 2 2 1 3 3 2 4 3 1 1 2 2 1 3 3 2 4 1 2 3 3 1 1 3 2 2 1 1 2 3 3 4 1 3 2 1 1 2 4 3 1 1 4 2 2 1 3 2 1 3 1 4 3 2 3 1 1 3 2 1 1 4 2 3 2 1 3 4 3 1 1 3 2 2 1 1 2 3 3 1 1 3 2 4 1 1 2 3 3 1 1 3 2 1 4 2 2 3 1 2 1 1 2 3 3 1 1 3 2 2 1 1 4 3 ...
result:
ok ...
Test #12:
score: 0
Accepted
time: 10ms
memory: 4964kb
input:
3183 9253 0 1 1 0 1 1 0 3 1 2 2 1 2 3 1 4 3 2 2 4 3 4 2 5 4 3 4 4 3 5 4 5 3 6 5 4 5 5 5 6 4 7 6 5 6 6 5 7 6 7 7 6 7 7 6 8 7 8 6 9 8 7 8 8 7 9 8 9 7 10 9 8 9 9 8 10 9 10 8 11 10 9 10 10 9 11 10 11 9 12 11 11 10 12 11 12 10 13 12 11 12 12 11 13 12 13 11 14 13 12 13 13 12 14 13 14 12 15 14 13 14 14 13 ...
output:
3 1 2 4 1 3 3 2 4 1 2 3 3 1 1 3 2 4 2 1 3 3 4 4 3 2 1 1 2 3 3 1 1 4 3 2 1 1 3 2 4 1 1 2 3 4 4 3 1 2 4 4 1 3 3 4 2 3 4 1 4 2 1 3 4 4 3 1 2 4 3 2 4 3 1 1 3 2 2 1 1 2 3 3 1 1 3 4 2 1 4 2 2 1 3 1 2 1 4 4 2 2 4 1 1 2 3 1 2 4 3 3 2 1 1 4 1 2 3 3 2 1 1 3 4 2 4 1 2 3 3 1 4 3 2 4 1 2 3 3 1 1 3 2 2 1 4 2 3 1 ...
result:
ok ...
Test #13:
score: 0
Accepted
time: 7ms
memory: 5028kb
input:
3633 9984 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 2 3 3 3 4 4 3 5 4 5 3 6 3 7 4 7 3 8 3 9 4 9 3 10 3 11 4 11 3 12 3 13 4 13 3 14 3 15 4 15 3 16 3 17 4 17 3 18 3 19 4 19 3 20 3 21 4 21 3 22 3 23 4 23 3 24 3 25 4 25 3 26 3 27 4 27 3 28 3 29 4 29 3 30 3 31 4 31 3 32 3 33 4 33 3 34 3 35 4 35 3 36 3 37...
output:
2 4 1 3 4 2 1 2 3 1 4 1 2 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 1 3 1 2 3 2 ...
result:
ok ...
Test #14:
score: 0
Accepted
time: 4ms
memory: 5020kb
input:
3273 9660 0 2 2 0 2 2 0 4 1 3 2 4 1 5 4 4 2 6 3 3 3 5 4 6 3 7 6 6 4 8 5 5 5 7 6 8 5 9 8 8 6 10 7 7 7 9 8 10 7 11 10 10 8 12 9 9 9 11 10 12 9 13 12 12 10 14 11 11 11 13 12 14 11 15 14 14 12 16 13 13 13 15 14 16 13 17 16 16 14 18 15 15 15 17 16 18 15 19 18 18 16 20 17 17 17 19 18 20 17 21 20 20 18 22 ...
output:
4 3 2 2 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 1 1 3 1 2 2 4 1 3 1 2 2 4 1 3 1 2 2 4 1 3 1 2 2 4 1 3 1 2 2 4 1 3 ...
result:
ok ...
Test #15:
score: 0
Accepted
time: 6ms
memory: 5148kb
input:
3336 9816 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 2 4 1 5 3 4 2 5 3 5 2 6 3 6 2 7 4 5 4 6 3 7 4 7 5 6 5 7 4 8 3 8 5 8 4 9 3 9 5 9 4 10 3 10 5 10 4 11 5 11 6 11 5 12 6 12 7 11 7 12 6 13 5 13 5 14 7 13 6 14 7 14 8 13 8 14 7 15 8 15 9 15 8 16 7 16 9 16 8 17 7 17 9 17 8 18 7 18 9 18 8 19 7 19 7 20 9 19 8 20...
output:
1 4 3 4 2 1 3 4 2 1 4 2 3 1 1 4 3 3 2 2 1 3 2 4 3 1 2 1 3 4 2 1 1 3 2 4 1 3 4 3 2 1 2 2 1 3 4 4 2 1 3 2 2 4 1 1 2 3 3 4 1 3 1 2 3 4 1 2 2 3 1 2 4 3 2 3 1 2 3 4 2 3 1 2 1 4 4 2 3 1 2 1 2 4 1 3 3 1 2 2 3 4 2 1 3 1 2 4 3 2 1 3 4 1 1 2 3 1 4 3 1 4 2 3 4 1 3 2 2 4 1 3 4 2 1 4 2 3 1 4 2 4 4 2 3 4 3 1 1 2 ...
result:
ok ...
Test #16:
score: 0
Accepted
time: 3ms
memory: 5012kb
input:
3308 9688 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 0 5 2 4 1 5 2 5 1 6 3 5 2 6 3 6 4 5 4 6 3 7 4 7 3 8 5 7 4 8 5 8 6 7 6 8 5 9 4 9 6 9 5 10 6 10 5 11 7 10 6 11 7 11 6 12 8 11 7 12 8 12 7 13 9 12 8 13 9 13 8 14 9 14 10 14 9 15 8 15 8 16 10 15 9 16 10 16 9 17 11 15 11 16 10 17 11 17 10 18 9 18 9 19 11 ...
output:
4 2 1 3 2 3 4 1 3 2 4 1 1 4 2 2 1 3 1 2 2 1 4 3 2 4 2 1 3 1 2 2 4 1 1 2 3 1 2 2 4 3 1 2 3 4 1 4 3 2 1 2 2 4 1 1 2 3 1 4 2 1 3 2 1 2 4 3 2 1 1 2 3 3 1 1 4 3 2 1 4 3 4 2 1 4 4 1 2 3 3 4 2 1 3 2 3 4 4 1 3 2 2 3 4 4 2 1 3 2 4 3 4 2 2 1 3 2 3 2 4 4 2 3 3 1 2 2 4 3 4 2 2 4 3 2 1 3 1 2 3 1 3 3 4 2 1 2 1 3 ...
result:
ok ...
Test #17:
score: 0
Accepted
time: 10ms
memory: 4956kb
input:
3273 9498 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 3 2 3 3 2 4 1 4 3 4 2 5 1 5 3 5 2 6 1 6 1 7 3 6 2 7 1 8 3 7 2 8 3 8 2 9 1 9 3 9 2 10 1 10 3 10 2 11 3 11 4 10 4 11 3 12 4 12 5 12 4 13 5 13 4 14 6 13 5 14 4 15 6 14 5 15 6 15 5 16 6 16 7 15 7 16 6 17 7 17 6 18 8 17 7 18 8 18 7 19 9 18 8 19 7 20 9 19 8 20 9 2...
output:
1 2 4 4 3 2 1 4 1 3 2 3 1 4 1 3 2 3 1 1 3 2 4 1 3 4 1 1 2 4 3 1 4 1 3 2 1 4 3 2 1 3 4 3 2 1 3 4 2 4 1 1 4 2 3 1 2 3 4 1 4 2 3 4 3 2 1 1 3 4 2 2 1 4 3 1 1 2 4 1 2 1 2 3 2 1 2 3 1 4 1 4 3 2 2 1 3 4 2 3 4 1 2 1 3 4 3 2 1 2 4 4 3 2 2 1 4 4 2 3 1 3 2 4 3 4 1 1 2 3 4 2 3 2 2 1 3 4 2 4 1 4 2 3 1 1 2 3 1 4 ...
result:
ok ...
Test #18:
score: 0
Accepted
time: 11ms
memory: 5100kb
input:
3253 9412 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 3 3 2 4 3 4 2 5 4 4 3 5 4 5 3 6 5 5 4 6 5 6 4 7 3 7 3 8 5 7 4 8 5 8 4 9 5 9 4 10 6 9 5 10 6 10 5 11 6 11 5 12 7 10 7 11 6 12 7 12 6 13 7 13 6 14 8 13 7 14 8 14 7 15 9 14 9 15 8 16 10 14 10 15 9 16 8 17 10 16 9 17 8 18 10 17 9 18 10 18 9 19 8 19 10 19 9 2...
output:
1 2 4 4 2 3 1 4 2 2 1 3 4 4 2 1 3 3 4 1 2 1 4 3 1 2 3 4 1 1 2 3 3 1 4 4 2 3 1 1 2 4 4 1 3 2 1 2 3 3 1 4 2 3 1 3 4 2 3 4 2 2 3 1 2 3 4 1 1 2 3 4 4 2 1 3 3 4 1 3 2 4 4 1 3 2 3 1 4 2 1 2 3 1 1 4 2 2 1 1 3 4 2 1 2 4 3 3 1 2 3 4 1 2 1 1 2 4 3 3 1 2 2 3 1 4 1 4 3 2 3 2 1 4 4 3 2 2 1 3 4 3 1 2 2 1 3 3 4 2 ...
result:
ok ...
Test #19:
score: 0
Accepted
time: 1ms
memory: 5032kb
input:
3235 9324 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 0 5 2 4 1 5 2 5 1 6 0 7 2 6 1 7 2 7 1 8 2 8 1 9 3 7 3 8 2 9 3 9 2 10 4 8 4 9 3 10 4 10 3 11 5 9 5 10 4 11 5 11 4 12 6 10 6 11 5 13 4 13 4 14 6 13 5 14 6 14 7 13 7 14 6 15 5 15 5 16 7 15 6 16 7 16 8 15 8 16 7 18 6 17 6 18 6 19 8 18 7 19 8 19 7 20 9 19...
output:
2 3 1 4 3 2 1 2 4 1 2 2 3 4 1 4 2 3 1 1 2 3 3 1 1 4 2 2 3 1 2 3 4 1 1 3 2 2 1 1 3 2 4 4 2 3 4 1 3 2 3 3 2 1 3 3 1 2 4 4 1 2 3 3 1 4 2 2 3 4 1 2 2 4 1 1 2 3 1 2 3 3 1 2 3 2 4 3 4 2 1 2 3 3 2 4 1 1 3 2 2 4 1 3 3 4 1 1 2 3 4 2 3 1 1 2 3 4 1 1 3 2 2 1 3 3 2 1 1 3 2 2 1 3 4 2 2 3 1 1 4 3 3 1 2 1 4 3 1 2 ...
result:
ok ...
Test #20:
score: 0
Accepted
time: 5ms
memory: 4888kb
input:
3203 9190 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 2 4 3 3 3 4 2 5 1 5 1 6 3 5 2 6 3 6 2 7 4 6 3 7 2 8 4 7 3 8 2 9 4 8 3 9 4 9 5 9 4 10 3 11 5 10 5 11 4 12 6 10 6 11 5 12 4 13 6 12 5 13 4 14 6 13 5 15 4 15 6 14 6 15 5 16 6 16 7 15 6 17 5 17 5 18 8 17 6 18 7 18 8 18 7 19 8 19 9 19 8 20 7 20 9 20 8 21 9 21...
output:
1 3 2 2 3 4 1 2 4 3 4 1 2 1 4 4 3 1 2 2 3 4 1 2 1 4 3 1 2 3 2 1 4 3 3 1 2 1 3 4 3 2 1 2 3 2 4 3 1 1 2 3 3 4 2 4 3 1 3 2 1 4 3 1 3 4 1 2 3 1 2 4 2 3 4 1 3 1 4 2 3 4 2 3 2 2 1 4 2 3 1 4 2 4 1 3 1 2 4 2 1 1 2 3 3 1 4 2 3 1 1 2 4 1 2 1 2 3 1 2 2 1 4 2 3 4 4 1 2 3 4 3 1 2 2 4 3 1 2 2 1 4 4 3 2 2 4 1 4 3 ...
result:
ok ...
Test #21:
score: 0
Accepted
time: 7ms
memory: 5008kb
input:
3177 9049 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 2 3 3 2 4 3 4 4 4 3 5 2 5 4 5 3 6 2 6 2 7 4 6 5 5 5 6 4 7 5 7 4 8 6 6 6 7 6 8 5 9 7 8 6 9 7 9 6 10 8 8 8 9 7 10 8 10 7 11 9 10 8 11 9 11 8 12 7 12 7 13 9 12 8 13 9 13 8 14 10 12 10 13 9 14 11 14 9 15 10 15 9 16 8 16 8 17 10 16 9 17 10 17 9 18 10 18...
output:
3 4 2 2 1 3 2 3 4 1 1 3 2 1 2 3 4 4 1 2 3 2 1 3 4 1 3 2 3 2 3 1 1 4 2 3 2 1 3 4 1 2 3 1 2 3 2 2 4 1 1 3 2 1 3 1 2 1 3 3 4 1 2 3 2 1 4 1 2 3 2 1 1 2 4 3 1 3 4 1 2 1 3 2 2 4 1 1 3 2 4 1 1 4 3 2 1 4 4 2 1 3 1 4 2 1 4 3 2 2 1 3 2 4 3 1 1 2 3 4 1 3 1 2 1 4 3 2 1 2 4 3 2 1 3 3 1 2 4 3 4 1 1 2 3 3 1 4 2 4 ...
result:
ok ...
Test #22:
score: 0
Accepted
time: 6ms
memory: 4920kb
input:
3156 8934 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 3 3 2 4 3 4 4 4 3 5 2 5 2 6 4 5 3 6 4 6 5 5 5 6 4 7 5 7 4 8 6 7 5 8 6 8 7 8 6 9 7 9 8 8 8 9 7 10 6 10 8 10 7 11 8 11 7 12 9 11 8 12 9 12 8 13 10 12 9 13 10 13 11 13 10 14 11 14 10 15 12 14 11 15 12 15 11 16 12 16 13 15 13 16 12 17 11 17 13 17 12 18 11 18...
output:
4 1 2 3 1 3 4 4 3 1 1 2 3 4 2 1 2 3 1 4 2 2 3 4 4 1 2 1 3 4 3 1 2 1 3 3 1 4 4 2 3 1 1 2 4 3 3 2 1 1 4 3 3 1 4 2 4 1 3 3 2 1 2 1 3 2 3 4 3 1 2 3 2 3 1 1 2 4 2 1 3 2 3 4 1 4 3 2 4 1 2 1 3 2 3 4 1 1 3 4 2 2 1 3 2 4 2 3 3 1 2 2 3 1 1 2 3 3 1 4 4 2 1 3 4 3 1 2 4 2 2 3 1 4 3 4 1 2 4 1 2 1 3 2 2 3 4 3 2 1 ...
result:
ok ...
Test #23:
score: 0
Accepted
time: 6ms
memory: 5008kb
input:
3134 8832 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 3 3 2 4 1 4 1 5 3 4 2 5 1 6 3 5 2 6 3 6 2 7 4 6 3 7 4 7 3 8 5 7 5 8 5 9 6 9 7 9 6 10 5 10 5 11 7 10 6 11 7 11 8 10 8 11 7 12 8 12 9 11 9 12 8 13 9 13 10 12 10 13 9 14 10 14 11 14 10 15 11 15 12 15 11 16 10 16 10 17 12 16 11 17 12 17 11 18 13 16 13 17 12 ...
output:
3 2 1 1 2 4 3 4 1 2 3 2 1 1 4 2 2 1 3 2 4 1 2 3 3 1 3 2 4 1 2 3 3 4 2 4 1 1 3 2 1 2 4 3 1 1 3 4 2 1 2 3 1 4 1 1 2 3 3 1 1 3 2 1 2 4 3 1 2 3 1 1 3 1 4 2 4 1 3 3 1 2 4 1 2 3 2 1 1 2 3 4 1 2 3 2 3 1 4 3 1 3 2 1 3 4 1 2 2 3 1 4 3 2 2 1 3 4 2 3 1 2 3 2 4 3 1 2 4 1 2 3 1 2 3 1 1 4 3 2 2 1 3 2 1 1 2 3 1 4 ...
result:
ok ...
Test #24:
score: 0
Accepted
time: 8ms
memory: 5008kb
input:
3115 8728 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 3 3 2 4 3 4 2 5 4 3 4 4 3 6 2 6 4 6 3 7 2 7 2 8 5 7 3 8 4 8 3 9 2 9 4 9 3 10 4 10 3 11 5 10 4 11 3 12 5 11 4 12 5 12 4 13 7 12 5 13 6 13 7 13 6 14 5 14 6 15 5 15 5 16 7 15 6 16 7 16 6 17 8 16 7 17 6 18 8 17 7 18 8 18 9 18 8 19 9 19 10 19 9 20 10 20 9 21 11 1...
output:
2 4 3 4 1 4 3 2 1 1 3 2 2 1 1 3 4 2 1 3 3 1 3 4 2 2 3 1 2 3 4 3 1 1 2 4 3 1 3 1 2 3 1 2 3 2 2 3 1 1 4 2 2 3 1 3 4 2 1 1 4 2 2 1 3 1 4 2 4 1 4 2 2 3 4 1 2 2 1 3 1 3 1 2 4 3 2 4 3 3 1 4 2 3 1 1 3 2 2 1 4 2 3 1 1 2 3 4 1 2 1 3 2 3 3 1 2 1 3 2 1 2 4 3 4 3 1 1 2 3 3 1 2 3 4 1 1 2 3 1 2 1 3 2 4 4 1 3 2 4 ...
result:
ok ...
Test #25:
score: 0
Accepted
time: 5ms
memory: 4496kb
input:
926 2225 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 0 5 1 5 2 5 1 7 2 6 2 7 1 9 0 9 2 9 1 10 0 11 2 10 1 11 2 11 3 11 2 12 1 13 4 12 2 13 1 14 3 13 2 14 3 14 3 15 1 15 5 15 3 16 4 16 5 16 4 17 3 18 4 18 5 18 6 17 5 20 6 19 7 19 6 21 7 20 9 20 7 21 8 21 8 23 7 22 7 23 7 24 9 23 8 24 9 24 8 25 9 25 10 24 11 ...
output:
3 2 1 4 2 3 1 2 3 2 1 3 4 1 3 2 3 1 4 1 3 3 2 1 1 3 3 2 1 1 3 2 1 2 2 3 2 1 3 1 2 1 2 3 4 2 1 3 2 2 1 2 3 1 3 3 1 2 4 3 1 2 2 1 3 2 1 4 3 3 1 4 2 1 3 4 2 1 3 2 2 1 4 3 2 3 1 3 2 1 3 1 2 4 3 1 2 1 3 2 3 1 2 1 3 2 1 1 3 4 3 2 1 2 3 1 4 2 1 1 3 2 2 3 1 1 3 2 2 3 1 2 4 1 3 2 1 4 4 1 2 1 3 2 1 2 3 4 1 2 ...
result:
ok ...
Test #26:
score: 0
Accepted
time: 1ms
memory: 4416kb
input:
662 1598 0 1 1 0 1 1 0 3 1 2 1 3 2 3 3 2 2 4 3 4 4 3 4 4 3 5 4 5 5 5 4 6 6 6 4 7 5 7 6 7 5 9 6 8 6 9 6 10 7 10 6 11 9 8 8 8 9 7 10 8 9 9 10 9 10 10 9 11 11 10 10 11 11 11 12 11 12 12 13 11 13 12 12 13 10 13 12 14 10 14 11 15 13 14 12 15 13 15 14 15 13 16 12 17 14 16 15 16 14 17 13 18 17 17 14 18 13 ...
output:
4 2 3 1 2 3 1 3 2 4 2 3 1 2 1 4 3 2 3 2 4 1 2 3 1 4 3 2 1 2 1 3 2 4 4 1 3 1 2 4 3 1 2 2 1 4 3 1 2 1 3 2 2 3 1 4 3 3 2 2 1 3 3 4 1 3 4 2 1 1 1 3 2 4 3 4 2 1 3 3 2 2 1 3 2 3 1 4 1 3 2 3 1 4 3 3 2 1 4 2 3 2 1 1 3 2 2 1 1 4 1 3 2 3 1 2 2 1 3 2 3 1 4 2 1 4 3 1 3 2 3 1 4 2 3 2 4 1 1 4 1 3 2 3 2 1 3 2 4 1 ...
result:
ok ...
Test #27:
score: 0
Accepted
time: 9ms
memory: 4828kb
input:
2517 7117 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 3 2 3 3 2 4 1 4 1 5 3 4 2 5 3 5 2 6 3 6 2 7 4 6 3 7 5 7 3 8 4 8 5 8 4 9 5 9 6 9 5 10 4 10 4 11 6 10 5 11 4 12 6 11 5 12 6 12 7 11 7 12 6 13 7 13 6 14 8 13 8 14 7 15 9 13 9 14 8 15 9 15 8 16 10 15 9 16 8 17 10 16 9 17 8 18 10 17 9 18 10 18 11 17 11 18 10 19 1...
output:
4 1 3 3 2 1 4 3 4 2 1 2 3 3 4 2 1 3 4 1 2 1 1 4 3 1 2 1 4 2 1 3 2 4 1 1 4 3 2 2 1 3 3 4 2 2 1 1 3 4 4 1 3 3 2 1 1 4 3 2 1 1 2 4 1 3 2 4 3 1 1 2 3 4 2 1 3 2 1 4 4 1 3 2 4 1 1 3 4 4 1 1 2 3 3 4 1 2 4 3 3 1 2 4 3 1 4 1 2 2 3 1 4 1 2 2 3 1 1 2 3 3 1 2 2 3 1 2 3 3 1 4 2 3 4 1 1 3 2 4 4 3 1 3 4 2 4 3 1 3 ...
result:
ok ...
Test #28:
score: 0
Accepted
time: 4ms
memory: 4380kb
input:
767 1862 0 1 1 0 1 1 0 3 1 2 2 1 3 2 1 4 2 3 3 3 2 4 1 5 2 5 3 5 5 5 3 6 4 6 5 6 4 7 3 8 4 8 5 8 6 7 6 8 4 10 6 9 5 10 7 9 7 10 8 9 8 10 9 10 8 11 6 11 8 12 7 13 10 12 8 13 6 15 8 14 7 15 10 14 8 15 7 16 9 15 8 16 9 16 10 15 11 15 12 14 12 15 11 17 10 17 13 17 12 18 10 18 13 18 14 17 14 18 13 19 12 ...
output:
2 1 3 4 1 2 4 2 2 1 4 1 3 2 1 1 3 4 2 4 1 3 2 1 2 3 1 2 1 4 3 1 2 3 1 3 2 2 1 1 3 4 4 2 3 1 2 1 2 3 1 3 1 2 1 2 4 1 2 3 1 1 4 2 2 3 1 4 3 2 4 1 3 2 3 3 2 1 1 1 2 3 2 3 1 1 3 3 2 4 3 3 1 2 2 3 4 1 2 3 2 1 4 2 2 1 2 3 1 3 1 2 1 3 1 4 2 1 3 3 1 2 2 4 3 1 2 2 1 3 3 1 2 1 3 3 1 4 2 4 1 3 2 2 3 1 2 4 3 1 ...
result:
ok ...
Test #29:
score: 0
Accepted
time: 5ms
memory: 4496kb
input:
963 2373 0 1 1 0 1 1 0 3 1 2 1 3 2 3 1 4 0 5 2 5 1 6 3 4 3 5 2 6 2 7 3 7 4 6 4 7 3 8 2 8 3 10 2 9 2 10 4 9 4 10 3 11 2 11 2 12 4 11 3 12 4 12 3 13 6 12 4 13 5 13 5 14 6 14 5 15 6 15 7 14 7 15 6 16 7 16 8 16 9 15 9 16 8 17 9 17 8 18 7 18 7 19 9 18 8 19 7 20 9 19 8 20 9 20 8 21 9 21 8 22 10 20 10 21 9...
output:
4 3 2 3 1 2 3 1 4 3 2 2 1 1 4 3 4 2 1 2 4 1 2 1 2 3 1 2 1 1 2 3 1 1 2 4 3 1 2 1 3 3 1 4 1 3 2 4 1 3 2 2 3 4 1 2 3 1 4 2 2 3 3 1 2 3 2 4 1 2 2 3 1 3 2 1 3 3 2 1 2 3 1 3 2 1 3 2 1 3 2 1 2 4 1 3 4 2 3 1 2 3 2 1 4 1 2 3 3 1 2 1 2 3 1 3 4 1 2 3 1 4 2 3 1 4 2 3 1 1 3 2 2 4 1 2 2 3 1 1 3 2 2 3 1 1 3 2 3 1 ...
result:
ok ...
Test #30:
score: 0
Accepted
time: 2ms
memory: 4564kb
input:
1217 2984 0 1 1 0 1 1 0 3 1 2 3 2 1 3 2 3 1 4 3 3 2 4 3 4 2 5 4 5 3 6 1 6 2 7 3 7 4 7 3 8 5 6 5 7 4 8 3 9 5 8 4 9 4 10 5 10 6 9 6 10 5 11 6 11 5 13 6 12 7 12 6 14 5 14 7 14 6 15 5 15 7 15 6 16 4 16 5 17 7 16 6 17 7 17 6 18 7 18 6 19 8 18 9 18 8 20 9 19 11 19 9 20 10 20 9 21 11 20 11 21 10 22 12 20 1...
output:
3 2 1 2 4 1 3 2 1 4 3 2 1 3 3 2 1 2 1 4 4 2 3 2 1 4 3 2 1 4 1 3 2 4 2 2 3 3 1 2 2 3 1 1 1 4 3 2 1 3 2 3 3 1 2 2 3 1 1 4 2 3 2 1 2 2 1 3 1 4 3 2 1 3 1 1 2 4 4 1 3 3 2 1 1 3 2 1 2 4 3 2 2 1 2 1 3 3 4 4 1 2 3 3 2 1 1 2 3 2 3 4 1 2 3 1 3 2 2 1 3 2 1 2 3 1 3 2 1 3 2 1 3 2 1 4 3 1 2 3 1 4 2 3 1 3 2 2 3 1 ...
result:
ok ...
Test #31:
score: 0
Accepted
time: 5ms
memory: 4568kb
input:
971 2364 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 4 2 3 3 2 4 3 2 4 3 4 2 5 4 4 3 6 2 6 2 7 4 5 3 7 4 7 3 8 2 8 2 9 5 8 3 10 4 9 5 9 4 10 5 10 6 9 6 10 4 12 6 11 5 12 8 11 7 12 6 13 9 12 7 14 6 14 8 14 7 15 7 16 8 16 9 16 8 17 7 17 9 17 8 18 7 18 7 19 9 18 8 19 10 19 8 20 9 20 10 20 9 21 10 21 11 20 10 22 8 22...
output:
2 3 1 1 3 4 1 2 4 3 1 1 2 4 3 3 1 4 1 2 3 1 3 2 2 4 4 1 2 3 2 1 2 2 3 1 3 1 2 1 2 2 4 1 3 1 2 3 3 4 1 3 1 2 3 1 4 2 1 3 1 2 3 1 3 2 4 2 3 1 2 3 1 2 1 3 3 2 1 2 3 1 3 2 1 2 1 3 3 1 2 1 4 3 1 2 2 1 4 2 1 1 3 2 2 1 2 3 1 2 4 3 1 3 2 1 3 4 1 2 3 1 4 2 3 1 1 3 2 2 3 1 1 3 2 3 1 1 4 2 3 1 1 2 2 3 1 1 3 2 ...
result:
ok ...
Test #32:
score: 0
Accepted
time: 7ms
memory: 4680kb
input:
2058 5112 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 3 2 3 3 2 4 1 4 1 5 3 4 2 5 1 6 3 5 2 6 2 7 3 7 4 6 4 7 3 8 1 8 2 9 3 9 4 9 3 10 2 10 2 11 4 10 3 11 4 11 3 12 2 12 3 14 4 13 5 12 5 13 4 14 6 15 5 15 6 14 7 14 7 15 6 16 7 16 8 15 8 16 8 17 5 17 7 18 9 16 8 18 9 18 8 19 10 17 10 18 10 19 11 18 10 20 9 2...
output:
1 2 3 4 2 1 3 3 1 2 3 2 1 4 4 1 3 2 2 1 4 1 3 2 3 1 3 2 4 3 1 1 3 2 4 2 3 1 4 2 4 4 1 1 2 3 1 2 4 1 3 2 2 2 1 2 3 4 3 1 2 2 3 1 1 4 2 3 4 1 2 2 3 1 3 1 3 2 2 4 3 2 1 3 4 2 3 4 2 1 2 2 1 3 2 4 3 3 2 1 3 4 1 1 2 2 4 1 2 3 4 1 2 1 4 1 2 2 2 3 1 3 2 3 2 1 2 4 3 1 2 3 4 1 4 2 3 1 3 2 1 3 1 2 2 2 3 2 1 4 ...
result:
ok ...
Test #33:
score: 0
Accepted
time: 3ms
memory: 4720kb
input:
1982 5590 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 3 3 1 4 0 5 2 4 1 5 1 6 2 6 3 5 3 6 2 7 3 7 2 8 4 7 3 8 4 8 5 8 4 9 5 9 6 9 5 10 6 10 7 9 7 10 6 11 8 12 7 12 8 11 9 11 9 12 8 13 7 13 9 13 8 14 7 14 7 15 9 14 8 15 9 15 10 14 10 15 9 16 10 16 9 17 11 15 11 16 10 17 9 18 11 17 10 18 11 18 12 17 12 18 11 19 1...
output:
3 1 2 2 1 4 2 4 1 3 1 1 2 4 1 2 3 3 4 2 2 1 3 4 2 1 3 4 2 1 3 3 1 2 2 3 2 3 4 1 2 1 3 4 4 1 3 2 2 3 1 1 4 2 4 3 3 1 2 4 2 1 1 3 4 2 1 4 2 3 1 1 2 3 4 1 4 4 2 3 1 4 1 2 2 3 1 4 1 4 2 2 3 1 1 2 4 4 3 1 2 2 3 4 2 1 3 2 3 4 2 3 1 4 2 1 1 3 2 2 4 1 4 2 3 2 1 3 3 2 1 3 1 4 2 4 1 3 4 2 3 2 1 4 3 1 2 1 4 3 ...
result:
ok ...
Test #34:
score: 0
Accepted
time: 1ms
memory: 4328kb
input:
802 2188 0 1 1 0 1 1 0 5 1 2 2 2 1 3 2 3 1 4 2 4 1 5 3 3 3 4 2 5 3 5 4 5 3 6 4 6 3 7 5 6 4 7 3 8 4 8 5 8 6 7 6 8 5 9 4 9 5 10 6 10 7 9 6 11 4 13 8 9 7 11 6 12 7 12 8 11 8 12 7 13 6 14 8 13 7 14 8 14 9 14 8 15 6 15 7 16 9 15 8 16 9 16 10 15 9 17 10 17 9 18 8 18 9 19 10 19 9 20 11 19 10 20 11 20 10 21...
output:
3 1 2 4 1 3 4 2 1 3 2 1 2 1 4 1 2 3 1 1 2 4 1 4 1 2 3 2 1 2 1 3 2 2 4 2 1 2 3 4 1 2 3 1 4 2 3 1 1 4 3 2 1 4 3 2 1 2 3 1 1 3 4 2 4 2 1 2 3 1 1 2 3 3 4 3 2 1 2 2 4 3 3 1 2 1 3 4 4 2 1 1 3 2 4 4 1 2 2 4 3 1 2 1 3 2 2 3 1 3 2 1 2 4 1 3 2 1 4 2 3 1 1 3 2 2 3 1 1 4 2 3 1 1 3 2 2 3 1 1 3 2 2 1 1 2 3 3 2 1 ...
result:
ok ...
Test #35:
score: 0
Accepted
time: 8ms
memory: 4788kb
input:
2511 6643 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 3 2 3 3 2 4 1 5 2 5 3 5 2 6 4 4 4 5 3 6 2 7 4 6 3 7 5 8 4 8 5 7 7 6 6 6 7 5 7 7 8 7 7 8 8 8 9 8 9 7 10 7 10 8 9 9 8 10 9 10 10 10 11 9 10 11 11 11 12 10 12 11 13 10 13 11 12 12 13 12 14 11 14 12 13 13 14 13 13 14 15 12 15 13 16 12 16 13 15 14 16 14 15 15...
output:
1 2 3 4 2 1 1 3 2 2 1 4 1 3 2 1 4 1 4 3 3 2 2 3 1 1 3 2 3 4 1 2 1 2 3 2 4 2 3 1 4 2 3 1 2 3 1 1 4 2 1 3 2 1 4 3 1 2 2 1 4 2 3 1 1 3 4 2 3 1 4 3 2 1 3 4 2 3 1 2 1 4 1 2 1 3 2 1 4 2 4 3 1 4 3 2 1 1 3 1 2 3 3 2 1 1 4 1 3 2 1 2 4 2 3 1 2 4 1 3 2 1 4 1 1 4 2 1 3 2 1 3 1 2 3 2 1 1 3 2 1 2 3 1 4 3 2 2 1 2 ...
result:
ok ...
Test #36:
score: 0
Accepted
time: 6ms
memory: 4328kb
input:
862 2006 0 1 1 0 1 1 0 5 1 2 1 4 2 3 2 1 3 2 3 3 2 4 3 4 2 5 1 6 3 6 2 7 4 5 3 7 4 7 3 8 5 7 4 8 5 8 4 9 5 9 6 9 5 10 3 10 6 10 5 11 6 11 5 12 3 12 6 12 5 13 7 14 6 14 7 13 8 14 7 15 6 15 8 16 9 16 8 17 7 17 9 17 8 18 7 18 7 19 10 18 9 19 10 17 10 19 12 19 10 20 9 20 9 21 11 21 10 22 12 21 11 23 10 ...
output:
4 2 1 3 2 4 1 3 3 2 3 1 2 1 1 4 4 2 3 1 2 2 1 3 2 1 3 1 2 4 1 3 1 2 2 1 4 4 3 2 3 1 4 2 4 3 1 3 2 2 4 1 1 3 2 3 1 1 2 2 2 1 1 3 1 2 3 3 1 2 3 1 3 2 1 4 3 2 1 2 3 1 3 1 2 3 1 3 1 2 1 2 1 3 2 1 2 3 1 2 3 2 1 3 2 1 2 3 1 4 2 3 1 1 3 2 2 1 3 1 2 4 1 2 1 3 2 1 3 2 3 1 3 2 3 1 3 2 3 1 1 3 2 1 2 3 2 3 3 2 ...
result:
ok ...
Test #37:
score: 0
Accepted
time: 6ms
memory: 4656kb
input:
1615 4544 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 3 3 2 4 3 4 2 5 3 5 2 6 4 5 3 6 3 7 4 7 5 6 5 7 4 8 3 8 3 9 6 8 4 9 5 9 6 10 4 10 6 11 7 11 7 9 8 10 8 11 7 12 8 12 9 11 8 13 7 13 7 14 9 13 8 14 9 14 8 15 10 14 9 15 8 16 10 15 9 16 8 17 10 16 9 17 10 17 9 18 8 18 10 18 9 20 10 19 11 18 11 19 10 20 11 2...
output:
2 3 1 1 3 4 2 1 3 3 4 2 2 1 4 2 3 2 1 3 2 4 1 3 3 2 1 3 1 2 1 4 2 3 3 2 1 1 2 4 3 2 4 1 1 2 3 3 4 1 1 2 4 3 2 1 1 2 3 4 3 1 4 3 2 2 1 3 3 2 4 2 1 1 3 2 1 4 2 3 3 2 1 1 4 3 4 2 1 2 1 4 3 4 2 1 3 2 3 1 2 2 4 4 2 1 3 1 3 2 4 2 3 1 2 1 3 2 1 4 1 3 3 3 4 1 2 3 1 2 3 2 3 1 3 2 1 2 3 1 3 2 1 2 3 4 3 1 2 1 ...
result:
ok ...
Test #38:
score: 0
Accepted
time: 4ms
memory: 4932kb
input:
3443 7658 0 1 1 0 1 1 0 3 2 3 1 3 2 2 3 2 2 4 3 4 2 5 4 4 3 5 2 6 2 7 3 7 2 8 4 6 4 8 5 7 4 9 3 10 6 7 5 9 4 10 5 11 6 11 5 12 4 13 6 12 6 13 6 14 7 14 9 12 8 14 8 15 9 15 8 16 11 16 9 17 8 18 9 19 10 18 11 18 10 19 11 19 12 19 12 18 13 19 14 18 14 19 13 21 12 21 14 21 13 22 12 22 14 22 13 23 14 23 ...
output:
3 4 2 1 2 3 3 1 1 3 4 1 2 1 3 2 1 4 1 2 4 1 1 2 3 1 3 4 1 1 2 1 4 1 2 3 1 2 1 3 2 2 1 3 3 2 1 2 4 3 2 1 3 3 4 2 1 1 2 3 1 2 4 3 2 1 3 3 2 1 3 4 2 1 3 2 2 1 1 2 2 4 1 3 2 1 3 3 2 1 3 4 2 1 3 2 1 3 4 2 1 3 1 2 2 4 1 3 2 3 1 1 3 4 2 1 1 1 2 2 3 4 2 1 4 3 4 1 2 1 1 4 2 2 3 1 2 3 3 2 1 1 4 2 1 3 1 2 1 3 ...
result:
ok ...
Test #39:
score: 0
Accepted
time: 4ms
memory: 4684kb
input:
1721 4230 0 1 1 0 1 1 0 3 1 2 2 1 1 3 3 3 1 4 2 4 1 5 2 5 0 7 4 3 3 5 2 6 1 7 3 6 2 7 1 8 2 8 3 8 2 9 4 7 4 8 6 8 4 9 5 9 6 9 4 11 7 9 6 10 7 10 7 11 6 11 9 11 7 12 6 12 6 13 8 12 9 12 8 13 10 13 8 14 5 14 7 15 8 15 10 15 9 16 7 16 8 17 11 16 9 17 8 18 9 18 10 18 9 19 11 18 10 19 12 20 11 20 13 20 1...
output:
4 2 3 1 2 1 4 1 3 2 1 4 2 3 1 2 3 3 1 4 3 2 1 1 3 4 2 1 3 1 2 4 1 3 2 2 1 3 2 4 1 3 2 1 3 4 2 1 1 3 4 2 3 2 1 2 3 1 1 1 2 4 3 1 2 3 1 4 3 1 2 3 4 2 1 1 3 2 4 3 1 3 2 1 2 1 4 3 2 3 1 3 1 2 3 1 4 2 3 1 4 3 2 1 3 2 1 4 3 1 2 1 3 2 3 2 1 3 2 3 4 1 2 3 1 3 2 1 2 1 3 2 1 3 2 3 4 1 2 3 1 3 2 1 3 3 2 1 3 1 ...
result:
ok ...
Test #40:
score: 0
Accepted
time: 6ms
memory: 4696kb
input:
1914 4267 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 3 4 2 5 4 3 4 4 3 6 2 7 3 7 2 8 5 7 5 6 6 7 5 8 6 8 7 7 7 8 6 9 5 9 6 10 4 10 5 11 6 11 5 12 7 11 6 12 7 12 6 13 5 13 5 14 7 14 8 14 7 15 8 15 9 15 8 16 9 16 8 17 10 16 9 17 9 18 10 18 11 17 11 18 10 19 11 19 10 22 9 22 10 24 11 23 12 23 11 24 12 24 11 25 13...
output:
2 4 3 1 4 2 3 1 3 1 2 1 2 3 1 2 2 3 1 3 4 3 2 1 2 2 1 3 1 2 2 4 1 3 4 1 2 4 1 3 1 1 2 3 4 1 2 4 3 1 2 3 1 2 3 2 1 1 4 2 3 1 2 3 1 2 3 4 1 2 3 3 1 2 2 1 3 2 3 1 2 2 1 3 1 1 3 2 4 3 3 2 1 2 2 4 3 1 2 3 1 4 4 3 1 2 3 3 1 2 1 1 2 2 2 1 1 3 2 2 3 1 3 2 1 2 3 1 3 3 4 1 2 3 1 3 2 1 2 2 4 1 1 3 2 3 1 4 1 2 ...
result:
ok ...
Test #41:
score: 0
Accepted
time: 5ms
memory: 4576kb
input:
1204 2836 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 1 4 2 4 1 5 3 3 2 5 1 6 3 5 2 6 1 7 3 7 2 8 4 7 3 8 4 8 3 9 4 9 3 10 4 10 3 11 4 11 3 12 1 10 2 12 3 13 4 13 3 14 2 14 4 14 3 16 2 17 4 16 3 17 4 17 3 18 4 18 5 18 4 19 3 19 6 19 4 20 3 21 5 20 5 21 4 22 6 21 5 22 6 22 5 23 7 22 6 24 5 24 6 25 5 25 6 26 5 27...
output:
2 4 1 1 4 3 1 2 3 1 2 3 3 1 1 2 3 1 2 2 3 1 2 3 1 2 3 1 2 1 3 1 3 2 1 1 1 2 3 4 2 1 3 1 2 3 4 1 3 3 4 1 1 2 3 1 1 2 4 1 3 2 1 1 3 2 2 1 2 1 3 1 2 2 1 3 1 4 2 2 3 1 3 1 2 1 3 2 3 1 2 3 3 2 4 1 2 4 3 1 2 3 1 1 3 2 2 3 1 3 2 2 1 3 2 3 2 1 3 2 3 1 2 1 2 1 3 1 2 3 1 4 2 3 1 1 2 2 3 1 3 1 3 2 3 1 2 2 3 1 ...
result:
ok ...
Test #42:
score: 0
Accepted
time: 4ms
memory: 4368kb
input:
476 1070 0 1 1 0 1 1 0 5 1 2 2 1 2 2 2 3 4 3 2 4 1 4 2 5 3 5 4 5 3 7 4 6 5 6 4 7 4 8 5 8 5 9 3 9 6 8 5 10 4 10 7 10 5 11 4 11 5 12 4 12 4 13 3 13 3 14 6 13 4 15 5 14 5 16 6 15 6 16 7 16 6 17 7 13 8 16 8 15 9 16 8 17 7 18 9 17 8 18 8 19 9 19 8 20 7 20 7 21 9 20 8 21 9 21 10 21 9 22 11 22 12 21 13 22 ...
output:
4 2 1 3 3 4 1 2 1 3 4 2 1 4 2 2 3 1 3 1 2 1 3 1 4 3 2 3 1 2 3 4 1 2 2 1 3 3 2 1 3 3 2 4 1 4 3 3 2 1 3 4 2 1 2 2 1 2 3 1 3 2 3 1 2 2 3 1 1 3 2 3 4 2 1 3 2 1 3 1 1 2 3 1 4 2 3 1 2 2 3 1 1 3 3 2 1 1 3 2 2 3 1 1 3 2 3 1 1 3 2 1 4 1 1 3 2 1 1 1 3 2 1 2 4 1 3 2 3 4 2 1 4 2 3 1 3 2 3 1 1 4 2 1 2 3 1 2 1 3 ...
result:
ok ...
Test #43:
score: 0
Accepted
time: 5ms
memory: 4432kb
input:
1017 2311 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 1 4 2 4 2 5 1 6 3 4 3 5 2 6 3 6 2 7 1 8 4 7 3 8 2 9 4 9 3 10 5 9 4 10 3 11 4 11 5 11 5 12 6 12 5 13 7 12 6 13 7 13 6 15 7 14 8 14 7 15 8 15 7 16 8 17 6 17 9 16 9 17 10 16 10 17 8 19 11 17 10 18 10 19 11 19 10 20 12 18 12 19 11 20 11 21 9 21 10 22 12 21 11 23...
output:
3 2 1 1 2 3 1 3 2 4 1 2 3 2 3 1 4 1 2 3 1 1 2 2 3 4 2 1 3 2 1 1 4 3 1 2 1 4 2 3 1 2 4 3 2 1 2 3 2 1 3 2 1 2 1 4 3 2 1 3 2 4 1 2 2 3 1 1 3 2 1 1 3 3 4 2 1 3 1 2 3 1 3 3 4 3 2 1 3 2 4 1 3 2 1 4 2 3 2 3 1 2 1 3 1 2 3 2 4 1 3 2 4 1 4 3 2 1 3 2 4 1 3 2 3 1 2 3 2 3 1 3 2 4 1 3 2 3 1 2 3 1 1 2 1 3 1 2 3 1 ...
result:
ok ...
Test #44:
score: 0
Accepted
time: 1ms
memory: 4596kb
input:
1367 3169 0 1 1 0 1 1 0 7 1 2 2 2 1 4 2 3 3 3 2 4 3 4 4 4 3 5 1 5 2 6 4 5 3 7 4 6 5 6 5 7 6 7 5 8 6 8 5 9 7 8 5 10 8 8 7 9 6 10 7 10 6 11 7 11 8 11 9 10 9 11 10 10 10 11 11 10 10 12 9 13 11 12 10 13 9 14 11 13 10 14 11 14 10 15 12 13 12 15 12 16 13 16 14 15 14 16 13 17 11 17 12 18 13 18 14 18 15 17 ...
output:
1 4 3 3 2 1 4 3 4 2 1 3 4 3 3 2 2 1 3 1 2 3 1 2 2 1 3 1 4 2 3 1 3 2 1 3 2 1 3 4 2 1 2 3 3 2 1 1 3 1 2 4 1 3 2 1 2 1 3 2 3 4 1 2 1 1 3 2 2 3 1 2 1 2 4 3 1 2 1 4 3 2 1 2 2 1 3 1 2 3 1 2 3 1 2 2 1 4 3 2 1 2 3 4 2 2 1 4 3 1 2 1 4 1 2 2 3 4 2 1 3 4 2 3 2 1 3 2 1 1 1 3 2 2 3 1 3 2 2 1 3 2 2 1 3 3 1 4 2 1 ...
result:
ok ...
Test #45:
score: 0
Accepted
time: 0ms
memory: 4216kb
input:
25 62 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 3 3 2 4 1 4 1 5 3 4 2 5 3 5 4 5 3 6 1 6 0 5 4 3 3 2 4 1 3 0 3 1 2 1 1 2 1 3 1 4 1 5 5 6 5 7 5 8 8 9 8 10 10 11 10 12 10 13 10 14 10 15 15 16 15 17 17 18 18 19 16 17 16 20 20 21 20 22 22 23 22 24 24 25 23 25 23 24 21 24 21 22 14 18 14 15 14 17 13 20 13 15 13 16 1...
output:
3 4 2 2 1 4 4 2 1 3 1 4 4 1 2 1 3 2 3 2 3 1 3 2 1
result:
ok ...
Test #46:
score: 0
Accepted
time: 3ms
memory: 4256kb
input:
49 109 0 1 1 0 1 1 0 3 1 2 1 3 1 5 2 4 3 3 3 4 3 5 4 5 3 6 5 5 4 6 5 6 4 7 6 5 6 6 6 7 5 8 7 7 7 8 8 7 7 6 8 5 7 4 8 3 7 2 7 3 8 1 7 0 7 1 6 1 5 2 6 2 5 3 4 2 6 4 3 1 3 2 2 1 3 0 3 8 1 8 2 7 1 6 1 7 0 7 1 2 1 3 1 4 1 5 5 6 6 7 6 8 8 9 8 10 10 11 10 12 12 13 12 14 12 15 12 16 16 17 16 18 16 19 16 20 ...
output:
4 3 2 3 1 2 4 1 2 3 2 1 3 2 2 3 1 1 2 1 3 3 2 1 4 2 3 1 3 2 2 3 1 2 4 1 3 1 4 2 3 4 1 2 3 1 3 2 1
result:
ok ...
Test #47:
score: 0
Accepted
time: 0ms
memory: 4280kb
input:
22 48 0 1 1 0 1 1 0 3 1 2 2 1 3 0 3 1 3 2 4 1 3 3 4 3 3 4 4 5 3 5 3 6 1 6 2 5 1 4 1 5 2 3 0 5 1 2 1 3 1 4 1 5 5 6 6 7 6 8 6 9 9 10 9 11 9 12 12 13 12 14 14 15 14 16 16 17 16 18 18 19 18 20 18 21 20 22 19 22 19 21 19 20 17 22 17 20 17 18 15 18 15 16 13 21 13 15 13 14 11 21 11 12 11 13 10 12 8 10 8 9 ...
output:
1 2 3 4 2 1 3 2 3 1 1 2 4 1 3 2 3 1 3 2 2 1
result:
ok ...
Test #48:
score: 0
Accepted
time: 3ms
memory: 4308kb
input:
22 48 0 1 1 0 1 1 0 3 1 2 2 1 1 3 2 3 1 4 5 4 4 3 5 3 6 3 5 2 6 1 5 0 5 1 4 1 3 0 4 2 3 2 3 3 1 2 1 3 1 4 1 5 5 6 5 7 7 8 7 9 9 10 10 11 10 12 10 13 13 14 13 15 15 16 15 17 17 18 18 19 18 20 20 21 20 22 21 22 19 21 16 19 16 18 16 17 14 18 14 20 14 17 14 15 12 20 12 14 12 13 11 22 11 20 11 12 8 9 8 2...
output:
1 4 3 4 2 1 3 2 1 2 1 4 1 3 2 3 1 4 2 2 1 3
result:
ok ...
Test #49:
score: 0
Accepted
time: 3ms
memory: 4348kb
input:
54 127 0 1 1 0 1 1 0 5 1 2 2 1 2 2 3 2 2 3 1 4 2 4 3 4 2 5 4 4 3 5 3 6 4 6 5 5 5 6 4 7 5 7 6 7 5 8 3 8 7 8 7 7 8 7 7 6 8 5 7 4 6 5 8 3 7 2 8 1 7 0 7 1 6 1 5 0 4 1 6 2 5 2 6 3 4 2 3 0 3 1 5 4 6 6 1 8 2 7 3 7 1 5 1 6 0 7 1 7 1 2 1 3 1 4 1 5 5 6 5 7 7 8 7 9 9 10 9 11 9 12 12 13 12 14 12 15 15 16 15 17 ...
output:
4 1 3 2 1 2 3 1 2 4 1 3 2 1 1 3 4 3 2 1 3 1 2 3 3 2 1 4 2 3 1 1 3 2 3 1 4 1 2 2 3 1 4 4 3 4 3 2 1 2 3 1 4 3
result:
ok ...
Test #50:
score: 0
Accepted
time: 3ms
memory: 4180kb
input:
17 40 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 3 3 3 4 4 3 3 2 4 1 3 0 3 1 2 1 1 2 1 3 1 4 1 5 5 6 5 7 5 8 8 9 8 10 8 11 11 12 12 13 12 14 14 15 14 16 16 17 15 17 15 16 13 17 13 16 13 14 10 13 10 12 10 11 9 11 7 8 7 9 6 17 6 13 6 8 6 10 4 5 4 7 4 9 3 17 3 5 3 6 2 15 2 3 2 17
output:
4 2 1 1 3 2 2 1 3 4 2 1 3 2 3 1 4
result:
ok ...
Test #51:
score: 0
Accepted
time: 2ms
memory: 4320kb
input:
45 111 0 1 1 0 1 1 0 3 1 2 1 3 2 3 1 4 0 5 2 4 2 5 1 6 3 4 3 5 2 6 3 6 4 6 3 7 4 7 3 8 5 6 5 7 5 8 6 7 6 5 5 4 5 5 6 3 5 2 5 3 6 1 5 0 5 1 4 1 3 0 3 1 3 2 2 1 3 3 4 4 4 5 1 8 2 7 1 7 0 7 1 2 1 3 1 4 1 5 5 6 6 7 6 8 8 9 8 10 8 11 11 12 11 13 11 14 11 15 11 16 16 17 16 18 16 19 19 20 19 21 19 22 19 23...
output:
3 1 2 4 1 3 2 1 2 3 4 3 2 1 1 3 2 2 1 3 4 3 2 1 2 3 1 1 3 2 2 3 1 2 4 1 4 3 1 4 3 1 4 2 4
result:
ok ...
Test #52:
score: 0
Accepted
time: 3ms
memory: 4284kb
input:
25 55 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 3 3 4 4 3 5 4 5 2 6 3 7 4 7 3 8 3 7 2 8 1 7 0 7 1 6 1 5 0 1 2 1 3 1 4 1 5 5 6 5 7 5 8 5 9 9 10 9 11 9 12 12 13 12 14 14 15 14 16 14 17 17 18 17 19 19 20 19 21 21 22 21 23 23 24 24 25 22 25 22 24 22 23 20 24 20 23 20 21 18 20 18 19 16 20 16 18 16 17 15 ...
output:
4 3 2 1 3 1 2 2 1 3 3 2 1 3 2 1 2 3 1 4 2 3 1 2 1
result:
ok ...
Test #53:
score: 0
Accepted
time: 3ms
memory: 4288kb
input:
39 87 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 1 4 0 5 1 6 0 7 2 5 2 6 1 7 2 7 1 8 3 7 3 8 4 7 5 8 5 7 6 7 5 6 6 5 5 4 6 1 5 0 5 1 5 2 4 1 4 2 3 2 3 3 4 3 3 4 4 5 3 5 4 6 1 2 1 3 1 4 1 5 5 6 5 7 5 8 8 9 9 10 9 11 11 12 11 13 11 14 11 15 11 16 16 17 16 18 16 19 19 20 19 21 21 22 21 23 23 24 23 25 25 26 25 27 ...
output:
3 1 2 4 1 3 2 3 1 2 4 1 3 2 3 1 2 4 3 1 2 3 1 4 2 1 1 2 3 2 1 3 1 4 1 2 3 1 2
result:
ok ...
Test #54:
score: 0
Accepted
time: 4ms
memory: 4288kb
input:
50 115 0 1 1 0 1 1 0 3 1 2 2 1 3 2 1 3 2 3 1 4 2 4 3 3 4 4 2 5 3 5 4 5 3 6 2 7 3 7 4 7 3 8 5 8 6 7 7 8 7 7 8 7 7 6 8 5 7 5 8 3 7 2 6 3 6 5 8 1 7 0 7 1 6 1 5 0 5 1 6 2 4 1 4 2 5 3 5 4 3 0 6 6 1 8 0 7 1 7 1 6 1 2 1 3 1 4 1 5 5 6 5 7 5 8 8 9 8 10 10 11 11 12 11 13 11 14 11 15 15 16 15 17 17 18 17 19 17...
output:
1 2 3 4 2 1 3 3 1 2 3 2 4 2 1 2 4 1 3 1 2 3 1 2 3 1 4 2 1 1 3 2 3 2 3 1 2 1 3 1 2 1 3 1 3 2 3 1 2 3
result:
ok ...
Test #55:
score: 0
Accepted
time: 0ms
memory: 4292kb
input:
46 101 0 1 1 0 1 1 0 3 1 2 2 1 3 2 1 3 2 3 3 3 1 5 4 3 4 2 5 3 4 4 5 4 4 5 7 4 5 6 4 6 5 7 6 7 7 6 7 7 7 8 3 8 8 7 8 5 8 3 7 2 8 1 7 0 7 1 6 1 5 0 3 0 4 1 1 8 2 7 3 7 4 7 3 5 1 7 0 7 1 6 0 5 1 2 1 3 1 4 1 5 5 6 5 7 5 8 5 9 9 10 10 11 10 12 12 13 12 14 12 15 12 16 16 17 16 18 16 19 19 20 19 21 19 22 ...
output:
1 4 2 2 4 1 3 1 2 1 2 4 1 2 3 1 2 3 4 3 2 1 4 3 2 3 1 2 1 3 2 3 1 2 1 3 2 2 1 2 1 1 3 4 1 3
result:
ok ...
Test #56:
score: 0
Accepted
time: 3ms
memory: 4328kb
input:
29 68 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 3 3 3 2 4 2 5 3 6 2 6 3 5 4 7 4 7 3 8 3 7 2 8 1 7 0 7 1 6 1 5 0 5 1 3 1 3 0 1 2 1 3 1 4 1 5 5 6 5 7 5 8 5 9 9 10 9 11 11 12 11 13 11 14 14 15 14 16 14 17 17 18 18 19 18 20 20 21 20 22 22 23 22 24 24 25 25 26 25 27 27 28 28 29 26 29 26 27 23 26 23 25 23 2...
output:
2 4 3 3 1 2 4 2 3 1 1 2 3 4 2 1 3 2 3 1 4 2 3 1 4 2 1 3 1
result:
ok ...
Test #57:
score: 0
Accepted
time: 1ms
memory: 4284kb
input:
42 97 0 1 1 0 1 1 0 3 1 2 1 3 2 3 1 4 0 5 2 4 1 5 2 5 1 6 3 6 3 4 4 5 5 6 6 5 7 6 7 5 8 5 7 4 8 3 7 2 7 3 8 1 7 0 7 1 6 1 5 0 6 2 5 2 6 3 5 4 4 4 3 3 4 3 4 2 3 2 4 1 3 0 2 1 1 2 1 3 1 4 1 5 5 6 6 7 6 8 8 9 8 10 8 11 11 12 11 13 13 14 14 15 14 16 14 17 17 18 17 19 19 20 19 21 21 22 21 23 23 24 23 25 ...
output:
3 1 2 4 1 2 1 3 1 2 4 1 3 2 3 1 3 1 2 3 1 4 2 3 1 1 3 2 4 1 1 2 2 3 2 4 1 3 1 4 2 3
result:
ok ...
Test #58:
score: 0
Accepted
time: 1ms
memory: 4256kb
input:
56 137 0 1 1 0 1 1 0 3 1 2 2 1 2 2 1 3 2 3 1 4 2 4 2 5 1 5 1 6 4 3 3 5 2 6 2 7 1 7 1 8 3 8 4 7 5 8 5 7 6 7 7 8 7 7 8 7 7 6 8 5 7 4 7 5 8 3 7 2 7 3 8 1 7 0 7 1 6 1 6 2 5 1 5 2 5 3 6 3 5 4 4 4 5 5 4 6 6 5 6 6 4 1 3 2 3 1 3 0 0 7 0 5 1 2 1 3 1 4 1 5 5 6 5 7 5 8 8 9 8 10 8 11 11 12 12 13 12 14 12 15 12 ...
output:
2 3 1 1 4 2 1 3 4 2 1 3 1 4 2 1 2 1 2 3 2 1 3 4 1 2 3 1 4 2 3 1 1 3 2 2 3 1 2 4 3 1 3 1 2 4 1 3 4 2 2 3 1 4 1 3
result:
ok ...
Test #59:
score: 0
Accepted
time: 3ms
memory: 4264kb
input:
29 63 0 1 1 0 1 1 0 3 1 2 2 1 2 2 3 2 2 4 1 4 1 5 2 5 1 6 4 3 3 6 4 5 5 6 5 5 6 5 5 4 6 3 5 2 6 1 5 0 5 1 4 1 3 0 4 4 0 5 1 2 1 3 1 4 1 5 5 6 5 7 7 8 7 9 9 10 9 11 9 12 12 13 12 14 12 15 15 16 15 17 17 18 17 19 19 20 19 21 21 22 21 23 23 24 23 25 25 26 26 27 24 27 24 26 24 25 22 26 22 25 22 23 20 28...
output:
4 2 3 1 2 1 3 2 1 2 3 2 1 1 3 1 2 3 1 4 2 3 1 3 2 1 4 2 4
result:
ok ...
Test #60:
score: 0
Accepted
time: 3ms
memory: 4180kb
input:
29 64 0 1 1 0 1 1 0 3 1 2 2 2 2 1 3 2 2 3 3 3 4 3 3 4 4 4 3 6 5 6 5 5 6 5 5 4 6 3 5 2 6 1 5 0 5 1 4 1 1 6 2 5 1 4 1 5 0 5 1 2 1 3 1 4 1 5 5 6 6 7 6 8 6 9 6 10 10 11 10 12 12 13 12 14 12 15 15 16 15 17 17 18 17 19 19 20 19 21 21 22 21 23 23 24 22 24 22 23 20 24 20 23 20 21 18 19 16 18 16 17 14 25 14 ...
output:
3 4 2 4 1 4 1 3 2 1 2 3 1 1 2 3 1 4 2 3 1 3 2 1 3 2 3 1 2
result:
ok ...
Test #61:
score: 0
Accepted
time: 3ms
memory: 4284kb
input:
48 103 0 1 1 0 1 1 0 3 1 2 1 4 0 5 2 3 2 1 2 5 3 4 4 3 5 4 3 5 4 5 5 5 5 6 4 7 6 7 5 8 7 6 7 7 7 8 8 7 8 5 7 4 7 5 8 3 7 2 8 1 7 0 7 1 6 1 5 1 6 2 5 2 4 1 4 2 5 3 3 0 6 4 3 8 1 8 2 7 3 7 1 6 1 7 0 7 1 2 1 3 1 4 1 5 5 6 6 7 6 8 8 9 8 10 8 11 11 12 11 13 11 14 11 15 15 16 15 17 17 18 17 19 19 20 19 21...
output:
1 4 3 3 2 1 4 3 1 2 1 2 4 4 3 1 2 1 1 3 4 3 2 1 2 3 1 1 3 2 3 1 2 3 1 2 1 3 1 2 2 2 3 1 3 3 2 1
result:
ok ...
Test #62:
score: 0
Accepted
time: 4ms
memory: 4256kb
input:
39 85 0 1 1 0 1 1 0 5 1 2 2 1 2 3 1 4 3 2 3 3 2 4 2 5 3 5 5 5 3 6 1 6 5 6 6 5 7 6 7 5 8 5 7 4 8 3 7 2 7 3 8 1 7 0 7 1 6 1 5 0 4 1 5 2 6 2 6 3 3 0 5 4 4 3 4 4 1 5 1 2 1 3 1 4 1 5 5 6 5 7 7 8 7 9 7 10 7 11 11 12 11 13 13 14 13 15 15 16 15 17 17 18 17 19 19 20 19 21 21 22 21 23 23 24 23 25 23 26 26 27 ...
output:
1 4 2 2 3 1 2 3 3 1 1 2 3 2 1 3 3 1 2 3 1 4 2 3 1 1 3 2 4 1 2 3 1 2 3 1 2 3 1
result:
ok ...
Test #63:
score: 0
Accepted
time: 3ms
memory: 4236kb
input:
36 78 0 1 1 0 1 1 0 5 1 2 2 2 1 3 2 3 2 4 1 4 1 5 3 4 1 6 4 4 4 5 5 5 5 6 6 5 7 6 7 5 8 5 7 4 8 3 7 2 8 1 7 0 7 1 6 1 3 1 5 2 4 2 5 3 6 3 5 4 2 1 3 0 1 2 1 3 1 4 1 5 5 6 5 7 5 8 8 9 9 10 9 11 9 12 12 13 12 14 12 15 15 16 15 17 17 18 17 19 19 20 19 21 21 22 21 23 23 24 23 25 25 26 25 27 27 28 28 29 2...
output:
4 3 2 2 1 3 4 2 1 3 4 2 1 4 1 2 3 1 2 3 1 4 2 3 1 3 2 1 2 3 1 2 1 3 4 1
result:
ok ...
Test #64:
score: 0
Accepted
time: 2ms
memory: 4276kb
input:
17 40 0 1 1 0 1 1 0 3 1 2 2 2 1 3 2 3 1 4 3 2 3 3 3 4 4 3 4 1 3 0 3 1 2 1 1 2 1 3 1 4 1 5 5 6 5 7 5 8 8 9 8 10 8 11 8 12 12 13 13 14 14 15 14 16 16 17 15 17 15 16 11 13 11 12 10 17 10 16 10 14 10 11 10 13 9 12 7 8 7 9 6 17 6 10 6 8 4 5 4 7 4 9 3 17 3 5 3 6 2 15 2 3 2 17
output:
4 2 1 1 3 2 2 1 3 3 4 2 1 2 3 1 4
result:
ok ...