QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#822939 | #9907. 最大匹配 2 | tanxi | 100 ✓ | 1281ms | 147080kb | C++20 | 4.0kb | 2024-12-20 17:39:37 | 2024-12-20 17:39:39 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=2e5+9,M=N*200;
int root[N];
int cnt;
int ls[M],rs[M],val[M],lz[M];
void pushup(int p)
{
val[p]=min(val[ls[p]],val[rs[p]]);
}
void pushdown(int p)
{
if(!lz[p])
return;
if(!ls[p])
ls[p]=++cnt;
if(!rs[p])
rs[p]=++cnt;
val[ls[p]]+=lz[p];
lz[ls[p]]+=lz[p];
val[rs[p]]+=lz[p];
lz[rs[p]]+=lz[p];
lz[p]=0;
}
void update(int &p,int l,int r,int L,int R,int k)
{
if(!p)
p=++cnt;
if(L<=l&&r<=R)
{
val[p]+=k;
lz[p]+=k;
return;
}
int mid=(l+r)/2;
pushdown(p);
if(L<=mid)
update(ls[p],l,mid,L,R,k);
if(R>mid)
update(rs[p],mid+1,r,L,R,k);
pushup(p);
}
int n;
int gtl(int p,int l,int r,int L,int R)
{
if(L>R)
return 0;
int mid=(l+r)/2;
if(L<=l&&r<=R)
{
if(val[p])
return 0;
if(!p||l==r)
return r;
pushdown(p);
if(!val[rs[p]])
return gtl(rs[p],mid+1,r,L,R);
else
return gtl(ls[p],l,mid,L,R);
}
pushdown(p);
if(R>mid)
{
int d=gtl(rs[p],mid+1,r,L,R);
if(d)
return d;
}
return gtl(ls[p],l,mid,L,R);
}
int gtr(int p,int l,int r,int L,int R)
{
int mid=(l+r)/2;
if(L<=l&&r<=R)
{
if(val[p])
return n;
if(!p||l==r)
return l;
pushdown(p);
if(!val[ls[p]])
return gtr(ls[p],l,mid,L,R);
else
return gtr(rs[p],mid+1,r,L,R);
}
pushdown(p);
if(L<=mid)
{
int d=gtr(ls[p],l,mid,L,R);
if(d!=n)
return d;
}
return gtr(rs[p],mid+1,r,L,R);
}
set<int>lf[N],rf[N];
struct xdt
{
struct Node
{
int val,l,r;
}d[N<<2];
void pushup(int p)
{
d[p].val=d[p<<1].val+d[p<<1|1].val;
int k=min(d[p<<1].l,d[p<<1|1].r);
d[p].val+=k;
d[p].r=d[p<<1].r+d[p<<1|1].r-k;
d[p].l=d[p<<1|1].l+d[p<<1].l-k;
}
void update(int p,int l,int r,int x,int k)
{
if(l==r)
{
if(k==0)
d[p]={0,0,0};
if(k==1)
d[p]={0,1,0};
if(k==-1)
d[p]={0,0,1};
return;
}
int mid=(l+r)/2;
if(x<=mid)
update(p<<1,l,mid,x,k);
else
update(p<<1|1,mid+1,r,x,k);
pushup(p);
}
}T;
int ans;
void addl(int col,int x,int opt=0)
{
if(rf[col].lower_bound(x)!=rf[col].end())
{
int y=*rf[col].lower_bound(x);
update(root[col],1,n,x,y-1,1);
rf[col].erase(y);
T.update(1,1,n,y,0);
ans++;
return;
}
if(opt)
{
lf[col].insert(x);
T.update(1,1,n,x,1);
return;
}
int l=gtl(root[col],1,n,1,x-1)+1;
if(l==x)
{
lf[col].insert(x);
T.update(1,1,n,x,1);
return;
}
update(root[col],1,n,l,x-1,-1);
lf[col].insert(l);
T.update(1,1,n,l,1);
}
void addr(int col,int x,int opt=0)
{
if(lf[col].lower_bound(x)!=lf[col].begin())
{
int y=*--lf[col].lower_bound(x);
update(root[col],1,n,y,x-1,1);
lf[col].erase(y);
T.update(1,1,n,y,0);
ans++;
return;
}
if(opt)
{
rf[col].insert(x);
T.update(1,1,n,x,-1);
return;
}
int r=gtr(root[col],1,n,x,n);
if(r==x)
{
rf[col].insert(x);
T.update(1,1,n,x,-1);
return;
}
update(root[col],1,n,x,r-1,-1);
rf[col].insert(r);
T.update(1,1,n,r,-1);
}
void del(int col,int x)
{
if(lf[col].find(x)!=lf[col].end())
{
lf[col].erase(x);
T.update(1,1,n,x,0);
return;
}
int r=gtr(root[col],1,n,x,n);
update(root[col],1,n,x,r-1,-1);
ans--;
addr(col,r,1);
}
void der(int col,int x)
{
if(rf[col].find(x)!=rf[col].end())
{
rf[col].erase(x);
T.update(1,1,n,x,0);
return;
}
int l=gtl(root[col],1,n,1,x-1)+1;
update(root[col],1,n,l,x-1,-1);
ans--;
addl(col,l,1);
}
int q;
int a[N],b[N],p[N];
mt19937 rd(time(0));
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n>>q;
for(int i=1;i<=n;i++)
cin>>a[i];
for(int i=1;i<=n;i++)
cin>>b[i];
for(int i=1;i<=n;i++)
p[i]=i;
shuffle(p+1,p+n+1,rd);
for(int i=1;i<=n;i++)
{
if(b[p[i]]==0)
addl(a[p[i]],p[i]);
else
addr(a[p[i]],p[i]);
}
cout<<ans+T.d[1].val<<'\n';
while(q--)
{
int x,w,t;
cin>>x>>w>>t;
if(b[x]==0)
del(a[x],x);
else
der(a[x],x);
a[x]=w;
b[x]=t;
if(b[x]==0)
addl(a[x],x);
else
addr(a[x],x);
cout<<ans+T.d[1].val<<'\n';
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 3ms
memory: 28188kb
input:
100 0 1 1 2 1 2 2 2 2 2 1 2 1 1 2 2 1 2 2 2 2 2 1 1 2 2 2 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1 2 1 2 1 1 1 2 2 2 2 2 2 1 1 1 2 1 1 1 1 1 2 2 1 1 2 1 1 2 1 1 2 2 2 1 2 2 2 1 2 1 2 1 2 1 1 2 1 1 2 1 1 0 1 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1 1 1 1 ...
output:
45
result:
ok "45"
Test #2:
score: 10
Accepted
time: 0ms
memory: 26296kb
input:
100 0 2 1 1 2 1 2 1 2 1 1 1 2 1 1 2 1 1 2 2 1 2 1 2 2 1 1 2 2 1 1 1 2 1 1 1 2 2 1 2 1 1 2 2 2 2 2 1 2 1 2 2 1 1 2 1 2 2 1 1 2 2 1 1 1 2 2 1 2 1 2 1 2 2 2 1 2 1 1 2 2 2 2 1 1 1 1 1 1 1 2 2 1 2 1 2 2 2 2 1 2 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 1 1 1 1 0 ...
output:
43
result:
ok "43"
Test #3:
score: 10
Accepted
time: 6ms
memory: 26208kb
input:
100 0 2 2 3 3 4 4 3 2 4 4 1 2 3 4 3 4 4 3 3 2 3 1 2 4 1 3 1 4 3 3 4 4 3 3 1 4 1 1 2 2 1 3 4 3 3 4 3 3 4 3 4 3 4 4 1 1 1 4 3 1 2 1 2 3 3 3 2 1 1 1 1 3 3 2 4 2 3 4 1 4 1 4 1 1 2 1 1 1 1 1 4 4 2 3 2 1 2 3 1 4 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 1 ...
output:
37
result:
ok "37"
Test #4:
score: 10
Accepted
time: 0ms
memory: 28264kb
input:
100 0 3 1 2 4 3 2 2 1 4 2 2 3 2 1 1 2 3 3 2 3 1 1 3 4 3 2 1 2 4 3 4 2 2 1 2 4 2 2 1 1 3 3 1 2 3 4 3 2 3 2 2 1 3 3 1 2 3 2 2 3 3 4 2 2 1 4 1 3 2 3 3 4 4 3 2 1 4 2 2 3 4 2 3 2 3 4 3 3 1 2 3 4 3 1 4 1 2 2 2 3 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 ...
output:
44
result:
ok "44"
Test #5:
score: 10
Accepted
time: 3ms
memory: 26296kb
input:
100 0 3 6 4 7 5 4 7 5 1 1 6 8 5 5 6 7 3 6 3 3 7 5 6 4 8 4 6 4 8 3 8 6 6 6 3 6 2 7 7 1 2 7 3 8 4 8 2 8 4 5 4 2 2 1 6 1 1 8 2 1 4 4 1 1 5 6 2 3 2 6 1 5 2 6 7 8 6 5 7 1 7 1 8 1 8 6 3 6 3 7 1 3 3 8 8 4 5 7 1 5 0 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 ...
output:
37
result:
ok "37"
Test #6:
score: 10
Accepted
time: 6ms
memory: 26160kb
input:
100 0 3 5 6 3 4 8 4 1 3 7 6 7 2 8 2 2 2 4 1 1 1 8 8 7 6 2 6 7 1 3 1 3 2 2 5 2 2 7 2 8 5 3 5 4 1 6 8 8 4 5 3 6 3 6 2 7 1 6 1 3 3 2 6 8 4 2 6 6 4 5 5 4 4 8 3 3 2 7 1 7 4 6 3 3 8 8 1 7 4 1 8 8 7 1 4 7 7 7 3 2 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 ...
output:
39
result:
ok "39"
Test #7:
score: 10
Accepted
time: 0ms
memory: 26232kb
input:
100 0 16 4 8 15 14 16 12 2 9 6 2 2 14 5 16 9 11 1 11 4 12 9 7 2 13 1 11 8 5 12 4 7 16 7 14 14 4 10 16 6 13 16 8 11 9 4 2 8 4 12 12 13 15 7 11 15 6 15 15 11 14 7 15 14 11 6 2 11 11 3 6 11 9 4 11 15 10 16 16 9 15 4 14 10 12 16 16 11 1 1 7 5 11 12 10 2 13 14 9 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 0 ...
output:
37
result:
ok "37"
Test #8:
score: 10
Accepted
time: 3ms
memory: 26148kb
input:
100 0 2 1 14 11 15 16 8 12 1 13 3 8 7 8 16 3 2 10 3 16 5 11 10 11 8 1 15 10 2 16 6 12 13 9 10 16 12 8 3 11 6 14 12 11 12 12 6 6 16 5 9 5 7 13 5 7 3 14 1 13 13 4 6 8 3 4 9 3 1 13 16 12 6 2 15 5 3 12 6 13 13 8 7 5 13 6 2 3 15 7 10 2 4 15 5 9 15 2 9 9 1 0 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 0...
output:
35
result:
ok "35"
Test #9:
score: 10
Accepted
time: 3ms
memory: 26144kb
input:
100 0 3 21 1 30 24 27 22 30 2 12 14 13 24 4 6 14 29 1 8 29 16 21 27 18 9 20 2 1 17 7 13 19 12 16 17 27 1 2 27 1 2 5 13 21 24 14 26 19 29 18 19 4 28 31 23 25 8 21 2 24 19 17 2 7 14 13 8 16 24 29 13 1 30 28 9 25 24 10 22 6 19 20 26 32 1 1 5 19 22 31 19 21 10 25 16 17 20 1 7 22 0 1 0 1 1 1 0 1 0 1 0 1 ...
output:
38
result:
ok "38"
Test #10:
score: 10
Accepted
time: 7ms
memory: 26256kb
input:
100 0 24 32 27 20 31 21 25 9 18 31 9 8 25 7 12 31 27 13 9 11 18 15 29 19 18 1 29 28 29 21 13 10 1 11 18 32 10 20 17 6 7 29 16 13 5 19 13 5 14 22 26 29 27 23 5 29 10 32 5 26 19 27 6 29 2 2 16 12 23 23 2 8 27 12 28 31 31 18 31 26 20 13 29 21 19 3 2 27 32 10 28 7 20 16 30 2 10 11 9 10 0 1 0 1 1 1 0 0 1...
output:
44
result:
ok "44"
Subtask #2:
score: 15
Accepted
Test #11:
score: 15
Accepted
time: 4ms
memory: 26376kb
input:
2000 0 2 2 1 1 2 1 2 2 2 1 1 1 2 1 2 2 1 2 2 1 2 1 2 1 1 2 1 2 2 1 2 2 2 1 1 1 1 1 1 2 1 1 2 2 1 2 1 2 2 2 1 1 2 1 1 1 2 2 2 2 2 2 1 1 2 1 1 2 2 1 2 1 1 1 1 2 1 1 1 1 1 2 2 2 2 1 2 2 1 2 2 2 2 2 1 2 1 2 1 1 2 1 1 2 2 1 1 1 1 1 1 1 1 2 2 1 2 2 2 2 2 1 1 2 2 2 2 1 2 2 2 1 1 1 2 1 2 1 1 1 2 2 1 2 1 1 1...
output:
954
result:
ok "954"
Test #12:
score: 15
Accepted
time: 4ms
memory: 26304kb
input:
2000 0 2 1 1 1 1 1 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 2 2 1 2 1 1 1 1 1 1 1 2 2 1 2 2 1 1 2 2 2 2 1 2 2 2 2 1 1 2 2 1 1 1 2 2 1 2 1 2 2 2 1 2 2 1 2 2 2 2 2 1 2 1 2 2 1 2 2 1 1 1 1 1 2 2 1 2 1 2 1 2 1 1 1 2 2 2 1 2 1 1 2 1 2 1 1 1 1 1 2 1 2 1 2 2 2 2 1 2 1 1 2 2 2 2 1 1 2 2 1 1 2 1 2 2 2...
output:
958
result:
ok "958"
Test #13:
score: 15
Accepted
time: 4ms
memory: 28376kb
input:
2000 0 4 3 4 4 2 2 2 2 3 1 1 3 1 3 3 3 1 4 2 2 2 4 4 3 3 3 1 1 3 1 2 1 2 1 1 4 1 2 2 4 3 3 1 3 2 2 1 3 2 1 3 4 3 2 3 4 3 1 3 2 2 1 4 2 4 4 3 4 1 3 3 1 3 1 3 1 4 3 4 4 4 3 4 1 3 2 4 3 4 3 1 3 2 4 1 4 2 1 2 2 4 4 1 4 2 4 1 1 1 2 1 1 4 1 1 2 2 1 4 2 2 3 4 2 2 3 1 4 1 1 2 2 1 3 2 1 3 2 3 3 1 1 2 4 1 1 4...
output:
946
result:
ok "946"
Test #14:
score: 15
Accepted
time: 4ms
memory: 28364kb
input:
2000 0 1 2 4 3 3 3 2 3 1 4 4 1 4 4 1 2 3 4 2 3 1 2 1 4 3 4 3 3 4 3 4 4 1 4 4 2 4 4 2 1 2 3 2 3 2 4 2 2 3 4 3 3 4 3 4 4 4 4 2 2 4 3 4 3 1 3 3 2 2 2 4 3 1 1 2 1 2 2 2 1 1 2 1 4 2 3 4 1 4 1 1 4 1 2 1 1 4 4 3 2 4 1 2 1 1 1 1 2 4 2 2 3 4 1 1 4 2 2 4 3 3 1 2 3 2 1 4 2 2 1 4 2 2 4 3 3 1 2 2 3 4 3 1 4 3 1 1...
output:
945
result:
ok "945"
Test #15:
score: 15
Accepted
time: 0ms
memory: 28500kb
input:
2000 0 1 7 4 2 3 5 8 1 8 6 3 8 4 2 5 5 1 1 5 2 5 7 6 6 1 5 3 5 1 3 6 4 8 4 3 7 1 7 6 2 4 6 6 1 2 5 2 7 8 8 6 6 8 6 3 3 3 6 1 4 7 3 5 5 6 3 5 5 7 5 3 7 7 3 4 2 8 1 4 2 7 4 8 7 1 3 1 6 1 1 3 5 6 3 2 7 8 2 6 2 8 2 7 8 4 3 3 2 1 4 7 7 6 1 3 6 7 1 8 7 8 6 6 4 1 5 4 4 5 8 7 2 5 8 6 2 5 6 5 2 6 3 6 1 3 3 3...
output:
947
result:
ok "947"
Test #16:
score: 15
Accepted
time: 4ms
memory: 26316kb
input:
2000 0 6 6 5 4 2 5 4 5 2 7 1 7 3 6 4 4 4 1 2 5 6 8 4 1 3 8 4 6 2 1 6 1 1 1 2 4 6 2 2 6 7 1 4 6 2 4 1 7 2 5 8 2 2 2 3 8 4 3 5 8 7 8 3 8 4 6 5 8 4 1 6 6 6 2 3 8 5 7 4 3 4 1 1 5 3 6 6 8 1 5 6 8 4 7 2 2 3 2 1 4 7 1 2 6 7 1 2 6 1 1 2 1 7 1 8 7 8 6 8 1 5 8 2 1 2 7 4 4 3 8 3 6 1 8 4 6 4 1 3 6 4 5 4 6 7 3 4...
output:
948
result:
ok "948"
Test #17:
score: 15
Accepted
time: 4ms
memory: 28436kb
input:
2000 0 14 5 12 9 15 8 12 9 13 3 15 8 16 5 5 10 15 7 6 14 4 15 4 9 3 8 13 3 1 16 11 5 15 7 6 7 9 3 11 10 4 10 1 3 10 3 3 9 16 16 2 10 3 7 8 9 14 13 14 1 11 3 2 14 14 5 9 13 2 7 7 9 16 3 16 6 10 13 4 9 1 13 8 15 6 9 14 2 6 8 9 6 1 5 16 12 1 4 13 3 11 16 15 13 6 8 16 10 5 6 11 1 12 10 2 6 2 13 2 13 3 1...
output:
949
result:
ok "949"
Test #18:
score: 15
Accepted
time: 3ms
memory: 26416kb
input:
2000 0 5 10 9 2 5 16 16 8 5 15 7 5 2 6 12 8 7 7 3 4 14 2 9 7 8 12 11 10 3 9 14 2 10 13 7 12 8 8 14 8 14 11 6 1 15 10 11 7 4 11 11 2 9 9 16 4 3 4 5 8 13 9 8 16 1 1 8 15 11 11 12 8 9 9 7 13 16 9 10 8 6 6 13 11 1 3 14 6 3 12 10 6 10 16 1 4 16 16 7 13 10 8 1 11 11 9 12 16 7 12 2 3 15 13 3 1 10 14 13 16 ...
output:
928
result:
ok "928"
Test #19:
score: 15
Accepted
time: 4ms
memory: 26356kb
input:
2000 0 5 23 28 22 6 12 21 25 32 19 4 15 7 10 16 28 29 32 5 6 28 21 14 9 7 23 31 8 3 12 8 16 29 17 18 8 32 9 27 27 27 4 22 11 11 7 10 16 12 29 23 15 6 25 31 3 1 23 10 20 16 11 8 23 1 9 3 12 3 8 31 24 4 8 7 5 10 21 16 19 14 31 28 9 14 27 5 28 3 30 8 21 32 22 23 10 9 14 20 22 3 2 28 19 12 20 4 7 29 1 5...
output:
950
result:
ok "950"
Test #20:
score: 15
Accepted
time: 4ms
memory: 26424kb
input:
2000 0 20 17 13 28 19 28 19 12 16 15 8 32 3 1 21 10 13 16 28 16 11 2 3 28 4 26 31 15 7 13 10 5 19 10 1 22 20 13 10 9 25 6 8 10 27 32 10 25 31 22 11 31 7 9 12 8 32 21 2 25 20 1 11 10 28 2 5 32 30 29 3 30 13 28 29 13 29 10 18 20 5 19 21 9 2 29 7 19 11 22 12 27 30 30 8 18 31 32 11 10 23 29 19 3 10 32 2...
output:
918
result:
ok "918"
Test #21:
score: 15
Accepted
time: 0ms
memory: 28472kb
input:
2000 0 29 39 61 16 16 45 3 35 24 19 61 12 42 36 49 32 58 54 27 17 11 47 59 3 47 37 41 13 30 39 37 46 60 48 9 63 12 3 8 3 49 9 26 64 36 42 56 47 33 54 40 47 19 17 48 56 44 38 32 61 15 51 7 11 57 19 15 22 42 2 23 19 48 28 47 55 34 49 9 21 56 38 63 29 5 25 30 62 49 62 21 58 59 3 19 4 61 4 48 45 33 6 14...
output:
909
result:
ok "909"
Test #22:
score: 15
Accepted
time: 3ms
memory: 28552kb
input:
2000 0 28 13 36 62 2 58 55 9 2 14 56 45 12 61 21 52 29 6 12 48 20 43 37 41 7 47 64 23 15 12 7 42 15 31 43 7 64 30 11 3 7 17 13 46 49 6 47 10 55 17 33 37 9 52 63 28 45 27 25 53 55 51 34 23 41 31 18 11 31 37 18 45 45 31 27 58 29 12 16 44 19 45 64 55 7 20 31 27 34 35 11 63 57 17 2 34 1 54 20 37 55 4 11...
output:
900
result:
ok "900"
Test #23:
score: 15
Accepted
time: 3ms
memory: 28504kb
input:
2000 0 31 104 15 67 66 31 37 55 12 115 95 50 47 3 115 11 25 8 40 43 117 107 99 3 9 75 111 115 74 97 24 8 16 86 71 59 43 25 63 121 125 19 109 83 105 62 20 65 17 57 47 51 69 18 114 18 97 96 114 5 68 74 125 5 33 85 75 73 110 75 95 104 104 28 127 89 22 30 88 9 69 43 110 32 104 1 116 52 127 121 35 15 85 ...
output:
872
result:
ok "872"
Test #24:
score: 15
Accepted
time: 4ms
memory: 26368kb
input:
2000 0 11 44 53 57 20 98 36 75 12 56 9 94 7 128 42 27 3 95 19 97 109 35 114 115 4 9 34 104 63 29 65 60 50 36 98 53 67 12 117 75 116 78 45 36 78 48 63 23 121 16 126 12 112 78 100 60 44 48 85 108 3 38 94 21 67 54 14 116 27 50 114 68 17 3 81 64 96 5 50 65 33 122 102 100 33 101 44 114 66 80 99 44 121 11...
output:
883
result:
ok "883"
Test #25:
score: 15
Accepted
time: 3ms
memory: 26440kb
input:
2000 0 212 40 232 87 79 203 233 171 143 9 124 97 47 54 250 185 169 100 244 253 120 131 85 195 8 234 73 7 171 247 118 184 64 132 82 42 64 116 53 137 155 33 87 164 160 6 168 102 125 31 63 39 229 76 16 65 100 244 26 83 73 232 85 146 135 196 233 175 96 240 214 248 208 164 128 8 29 60 103 140 214 151 114...
output:
852
result:
ok "852"
Test #26:
score: 15
Accepted
time: 4ms
memory: 26520kb
input:
2000 0 228 227 120 56 250 38 238 224 14 1 239 70 20 90 235 248 114 33 47 210 111 244 218 72 51 144 243 191 168 149 165 105 89 224 147 217 17 46 79 207 48 94 182 80 209 145 45 40 47 255 3 118 55 96 6 172 35 130 26 116 40 68 68 102 184 92 10 94 52 66 53 237 6 189 28 16 106 208 50 33 68 24 249 191 102 ...
output:
863
result:
ok "863"
Test #27:
score: 15
Accepted
time: 4ms
memory: 28480kb
input:
2000 0 510 427 155 433 37 348 174 418 481 8 170 485 274 110 187 213 285 60 125 460 135 101 299 75 83 33 268 169 125 472 46 363 60 155 232 365 4 213 384 468 6 404 133 201 483 251 129 319 129 505 71 261 251 76 460 122 65 387 507 149 432 372 200 243 499 394 440 239 284 93 298 154 35 416 156 474 494 116...
output:
866
result:
ok "866"
Test #28:
score: 15
Accepted
time: 0ms
memory: 26492kb
input:
2000 0 354 297 56 124 319 256 97 329 474 344 18 227 225 116 272 259 287 6 411 222 281 145 104 62 84 239 320 231 424 262 323 232 278 142 84 288 11 323 322 482 405 108 223 168 381 137 191 8 15 466 220 360 450 109 109 243 226 340 504 102 371 197 219 6 174 248 314 401 4 396 69 179 158 18 294 197 412 498...
output:
864
result:
ok "864"
Test #29:
score: 15
Accepted
time: 0ms
memory: 28436kb
input:
2000 0 393 713 332 785 736 132 371 355 885 858 647 475 461 236 796 95 786 256 736 260 862 1020 895 868 364 1018 75 856 217 269 567 759 553 133 647 397 651 167 171 651 1006 5 833 305 300 578 438 242 790 902 810 973 625 232 838 205 231 796 453 274 851 632 111 269 885 482 875 156 558 218 384 382 110 75...
output:
859
result:
ok "859"
Test #30:
score: 15
Accepted
time: 0ms
memory: 26476kb
input:
2000 0 836 681 896 743 896 179 455 358 975 7 681 109 434 847 226 878 352 835 665 569 694 543 35 103 719 764 921 671 739 70 972 467 1001 835 613 209 593 617 940 69 170 622 651 981 309 191 492 513 811 909 74 527 511 222 565 304 415 17 695 332 474 237 519 568 118 86 22 185 174 690 977 404 502 600 965 6...
output:
889
result:
ok "889"
Subtask #3:
score: 20
Accepted
Test #31:
score: 20
Accepted
time: 176ms
memory: 45404kb
input:
200000 0 1 2 2 2 2 2 2 1 1 2 2 1 1 1 2 1 1 1 2 1 2 1 1 1 2 1 1 1 1 2 2 2 2 2 1 2 2 1 2 1 1 2 2 2 2 1 2 2 1 2 1 1 2 1 1 2 1 2 2 1 2 2 2 1 1 2 1 1 1 2 2 2 2 1 1 2 2 1 1 2 1 2 2 2 2 2 1 1 2 2 2 2 1 2 1 2 2 2 1 2 2 2 2 1 2 2 2 1 1 1 2 2 1 2 2 2 1 1 1 1 1 2 1 2 1 2 1 2 1 2 1 2 2 1 2 2 2 1 1 1 2 1 2 1 1 1...
output:
99478
result:
ok "99478"
Test #32:
score: 20
Accepted
time: 191ms
memory: 46912kb
input:
200000 0 1 2 2 2 2 2 1 1 2 1 2 1 1 1 2 2 2 2 2 1 1 1 2 2 2 1 1 2 2 1 2 2 2 2 1 2 1 1 2 1 1 2 2 2 2 2 1 2 1 2 1 2 1 1 2 1 1 2 1 2 1 2 2 1 1 1 1 1 1 1 1 2 2 1 2 2 1 1 2 2 2 2 2 2 2 1 2 1 1 1 2 2 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 2 2 1 1 1 2 1 1 1 1 1 2 1 2 1 2 2 2 1 1 2 1 2 1 2 2 2 2 1 1 1 1 2 1 1 2 2 1 1...
output:
99594
result:
ok "99594"
Test #33:
score: 20
Accepted
time: 215ms
memory: 48324kb
input:
200000 0 2 4 1 2 1 3 3 1 3 1 4 4 4 3 3 4 1 3 2 2 3 1 4 2 2 2 3 2 4 2 2 1 3 1 1 1 1 3 1 2 2 3 3 1 2 1 4 4 1 1 2 1 3 4 3 4 4 3 1 3 4 2 4 3 3 2 4 4 1 2 1 4 2 1 1 2 2 3 2 2 1 4 2 3 3 1 3 1 2 3 4 3 4 1 2 2 1 3 3 2 1 2 3 1 2 1 3 3 2 1 3 1 3 3 3 4 4 3 3 2 2 3 2 2 1 2 3 1 3 4 1 1 4 2 1 4 4 3 3 3 2 2 3 4 1 2...
output:
99667
result:
ok "99667"
Test #34:
score: 20
Accepted
time: 208ms
memory: 46632kb
input:
200000 0 3 4 3 3 3 3 2 3 2 1 4 2 2 1 3 2 1 3 4 4 4 4 2 1 4 4 3 3 4 3 4 4 4 3 4 4 1 1 2 1 1 1 4 1 1 1 3 4 2 4 1 2 4 1 2 2 3 1 1 4 4 2 3 1 3 2 4 3 1 4 4 4 2 4 4 1 4 4 3 3 4 1 1 1 1 2 3 4 1 2 1 4 2 2 2 2 1 2 1 1 2 2 2 2 2 1 4 1 2 3 3 2 2 1 1 4 2 2 2 1 4 2 2 2 3 2 2 4 1 1 1 3 4 4 4 2 2 4 3 3 3 4 4 2 3 2...
output:
99643
result:
ok "99643"
Test #35:
score: 20
Accepted
time: 221ms
memory: 49608kb
input:
200000 0 4 5 7 2 7 1 1 5 8 8 6 7 1 2 6 2 6 4 5 8 2 8 7 1 5 4 2 7 1 4 4 7 4 7 1 5 6 8 6 8 8 2 7 6 6 5 8 3 7 2 8 5 1 7 1 3 3 2 1 7 8 7 1 4 4 8 3 8 5 2 2 5 5 4 8 6 5 2 8 7 4 8 3 7 5 8 5 1 5 8 8 2 8 5 2 7 7 1 7 4 5 1 7 6 3 1 4 6 7 3 8 5 3 6 1 4 3 7 2 6 8 6 3 3 2 6 8 8 2 3 8 7 5 4 8 4 8 6 4 1 1 1 8 8 7 2...
output:
99389
result:
ok "99389"
Test #36:
score: 20
Accepted
time: 229ms
memory: 50232kb
input:
200000 0 5 2 5 6 7 3 3 3 8 4 2 1 6 1 2 4 1 6 2 1 4 8 6 2 7 6 3 6 6 3 3 1 5 5 7 4 8 4 8 7 2 3 4 3 2 4 6 8 1 1 8 7 8 7 7 4 8 6 6 3 1 1 1 6 2 3 1 4 5 8 4 4 5 6 2 5 3 5 7 1 8 5 7 4 6 3 8 8 2 7 2 3 2 8 4 2 7 4 2 2 5 8 1 7 3 7 3 1 4 5 3 5 6 5 7 8 1 6 3 1 3 2 6 5 8 8 1 8 3 7 4 7 5 4 3 2 7 6 1 4 8 1 1 1 6 6...
output:
99441
result:
ok "99441"
Test #37:
score: 20
Accepted
time: 254ms
memory: 57436kb
input:
200000 0 15 3 12 7 12 12 5 3 10 14 14 8 1 2 3 2 12 7 1 6 6 6 6 2 14 10 5 9 15 6 6 8 3 5 15 7 11 15 3 3 11 16 1 15 14 16 6 5 7 14 13 1 8 3 10 14 12 6 14 5 13 6 7 15 13 3 10 3 1 16 10 13 1 15 11 15 14 3 9 2 16 8 7 8 10 11 12 4 13 9 9 14 7 16 6 2 9 6 11 12 8 3 1 10 2 9 8 4 15 6 9 16 10 14 14 13 7 11 5 ...
output:
99045
result:
ok "99045"
Test #38:
score: 20
Accepted
time: 245ms
memory: 55968kb
input:
200000 0 2 2 2 16 7 16 10 6 9 16 1 2 10 2 12 3 9 6 9 14 14 14 14 7 9 8 2 9 14 3 16 7 16 16 16 16 8 2 15 5 6 9 10 3 14 3 1 11 3 1 8 8 8 4 8 8 5 13 5 10 3 13 8 11 9 2 2 14 14 4 7 2 15 5 8 13 16 13 2 9 5 1 4 13 14 4 11 12 2 12 13 11 5 10 8 9 1 11 10 15 2 1 5 3 12 14 15 1 9 9 11 1 8 16 11 5 2 15 8 1 16 ...
output:
99156
result:
ok "99156"
Test #39:
score: 20
Accepted
time: 259ms
memory: 64208kb
input:
200000 0 24 17 28 31 26 22 27 6 1 2 25 16 28 13 12 21 22 8 15 10 16 17 2 28 27 13 16 3 14 32 9 9 6 8 18 20 18 9 11 22 26 27 11 18 13 32 6 23 31 19 28 2 30 8 32 4 20 15 7 10 2 23 21 7 10 15 11 32 10 18 21 20 24 9 25 30 28 17 3 14 11 3 28 2 5 28 11 9 17 17 26 17 2 13 32 26 13 11 31 3 15 23 29 23 11 29...
output:
98956
result:
ok "98956"
Test #40:
score: 20
Accepted
time: 274ms
memory: 61668kb
input:
200000 0 16 15 2 2 19 17 4 1 11 16 16 2 29 26 1 31 13 4 1 10 9 11 1 23 10 18 8 21 10 26 5 10 19 27 4 8 29 25 8 18 15 2 32 30 8 11 16 24 15 8 14 29 10 17 4 32 2 31 7 13 27 29 23 20 26 3 21 3 18 16 19 17 20 25 5 21 21 12 1 23 3 5 24 3 22 26 3 19 8 10 9 6 7 22 6 16 31 4 23 12 8 6 20 19 6 13 8 29 2 11 2...
output:
98991
result:
ok "98991"
Test #41:
score: 20
Accepted
time: 276ms
memory: 70088kb
input:
200000 0 18 41 7 17 44 19 29 6 33 4 47 6 6 20 62 61 62 11 26 30 7 40 64 10 16 3 36 4 58 14 63 34 56 47 17 30 7 51 41 47 51 49 3 25 55 31 11 47 64 24 19 20 35 20 59 55 63 11 9 38 57 44 44 43 1 12 34 38 61 26 54 55 31 6 50 56 23 52 22 48 61 17 41 15 56 51 40 6 49 63 36 23 49 33 1 16 39 52 53 62 46 58 ...
output:
98641
result:
ok "98641"
Test #42:
score: 20
Accepted
time: 291ms
memory: 67820kb
input:
200000 0 43 22 32 51 60 34 58 47 26 19 5 37 4 13 24 31 61 57 28 29 41 3 8 41 35 22 54 43 62 47 59 51 56 4 27 64 31 9 52 34 11 26 52 10 61 54 57 34 4 50 6 42 33 27 12 31 32 23 23 34 11 46 7 38 50 54 45 42 5 43 49 51 29 26 32 38 59 10 26 52 47 23 42 8 5 32 26 34 43 34 4 58 25 49 10 10 13 21 34 28 21 3...
output:
98919
result:
ok "98919"
Test #43:
score: 20
Accepted
time: 285ms
memory: 73396kb
input:
200000 0 98 94 35 1 96 18 110 109 11 50 90 115 51 92 66 28 122 92 100 66 24 3 83 62 82 58 7 14 91 42 78 127 94 53 41 60 9 78 119 52 49 77 72 102 45 116 105 33 7 15 73 77 111 120 16 54 43 31 83 58 51 82 99 94 90 113 5 5 117 44 9 51 122 16 122 78 6 62 95 22 73 34 13 61 67 64 100 2 79 17 114 104 29 90 ...
output:
98081
result:
ok "98081"
Test #44:
score: 20
Accepted
time: 300ms
memory: 71648kb
input:
200000 0 126 5 109 42 49 64 125 115 1 9 126 93 109 32 14 49 128 33 89 85 57 32 83 68 50 71 126 127 100 61 96 46 60 35 16 40 94 20 120 114 71 94 5 48 17 9 11 109 98 22 91 46 51 48 14 24 125 74 66 35 89 30 45 66 32 56 36 99 65 7 49 127 58 94 26 50 45 84 84 125 72 38 106 76 99 6 10 80 33 40 113 57 49 1...
output:
98265
result:
ok "98265"
Test #45:
score: 20
Accepted
time: 309ms
memory: 77216kb
input:
200000 0 185 162 150 140 42 147 34 92 222 116 202 249 98 69 37 118 84 184 191 153 172 191 233 209 81 228 247 148 141 130 218 215 122 138 73 248 224 31 25 99 182 243 202 17 166 45 106 2 1 240 137 32 217 67 18 58 233 166 111 83 42 225 64 12 128 173 143 144 218 166 188 218 140 191 136 184 201 86 173 72...
output:
97671
result:
ok "97671"
Test #46:
score: 20
Accepted
time: 323ms
memory: 79460kb
input:
200000 0 159 14 60 165 77 36 205 90 212 219 236 207 192 83 166 52 196 42 245 11 214 189 206 242 70 190 13 93 2 83 31 114 157 38 97 79 1 16 203 53 40 208 108 242 214 191 237 160 77 214 130 228 171 235 24 154 228 196 96 26 72 52 30 233 249 60 150 219 111 24 131 243 255 73 124 180 175 57 111 196 131 18...
output:
97706
result:
ok "97706"
Test #47:
score: 20
Accepted
time: 328ms
memory: 84080kb
input:
200000 0 232 360 98 161 71 183 249 330 303 263 492 137 124 415 353 376 421 135 128 31 342 510 225 233 371 279 312 37 396 59 382 43 20 206 307 338 311 423 454 478 241 204 389 65 35 512 503 357 95 258 490 63 299 39 371 105 230 181 456 343 453 476 389 3 40 291 335 11 366 201 58 19 221 185 21 381 322 25...
output:
96826
result:
ok "96826"
Test #48:
score: 20
Accepted
time: 299ms
memory: 82524kb
input:
200000 0 341 444 28 12 172 427 315 420 447 449 401 134 473 397 180 63 272 127 287 230 174 175 481 27 388 394 70 146 481 100 483 44 282 292 81 266 432 265 433 507 216 436 442 50 173 216 59 284 385 285 100 137 240 407 298 482 234 455 246 231 428 6 441 471 29 305 285 494 228 395 463 203 238 404 16 119 ...
output:
97015
result:
ok "97015"
Test #49:
score: 20
Accepted
time: 314ms
memory: 88796kb
input:
200000 0 278 461 46 824 614 834 662 290 378 214 72 575 616 29 696 513 704 78 554 776 991 152 221 21 278 284 920 163 867 70 602 248 250 932 671 975 950 226 957 437 767 205 396 480 304 562 993 785 1000 276 861 263 250 737 958 185 723 627 615 142 739 761 7 653 209 1021 400 14 655 600 347 954 694 394 55...
output:
95590
result:
ok "95590"
Test #50:
score: 20
Accepted
time: 304ms
memory: 85436kb
input:
200000 0 629 413 500 592 649 1 867 473 342 620 330 785 772 562 524 777 146 497 192 603 362 267 122 554 328 183 572 786 794 142 822 908 168 432 858 504 64 628 319 893 628 211 57 709 384 597 193 316 66 699 79 418 458 999 477 288 138 133 254 213 1005 930 79 273 771 572 400 995 395 348 217 88 959 743 50...
output:
96057
result:
ok "96057"
Test #51:
score: 20
Accepted
time: 306ms
memory: 87964kb
input:
200000 0 1477 526 106 494 1384 558 275 1285 209 1640 1182 685 679 828 209 1783 1560 1884 1316 421 702 682 1918 896 260 1410 888 513 983 581 393 1803 1358 237 840 26 1523 21 1358 522 272 1613 804 336 1919 10 65 326 1451 558 1267 1643 1008 1802 509 31 1008 1574 651 1155 599 92 360 1857 1942 1935 1347 ...
output:
94244
result:
ok "94244"
Test #52:
score: 20
Accepted
time: 299ms
memory: 90732kb
input:
200000 0 1972 147 127 1715 994 210 685 994 1863 61 65 1196 1496 840 1675 1323 1552 1721 348 41 1646 1128 397 1666 975 623 518 1011 1235 1197 1210 1441 1613 860 712 1702 656 878 452 973 846 648 1033 730 91 1892 26 1051 1143 1600 1978 1108 1057 1962 1134 84 965 167 1554 1141 1048 721 1638 1343 6 1787 ...
output:
94161
result:
ok "94161"
Test #53:
score: 20
Accepted
time: 277ms
memory: 91732kb
input:
200000 0 1341 3309 846 1742 2279 501 870 3994 900 359 1640 899 1137 1514 2428 933 2132 1202 3324 2831 2359 2774 1776 589 1472 2620 2121 1852 3332 757 1899 3476 3817 528 1403 3473 3234 1128 79 3366 270 2322 3162 2354 1936 2082 2061 787 1127 798 837 463 235 4009 3391 2454 2757 2387 64 299 1117 1521 39...
output:
92483
result:
ok "92483"
Test #54:
score: 20
Accepted
time: 289ms
memory: 90204kb
input:
200000 0 524 1074 2931 859 4003 903 1408 3112 2455 3158 763 3145 1321 862 2824 603 3491 1934 212 2171 2524 2533 975 1290 274 2166 2457 2726 1348 4041 10 2208 2507 2793 3797 3157 3132 3315 1289 989 108 212 1564 648 61 3207 2816 2478 1133 3178 3303 673 2571 1055 3739 2320 2352 4094 3476 4043 2551 9 29...
output:
92515
result:
ok "92515"
Test #55:
score: 20
Accepted
time: 269ms
memory: 89472kb
input:
200000 0 545 3440 3256 3758 169 3124 2814 4446 3673 5414 475 5479 3246 2916 3951 4150 2321 2017 2945 2278 5856 3340 455 7121 1836 1876 1778 5051 3282 8108 4203 1450 4688 2434 8127 2303 2310 2303 3639 1484 26 7206 7214 2498 590 4579 5272 2407 1778 2178 3582 6928 1422 5358 7241 7561 6296 5747 1532 414...
output:
90478
result:
ok "90478"
Test #56:
score: 20
Accepted
time: 262ms
memory: 91964kb
input:
200000 0 6555 2777 2744 7295 2924 6368 1886 1851 2093 5717 4801 5701 3270 2251 5794 6999 5703 5578 6020 4169 4239 4308 4068 5224 4947 1069 4747 7042 7795 3072 6182 7255 7319 3156 1722 7259 4459 4209 6242 2297 3466 5187 266 1167 7259 5306 1933 740 4523 7351 4140 3236 319 7455 5441 5910 2421 3385 3049...
output:
90139
result:
ok "90139"
Test #57:
score: 20
Accepted
time: 232ms
memory: 83904kb
input:
200000 0 8063 263 211 10655 6078 16190 11348 15618 15841 15503 5228 15536 1674 184 10629 3793 8682 3529 10848 1082 7710 15012 11017 7292 10042 7252 6827 1388 11919 5302 15713 2175 311 11563 10017 2292 5914 13507 1758 2342 15046 11356 12337 7545 913 13694 7374 13226 3085 10510 10329 10155 13450 12212...
output:
88332
result:
ok "88332"
Test #58:
score: 20
Accepted
time: 243ms
memory: 85436kb
input:
200000 0 13676 14198 4693 26 9041 13446 1372 13510 10505 10043 6790 4772 2349 6519 13876 14237 5677 8286 12193 1912 926 8000 5417 11187 5042 9760 11205 6126 3216 2135 6306 1476 4694 8236 12713 1207 10323 870 9751 14673 6411 2064 3558 8546 3876 13806 7748 1410 12978 14692 9117 6835 8228 14796 3467 19...
output:
88288
result:
ok "88288"
Test #59:
score: 20
Accepted
time: 207ms
memory: 77956kb
input:
200000 0 11707 279 29710 31692 7327 27020 27139 26667 14285 10895 2965 29687 32472 30371 16878 3950 16110 11936 3228 9071 1938 3785 29761 28253 15272 23413 20810 30353 27762 18758 12319 26764 14537 21575 26159 11228 19728 9233 10574 18689 25272 12290 24921 23837 30846 13492 26143 13558 32711 5386 45...
output:
87066
result:
ok "87066"
Test #60:
score: 20
Accepted
time: 202ms
memory: 78004kb
input:
200000 0 27565 17854 31918 27205 20203 25256 15105 14527 13413 22977 8391 15770 25761 24288 20546 12881 19836 23937 15369 8830 21571 7779 802 18843 14742 4989 14113 22588 6888 23713 15581 28362 24083 15056 10222 21968 30609 364 29418 1745 18131 17998 12522 22441 15536 28816 25141 23127 25364 17780 3...
output:
87022
result:
ok "87022"
Subtask #4:
score: 15
Accepted
Test #61:
score: 15
Accepted
time: 672ms
memory: 47488kb
input:
200000 200000 1 2 1 2 2 1 2 1 2 1 1 2 1 1 2 1 1 2 1 2 2 1 2 2 2 1 2 2 2 2 2 1 2 1 2 1 1 2 1 1 2 2 2 1 1 2 2 1 2 1 2 1 1 2 1 2 2 2 1 2 1 2 1 1 1 1 2 1 1 1 1 1 1 1 2 2 2 2 2 2 2 1 1 2 2 1 2 2 2 2 2 1 1 1 2 2 2 1 1 1 1 1 1 1 2 2 1 2 2 1 1 1 1 1 2 2 2 2 2 2 1 1 2 2 2 1 2 2 2 2 1 1 1 2 2 1 2 2 2 1 1 1 2 ...
output:
99575 99575 99575 99575 99574 99573 99573 99574 99575 99575 99575 99575 99576 99575 99575 99574 99574 99574 99575 99576 99576 99575 99574 99573 99574 99575 99575 99576 99575 99574 99573 99573 99573 99572 99572 99571 99572 99571 99571 99571 99572 99572 99571 99572 99572 99572 99572 99572 99571 99571 ...
result:
ok 200001 tokens
Test #62:
score: 15
Accepted
time: 661ms
memory: 44508kb
input:
200000 200000 2 2 1 1 1 2 1 2 1 2 2 1 2 2 1 1 2 1 1 2 1 2 2 2 2 1 2 2 2 2 1 1 2 1 2 2 1 1 1 1 1 1 1 1 2 1 2 2 2 1 1 2 2 2 2 1 1 2 2 1 2 2 2 2 1 1 1 1 2 2 2 1 1 2 2 2 1 1 2 1 2 2 2 2 1 2 1 1 2 2 2 2 2 2 2 1 2 1 2 2 2 2 1 1 2 2 2 1 1 2 2 2 2 1 2 1 2 2 1 2 2 2 2 1 2 1 2 1 1 1 2 2 2 2 1 1 1 1 1 2 1 1 2 ...
output:
99732 99733 99734 99733 99732 99732 99732 99732 99732 99732 99731 99730 99731 99731 99731 99731 99731 99730 99731 99731 99731 99731 99732 99733 99732 99732 99733 99733 99733 99733 99733 99733 99733 99733 99733 99732 99733 99732 99731 99730 99731 99732 99733 99733 99733 99733 99732 99732 99732 99731 ...
result:
ok 200001 tokens
Test #63:
score: 15
Accepted
time: 656ms
memory: 48144kb
input:
200000 200000 2 1 1 2 2 1 1 1 1 2 1 2 2 2 1 2 2 1 2 2 1 1 1 2 1 1 1 1 1 2 1 1 2 2 2 2 2 1 2 2 2 1 1 1 2 1 1 1 2 1 1 1 2 2 1 2 1 2 1 1 1 2 1 1 2 1 1 2 2 2 1 1 1 1 1 1 1 1 2 1 2 1 2 2 2 1 2 1 1 2 1 1 2 1 1 2 1 1 1 1 2 2 1 1 2 1 1 1 1 2 1 2 2 2 2 2 1 2 2 2 1 1 1 2 2 1 2 1 2 2 1 2 1 1 2 2 1 2 1 1 2 1 1 ...
output:
99568 99568 99568 99567 99567 99568 99569 99569 99568 99568 99567 99567 99566 99565 99564 99564 99563 99564 99564 99565 99566 99567 99567 99568 99567 99567 99566 99565 99566 99565 99566 99567 99567 99567 99567 99567 99566 99567 99566 99566 99566 99566 99565 99566 99566 99566 99565 99564 99565 99565 ...
result:
ok 200001 tokens
Test #64:
score: 15
Accepted
time: 679ms
memory: 47424kb
input:
200000 200000 2 1 1 2 2 1 1 2 2 1 2 1 2 1 1 2 1 1 1 2 1 1 2 1 2 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 2 1 2 2 1 2 1 1 2 2 1 2 1 1 2 2 1 1 2 1 1 2 1 2 1 1 2 2 1 2 2 1 1 2 2 2 2 1 1 2 2 2 1 2 1 2 1 1 2 2 2 2 1 2 2 1 2 1 2 1 1 2 1 1 1 1 2 2 2 2 1 1 1 2 2 1 1 2 2 2 1 2 1 1 1 2 2 1 1 1 2 2 1 2 2 2 2 1 2 1 2 2 1 ...
output:
99437 99437 99436 99435 99434 99434 99435 99434 99433 99433 99434 99435 99434 99435 99435 99435 99434 99434 99434 99434 99435 99436 99437 99438 99438 99438 99439 99440 99441 99442 99443 99442 99441 99440 99439 99438 99437 99438 99438 99438 99439 99438 99437 99437 99437 99438 99437 99437 99438 99437 ...
result:
ok 200001 tokens
Test #65:
score: 15
Accepted
time: 655ms
memory: 44564kb
input:
200000 200000 2 1 2 2 2 2 2 2 1 1 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 2 2 1 2 1 1 2 2 2 1 1 2 1 1 1 1 2 1 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 2 1 1 2 1 1 1 2 1 2 1 1 2 2 2 2 1 1 1 2 1 2 1 2 2 1 1 2 1 2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1 2 2 2 1 2 1 2 2 1 2 1 2 2 2 2 1 2 2 2 2 1 1 2 2 1 1 2 1 2 1 2 1 1 1 1 2 1 ...
output:
99598 99597 99597 99597 99596 99596 99595 99594 99594 99593 99593 99593 99593 99593 99593 99592 99592 99592 99591 99592 99591 99592 99592 99592 99592 99592 99592 99593 99593 99594 99593 99593 99592 99592 99593 99594 99594 99595 99594 99594 99595 99596 99596 99596 99596 99596 99597 99598 99598 99598 ...
result:
ok 200001 tokens
Test #66:
score: 15
Accepted
time: 643ms
memory: 43816kb
input:
200000 200000 1 2 1 2 2 2 2 1 2 2 2 1 1 2 2 2 1 2 2 1 2 2 2 1 1 1 2 2 1 2 1 2 2 1 1 2 1 2 1 1 1 1 2 2 2 2 1 2 2 1 2 2 1 1 2 1 1 2 2 2 2 2 2 2 1 2 1 2 2 2 2 1 1 2 2 2 2 1 2 1 2 1 1 2 1 1 2 1 1 1 1 1 2 2 2 2 1 2 1 1 1 2 2 2 2 2 1 1 1 2 2 2 2 2 2 1 1 1 2 1 2 1 2 2 1 1 2 2 1 2 2 1 1 1 1 1 2 1 2 2 1 2 1 ...
output:
99829 99828 99829 99829 99830 99831 99831 99831 99830 99829 99830 99830 99830 99831 99831 99831 99832 99832 99832 99832 99833 99833 99832 99831 99831 99831 99831 99831 99831 99830 99830 99830 99830 99829 99830 99829 99829 99829 99828 99828 99828 99827 99828 99828 99827 99827 99826 99826 99826 99827 ...
result:
ok 200001 tokens
Test #67:
score: 15
Accepted
time: 657ms
memory: 46992kb
input:
200000 200000 2 1 2 2 1 1 1 1 2 2 1 2 1 2 2 2 1 2 2 2 1 2 1 1 1 1 2 1 1 2 2 1 1 1 1 2 1 1 1 1 1 2 1 1 2 2 2 1 2 1 2 1 2 2 1 1 1 1 2 1 1 2 2 2 2 2 2 1 2 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 1 1 2 2 2 1 2 2 2 2 2 1 2 1 2 2 1 2 1 1 2 2 2 1 2 2 2 1 1 2 1 1 1 2 2 1 2 2 1 2 2 2 2 2 1 2 2 1 1 ...
output:
99690 99690 99689 99689 99689 99688 99687 99687 99687 99688 99688 99688 99688 99687 99687 99688 99688 99688 99688 99687 99687 99687 99688 99688 99687 99687 99687 99687 99687 99688 99689 99688 99688 99688 99689 99690 99691 99691 99692 99692 99691 99691 99690 99690 99691 99690 99690 99691 99691 99691 ...
result:
ok 200001 tokens
Test #68:
score: 15
Accepted
time: 654ms
memory: 45088kb
input:
200000 200000 2 1 2 2 2 1 1 1 2 2 1 2 2 2 2 2 2 2 2 2 1 1 2 1 1 1 2 1 2 1 1 1 2 2 2 2 2 1 2 1 1 1 2 2 2 2 2 1 2 2 1 2 2 2 1 2 1 2 1 2 1 1 1 2 1 2 2 1 2 1 1 1 2 1 1 1 1 2 1 2 2 1 1 1 1 2 2 2 1 1 1 2 1 2 1 2 2 2 2 1 2 1 1 1 2 2 2 1 1 2 1 1 1 2 1 1 1 2 1 2 1 1 1 1 2 1 2 1 1 2 2 1 2 1 2 1 2 1 1 1 1 1 1 ...
output:
99504 99505 99506 99507 99507 99507 99508 99509 99508 99509 99509 99510 99511 99511 99511 99512 99512 99512 99511 99510 99510 99511 99510 99509 99509 99509 99509 99509 99508 99509 99509 99509 99510 99510 99509 99509 99509 99509 99508 99507 99506 99506 99506 99506 99506 99507 99508 99508 99508 99508 ...
result:
ok 200001 tokens
Test #69:
score: 15
Accepted
time: 626ms
memory: 43940kb
input:
200000 200000 2 1 1 2 2 1 1 1 1 1 2 1 2 2 1 1 2 2 2 1 1 1 1 1 1 2 2 2 2 1 1 2 1 2 2 1 1 1 2 1 2 2 2 1 2 1 2 2 1 1 2 2 1 2 2 2 2 1 2 1 1 2 1 2 1 1 2 2 2 1 2 1 2 2 2 2 2 1 1 1 1 2 2 2 2 2 1 2 1 1 1 1 2 2 2 2 1 2 2 1 2 1 1 1 1 1 2 1 2 1 1 2 1 2 1 2 1 2 2 2 2 2 2 2 2 2 1 1 2 1 1 1 1 1 2 1 2 2 2 1 1 2 2 ...
output:
99681 99682 99682 99682 99681 99681 99682 99682 99682 99682 99681 99682 99681 99681 99682 99682 99682 99683 99684 99683 99683 99684 99685 99686 99686 99686 99686 99685 99685 99685 99686 99687 99686 99685 99685 99685 99686 99686 99685 99685 99685 99684 99684 99683 99683 99684 99684 99685 99686 99686 ...
result:
ok 200001 tokens
Test #70:
score: 15
Accepted
time: 639ms
memory: 45048kb
input:
200000 200000 1 1 2 2 1 1 1 2 1 2 1 1 1 1 2 2 1 2 1 2 2 2 1 1 1 2 2 2 1 1 1 2 2 2 1 2 1 2 2 2 2 2 2 1 1 2 1 2 2 2 2 1 2 1 2 1 1 1 1 1 2 1 1 1 2 2 1 2 1 2 2 1 1 2 2 2 1 2 2 2 1 2 2 2 1 1 1 2 2 2 2 2 1 2 1 1 1 2 2 1 1 1 1 2 1 2 2 2 2 2 2 1 2 2 1 1 2 2 2 2 2 2 1 1 1 1 1 2 1 1 2 2 2 2 2 1 1 2 1 1 2 1 1 ...
output:
99505 99504 99503 99503 99504 99505 99505 99505 99505 99505 99506 99507 99506 99506 99505 99505 99505 99505 99506 99506 99505 99506 99506 99506 99507 99507 99507 99507 99508 99509 99510 99510 99509 99509 99509 99509 99509 99509 99508 99509 99508 99508 99507 99507 99507 99506 99506 99506 99507 99507 ...
result:
ok 200001 tokens
Subtask #5:
score: 20
Accepted
Test #71:
score: 20
Accepted
time: 282ms
memory: 37628kb
input:
100000 100000 2 1 1 1 1 1 1 2 2 2 2 1 2 1 1 1 2 2 1 2 1 2 2 2 2 2 2 2 1 2 2 2 1 1 1 1 1 2 2 2 2 1 1 2 2 2 1 2 2 1 2 1 2 2 2 2 1 2 1 1 1 2 2 2 1 1 2 1 1 1 2 1 2 2 2 1 1 2 1 1 2 1 1 1 1 1 1 1 2 2 1 1 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 1 1 2 1 2 1 1 1 1 2 2 2 1 2 1 1 1 2 2 2 1 1 2 1 2 2 2 2 2 1 1 2 1 1 1 1 ...
output:
49860 49859 49859 49859 49858 49858 49858 49859 49858 49858 49857 49858 49858 49857 49856 49855 49854 49854 49854 49854 49854 49854 49854 49854 49853 49853 49854 49854 49855 49855 49854 49854 49853 49852 49852 49852 49852 49851 49851 49852 49852 49851 49850 49849 49849 49849 49849 49848 49848 49848 ...
result:
ok 100001 tokens
Test #72:
score: 20
Accepted
time: 290ms
memory: 36800kb
input:
100000 100000 2 2 1 1 1 2 2 2 1 2 1 2 2 2 2 1 2 2 1 2 2 2 1 1 1 1 2 2 1 2 1 1 2 1 2 1 2 2 1 2 1 2 1 1 2 2 2 1 2 1 1 1 1 1 2 1 2 2 1 1 1 1 2 2 2 2 1 2 2 1 1 2 2 1 2 2 2 1 1 1 2 2 2 2 1 2 2 1 2 2 1 1 1 2 1 1 2 1 2 2 2 1 1 1 2 1 1 2 2 1 1 1 1 2 2 1 2 1 1 1 2 2 1 1 1 2 2 1 1 1 2 2 2 1 2 1 2 2 2 2 1 2 1 ...
output:
49869 49870 49871 49871 49872 49872 49871 49872 49872 49871 49871 49870 49870 49871 49871 49870 49869 49870 49870 49870 49871 49871 49871 49872 49873 49872 49873 49873 49873 49873 49873 49874 49874 49874 49874 49875 49874 49875 49876 49875 49876 49876 49876 49876 49876 49876 49876 49876 49875 49874 ...
result:
ok 100001 tokens
Test #73:
score: 20
Accepted
time: 326ms
memory: 39360kb
input:
100000 100000 1 4 3 1 1 3 2 1 3 1 3 4 3 4 1 1 3 2 4 3 4 4 1 3 3 1 1 4 1 1 3 4 2 1 2 1 4 4 3 3 2 3 1 3 3 1 4 4 3 2 4 4 4 1 1 4 1 4 3 1 2 4 2 2 4 2 4 3 3 4 1 4 3 1 4 4 3 2 3 4 4 4 3 4 2 4 3 4 4 2 3 1 3 3 1 3 1 4 3 3 2 3 1 3 2 3 2 3 1 4 2 3 4 2 1 3 1 4 1 1 3 2 1 4 3 1 4 4 2 4 2 2 2 1 1 4 3 3 1 3 2 4 4 ...
output:
49452 49452 49452 49451 49451 49452 49451 49451 49451 49450 49450 49451 49450 49449 49449 49449 49450 49449 49448 49448 49447 49446 49446 49446 49447 49447 49448 49448 49448 49448 49448 49449 49449 49450 49451 49451 49451 49451 49451 49451 49451 49452 49453 49454 49455 49456 49456 49456 49455 49455 ...
result:
ok 100001 tokens
Test #74:
score: 20
Accepted
time: 332ms
memory: 40820kb
input:
100000 100000 3 4 3 1 3 3 2 4 1 4 3 2 1 3 2 4 2 4 1 1 4 2 2 2 2 4 2 1 1 2 3 1 1 1 2 4 4 3 1 4 1 4 2 4 4 4 2 3 1 4 3 1 1 2 1 4 2 2 3 4 4 2 1 1 3 1 2 1 2 3 1 3 1 4 2 3 2 1 1 1 1 2 3 3 1 3 1 1 1 2 3 4 1 2 2 1 3 1 1 3 2 1 1 4 4 1 4 1 3 1 1 4 1 3 3 4 3 3 4 1 3 1 1 3 4 1 3 2 4 3 4 2 3 3 2 1 2 1 3 4 1 1 2 ...
output:
49676 49675 49675 49675 49675 49676 49676 49677 49677 49677 49676 49677 49678 49678 49678 49677 49677 49677 49677 49677 49678 49679 49679 49679 49679 49680 49680 49680 49680 49680 49680 49680 49681 49682 49683 49683 49684 49685 49685 49684 49683 49683 49684 49684 49684 49684 49685 49685 49686 49686 ...
result:
ok 100001 tokens
Test #75:
score: 20
Accepted
time: 356ms
memory: 44380kb
input:
100000 100000 8 2 7 3 5 5 3 7 6 3 4 1 4 2 2 7 5 2 5 6 5 1 8 4 5 5 2 4 3 6 8 7 1 4 7 3 4 1 6 4 4 3 4 3 3 5 1 8 4 4 3 2 1 1 3 8 4 4 5 3 4 7 7 1 1 8 7 8 6 3 2 2 1 3 7 2 7 2 7 1 1 7 8 6 8 7 1 7 6 8 2 5 6 4 1 6 7 6 8 8 6 3 2 8 8 3 4 4 1 3 2 1 3 3 5 6 2 1 8 3 2 8 6 3 2 2 5 3 2 6 5 4 7 2 3 5 4 7 7 4 7 6 8 ...
output:
49692 49691 49691 49690 49690 49690 49690 49690 49690 49689 49690 49690 49690 49690 49691 49691 49691 49690 49690 49689 49688 49688 49688 49687 49686 49685 49684 49684 49683 49682 49683 49682 49682 49682 49682 49681 49680 49681 49681 49682 49682 49682 49682 49682 49682 49682 49683 49684 49685 49685 ...
result:
ok 100001 tokens
Test #76:
score: 20
Accepted
time: 354ms
memory: 45256kb
input:
100000 100000 8 1 1 4 4 8 5 3 1 7 1 7 1 8 2 3 1 5 2 6 4 2 3 1 1 1 4 3 6 8 8 3 8 5 1 3 8 2 1 3 2 5 2 1 8 3 5 5 1 3 1 7 1 7 3 3 2 8 3 6 5 8 2 2 5 4 8 4 7 3 2 7 3 7 6 8 8 4 6 7 8 2 1 3 8 1 3 5 1 4 7 3 8 2 1 6 4 4 4 4 2 8 6 5 5 5 3 8 8 8 5 7 8 2 3 1 6 6 2 6 8 5 4 6 2 8 6 2 8 7 8 7 4 2 4 7 1 4 2 6 3 6 2 ...
output:
49666 49666 49667 49666 49667 49668 49667 49666 49667 49667 49668 49668 49668 49668 49668 49669 49668 49668 49667 49668 49667 49668 49668 49668 49668 49667 49668 49669 49670 49671 49671 49671 49671 49671 49672 49673 49673 49673 49673 49672 49672 49672 49671 49671 49672 49672 49672 49671 49671 49672 ...
result:
ok 100001 tokens
Test #77:
score: 20
Accepted
time: 375ms
memory: 47932kb
input:
100000 100000 9 2 11 11 7 2 10 9 1 9 7 5 7 5 2 8 4 8 5 12 11 1 16 14 2 15 10 8 8 16 4 2 9 16 12 3 1 8 9 6 13 4 4 15 12 2 13 11 12 15 8 9 12 5 16 1 3 9 9 8 10 3 1 16 4 8 1 1 14 8 12 5 3 2 16 10 5 12 10 14 3 1 16 3 10 11 3 2 6 10 9 7 3 12 2 4 2 13 7 3 4 11 7 14 10 5 12 3 5 4 6 11 5 13 10 13 3 2 11 8 1...
output:
49442 49442 49441 49440 49441 49441 49440 49439 49440 49440 49439 49438 49438 49437 49436 49436 49436 49436 49435 49434 49434 49434 49434 49433 49434 49435 49434 49434 49434 49434 49433 49433 49433 49433 49432 49432 49432 49432 49432 49432 49433 49432 49432 49432 49432 49432 49433 49432 49432 49433 ...
result:
ok 100001 tokens
Test #78:
score: 20
Accepted
time: 365ms
memory: 49016kb
input:
100000 100000 7 12 8 11 10 12 12 6 5 6 3 7 2 13 10 2 11 2 12 7 10 5 4 7 15 3 15 9 5 16 5 11 1 7 13 11 7 10 4 15 13 6 16 7 4 9 10 5 2 8 3 3 2 9 2 16 2 14 16 11 7 9 9 2 2 2 6 2 2 9 10 8 8 8 16 11 16 4 10 5 16 7 8 10 16 11 1 10 2 16 4 13 3 8 10 2 4 11 2 1 12 12 14 16 14 10 8 1 13 8 12 15 2 2 12 15 10 1...
output:
49476 49477 49478 49477 49478 49478 49479 49480 49479 49479 49479 49479 49479 49480 49480 49479 49480 49479 49480 49481 49482 49482 49481 49480 49480 49479 49479 49479 49479 49478 49478 49479 49479 49479 49479 49479 49478 49479 49479 49479 49479 49479 49479 49480 49481 49481 49481 49481 49481 49480 ...
result:
ok 100001 tokens
Test #79:
score: 20
Accepted
time: 399ms
memory: 54004kb
input:
100000 100000 24 10 13 25 5 24 31 11 31 24 32 29 3 13 18 29 17 14 32 18 25 13 7 7 28 21 27 23 1 12 5 31 8 7 25 22 30 26 17 13 14 8 3 20 26 27 8 27 8 22 6 15 7 3 32 8 14 22 12 31 8 16 15 17 23 16 17 9 9 30 1 17 13 28 26 28 19 29 24 15 28 22 20 25 27 27 32 19 31 19 9 7 9 6 7 10 18 2 2 3 11 17 24 23 26...
output:
49517 49516 49516 49516 49516 49516 49516 49516 49517 49518 49518 49518 49519 49520 49521 49522 49522 49523 49523 49523 49524 49524 49523 49523 49523 49523 49522 49523 49523 49522 49522 49521 49522 49522 49522 49521 49521 49521 49520 49520 49520 49520 49520 49520 49520 49520 49520 49521 49521 49522 ...
result:
ok 100001 tokens
Test #80:
score: 20
Accepted
time: 393ms
memory: 54080kb
input:
100000 100000 13 21 25 28 24 28 16 15 7 15 5 23 4 6 22 12 15 23 3 10 22 20 5 31 25 30 20 15 17 8 24 9 7 13 26 29 3 15 3 2 4 14 2 5 24 8 15 7 3 18 32 8 21 5 11 10 31 25 10 17 14 31 6 29 2 32 30 5 13 11 11 5 8 16 22 24 6 26 13 8 19 20 30 15 27 12 13 9 19 27 29 12 30 16 17 3 12 27 25 15 26 22 25 2 18 3...
output:
49276 49276 49275 49275 49275 49276 49277 49277 49277 49278 49277 49277 49278 49278 49279 49278 49277 49276 49277 49278 49279 49280 49280 49281 49280 49280 49279 49279 49278 49279 49279 49279 49278 49279 49280 49279 49280 49280 49280 49279 49280 49281 49280 49280 49280 49281 49280 49281 49280 49280 ...
result:
ok 100001 tokens
Test #81:
score: 20
Accepted
time: 409ms
memory: 59304kb
input:
100000 100000 19 34 10 55 34 8 41 25 38 1 64 28 56 39 61 44 12 42 53 47 33 58 9 21 52 7 49 19 29 57 53 39 15 8 46 60 61 30 56 6 54 53 25 58 51 28 10 14 53 13 16 16 18 36 37 54 21 13 29 57 36 2 1 5 18 46 1 59 28 47 37 27 31 26 15 50 30 60 19 4 2 18 44 46 45 34 17 6 39 14 7 33 40 62 59 18 17 36 15 11 ...
output:
49064 49063 49062 49062 49062 49061 49061 49060 49060 49060 49060 49060 49060 49060 49059 49059 49059 49059 49060 49059 49060 49061 49060 49061 49061 49061 49062 49062 49063 49062 49062 49063 49062 49062 49061 49062 49061 49061 49061 49062 49062 49063 49063 49062 49062 49063 49062 49062 49063 49064 ...
result:
ok 100001 tokens
Test #82:
score: 20
Accepted
time: 433ms
memory: 60636kb
input:
100000 100000 20 56 8 35 5 20 5 33 6 46 52 6 10 15 19 40 38 23 40 50 26 27 25 34 45 46 58 51 18 29 44 16 7 39 32 30 28 55 34 11 36 46 39 11 10 15 55 8 25 57 60 11 4 35 12 31 31 64 40 9 24 48 39 23 11 52 44 2 45 27 13 2 9 33 30 28 61 18 6 35 46 6 29 42 34 42 51 58 39 14 16 56 46 11 17 49 47 11 6 25 4...
output:
49123 49122 49122 49122 49122 49123 49124 49125 49125 49124 49124 49124 49124 49125 49125 49124 49124 49123 49124 49124 49123 49123 49123 49122 49122 49123 49124 49123 49124 49123 49122 49122 49121 49122 49121 49120 49120 49120 49120 49120 49119 49120 49120 49120 49119 49119 49118 49118 49118 49118 ...
result:
ok 100001 tokens
Test #83:
score: 20
Accepted
time: 451ms
memory: 63608kb
input:
100000 100000 48 13 113 16 50 126 25 5 16 41 9 85 68 76 39 114 44 52 88 21 39 60 124 96 33 96 53 7 54 38 117 43 71 9 89 94 94 63 13 121 107 10 49 22 65 15 125 13 31 60 100 113 61 88 51 30 108 90 20 21 75 10 107 91 74 12 75 116 52 69 15 103 62 122 23 61 12 36 88 96 5 69 95 35 124 48 80 65 68 70 103 1...
output:
48724 48724 48724 48724 48724 48724 48725 48725 48725 48726 48727 48728 48728 48727 48728 48729 48728 48729 48728 48729 48728 48728 48729 48728 48727 48728 48728 48727 48727 48727 48727 48726 48725 48725 48725 48726 48727 48728 48728 48728 48729 48728 48729 48728 48728 48728 48727 48727 48728 48729 ...
result:
ok 100001 tokens
Test #84:
score: 20
Accepted
time: 447ms
memory: 63316kb
input:
100000 100000 100 113 33 10 61 96 68 19 114 4 75 63 90 31 40 49 6 42 98 50 83 107 16 123 80 70 73 37 69 22 24 5 75 55 21 22 96 76 100 126 119 18 76 123 67 63 50 13 74 31 116 89 104 73 100 31 49 82 8 114 26 25 79 59 19 90 115 15 12 18 52 19 61 25 55 49 67 65 109 70 72 45 76 123 32 59 75 93 117 49 107...
output:
48763 48764 48764 48763 48763 48764 48764 48764 48764 48764 48765 48764 48764 48764 48764 48765 48765 48765 48764 48763 48764 48765 48764 48763 48762 48762 48762 48763 48764 48763 48762 48762 48762 48763 48763 48763 48763 48763 48763 48762 48762 48763 48763 48763 48763 48762 48761 48761 48760 48761 ...
result:
ok 100001 tokens
Test #85:
score: 20
Accepted
time: 465ms
memory: 70464kb
input:
100000 100000 175 25 142 240 193 61 252 60 221 64 125 143 41 142 64 77 196 178 42 250 13 125 25 182 61 107 212 75 146 39 234 210 151 79 219 5 160 51 34 196 86 124 107 10 238 8 247 127 109 6 114 29 251 159 202 11 225 69 7 145 256 175 126 49 195 42 178 117 48 108 119 79 154 137 25 95 91 165 73 227 122...
output:
48301 48301 48302 48302 48302 48303 48303 48304 48303 48303 48303 48303 48302 48303 48303 48303 48302 48302 48301 48301 48301 48300 48300 48301 48301 48301 48300 48300 48300 48300 48300 48301 48300 48300 48300 48301 48301 48301 48300 48300 48299 48299 48300 48300 48301 48302 48301 48301 48301 48302 ...
result:
ok 100001 tokens
Test #86:
score: 20
Accepted
time: 464ms
memory: 70624kb
input:
100000 100000 107 75 230 30 149 43 171 147 169 235 147 168 132 231 125 12 12 23 32 252 143 161 133 68 123 154 111 117 164 89 48 164 109 44 151 179 26 9 230 92 114 83 199 137 27 26 106 52 192 120 17 159 13 12 225 26 117 225 96 180 125 66 83 97 169 84 222 208 147 7 28 228 247 190 17 156 41 26 116 6 20...
output:
48305 48306 48307 48308 48308 48307 48306 48306 48306 48306 48305 48305 48305 48305 48306 48306 48306 48307 48307 48306 48306 48306 48306 48306 48305 48305 48305 48304 48304 48305 48305 48304 48304 48304 48303 48303 48304 48304 48304 48305 48305 48304 48304 48304 48303 48303 48304 48305 48306 48306 ...
result:
ok 100001 tokens
Test #87:
score: 20
Accepted
time: 458ms
memory: 74236kb
input:
100000 100000 158 184 26 364 149 502 96 204 25 81 177 112 273 447 69 92 287 34 439 132 32 261 319 258 158 345 492 418 293 103 415 231 12 150 407 490 86 411 407 48 216 423 203 86 105 128 502 432 486 491 258 393 304 279 56 286 239 375 280 403 442 225 418 33 191 169 227 342 397 201 216 127 193 217 281 ...
output:
47479 47479 47479 47479 47478 47479 47479 47479 47479 47480 47480 47480 47480 47480 47480 47479 47479 47478 47479 47479 47479 47479 47479 47479 47479 47480 47480 47479 47479 47478 47478 47478 47477 47477 47476 47476 47476 47476 47476 47476 47476 47476 47476 47476 47476 47477 47476 47476 47477 47476 ...
result:
ok 100001 tokens
Test #88:
score: 20
Accepted
time: 480ms
memory: 75100kb
input:
100000 100000 162 2 113 232 80 339 53 323 211 251 276 371 314 26 280 510 253 264 442 371 205 289 218 216 28 434 495 156 213 493 231 455 254 336 436 160 419 55 451 311 140 288 48 280 257 186 48 427 5 67 425 301 299 128 480 245 66 480 511 336 105 44 5 222 241 343 303 143 37 491 152 198 334 104 76 434 ...
output:
47782 47782 47782 47783 47782 47782 47783 47783 47782 47783 47784 47785 47784 47784 47783 47783 47783 47784 47784 47783 47783 47783 47783 47783 47782 47782 47782 47781 47781 47781 47781 47781 47781 47780 47780 47780 47780 47779 47779 47778 47777 47777 47777 47777 47777 47777 47776 47776 47777 47777 ...
result:
ok 100001 tokens
Test #89:
score: 20
Accepted
time: 500ms
memory: 79340kb
input:
100000 100000 394 530 447 794 760 152 774 216 616 750 397 648 672 17 773 303 414 89 524 484 661 523 693 965 927 995 1007 656 901 358 252 412 949 1012 61 548 64 392 784 538 626 479 955 258 993 852 255 689 884 415 418 691 165 34 335 338 474 680 530 964 538 874 119 988 230 87 926 52 847 912 297 131 278...
output:
47211 47212 47213 47213 47213 47214 47214 47215 47215 47215 47215 47214 47214 47215 47214 47215 47214 47215 47215 47215 47215 47215 47215 47215 47215 47215 47215 47215 47216 47215 47214 47214 47215 47214 47213 47214 47213 47213 47212 47211 47210 47210 47211 47210 47211 47212 47212 47211 47210 47210 ...
result:
ok 100001 tokens
Test #90:
score: 20
Accepted
time: 471ms
memory: 79464kb
input:
100000 100000 569 255 794 198 622 989 820 175 732 390 617 484 977 607 165 453 133 290 432 360 947 324 121 367 602 266 101 793 427 460 532 697 215 533 731 207 248 97 11 637 885 791 919 91 445 657 748 1015 419 846 11 22 133 276 581 968 52 687 192 10 977 84 900 655 826 304 527 554 314 725 786 173 679 2...
output:
47148 47148 47148 47147 47146 47146 47146 47145 47145 47145 47144 47144 47143 47142 47142 47142 47141 47140 47139 47138 47139 47139 47140 47141 47142 47143 47144 47144 47144 47144 47144 47145 47145 47145 47145 47145 47145 47146 47146 47146 47146 47147 47146 47145 47145 47145 47145 47145 47145 47146 ...
result:
ok 100001 tokens
Test #91:
score: 20
Accepted
time: 437ms
memory: 80040kb
input:
100000 100000 1714 990 329 1800 1539 1676 318 1021 425 1292 1212 1146 238 1420 1335 1335 570 157 1025 62 1289 862 548 640 1741 1423 927 1109 1897 409 73 67 191 1880 1182 1434 963 1662 29 10 858 101 1635 626 589 248 1557 1564 1706 1429 1208 246 924 218 261 1249 816 25 724 1611 3 1433 807 1162 544 984...
output:
45929 45930 45930 45930 45930 45930 45930 45929 45929 45929 45928 45927 45928 45928 45928 45927 45926 45926 45926 45925 45924 45925 45925 45926 45927 45927 45926 45927 45928 45929 45929 45928 45927 45927 45926 45926 45926 45926 45927 45928 45928 45928 45929 45928 45928 45928 45929 45930 45931 45932 ...
result:
ok 100001 tokens
Test #92:
score: 20
Accepted
time: 449ms
memory: 80964kb
input:
100000 100000 42 742 213 2039 1816 921 1040 816 667 940 299 1847 388 523 109 1849 588 967 474 676 1027 1306 1873 356 781 975 1655 671 511 1412 759 1872 990 1892 896 96 603 831 397 1282 235 470 365 277 457 566 368 1681 1282 793 1082 339 785 762 1243 1837 1095 110 1210 212 1167 857 1245 202 770 1406 1...
output:
46025 46025 46024 46024 46024 46023 46023 46024 46024 46025 46025 46025 46026 46025 46026 46026 46027 46026 46026 46027 46028 46029 46030 46030 46031 46030 46030 46031 46032 46032 46032 46031 46031 46032 46032 46033 46033 46032 46033 46033 46033 46033 46032 46032 46031 46032 46033 46032 46031 46030 ...
result:
ok 100001 tokens
Test #93:
score: 20
Accepted
time: 432ms
memory: 83032kb
input:
100000 100000 3459 1322 3376 1761 1317 416 92 2336 2759 766 182 3929 3010 263 465 1994 1872 3928 15 762 3777 2430 3937 2504 790 2821 1113 3391 2959 3903 2100 3084 435 1214 447 2911 697 797 2647 630 2376 2699 3453 751 1625 3794 2601 3536 471 1775 1466 2257 1614 2090 3456 1393 2390 3158 734 441 1292 3...
output:
45274 45274 45274 45273 45273 45274 45274 45274 45274 45274 45275 45275 45276 45276 45275 45275 45275 45276 45276 45276 45276 45276 45276 45276 45276 45277 45278 45279 45278 45278 45279 45279 45279 45278 45278 45279 45279 45279 45279 45278 45278 45277 45276 45277 45278 45279 45279 45278 45277 45276 ...
result:
ok 100001 tokens
Test #94:
score: 20
Accepted
time: 424ms
memory: 81776kb
input:
100000 100000 1273 2756 2907 3489 1762 1707 820 1350 3912 3398 868 1867 3555 3275 134 1168 2880 1205 3581 1520 2922 3869 2553 462 555 4018 2212 925 257 1140 1290 991 2559 2620 2794 3570 2131 3624 2061 2433 781 981 236 2596 618 3853 3646 2127 1122 1180 528 2026 497 3187 3642 1120 1901 2307 1814 1012 ...
output:
45126 45125 45125 45126 45126 45125 45125 45125 45125 45124 45124 45124 45123 45123 45122 45122 45122 45122 45122 45122 45122 45123 45123 45122 45122 45122 45121 45120 45119 45119 45119 45119 45118 45118 45118 45119 45119 45119 45118 45117 45117 45117 45116 45116 45115 45116 45117 45117 45116 45116 ...
result:
ok 100001 tokens
Test #95:
score: 20
Accepted
time: 395ms
memory: 80740kb
input:
100000 100000 918 1374 2569 1511 7013 2288 7022 2226 6822 1197 5432 3986 8161 846 3311 8033 8121 7388 2061 3868 6971 3114 5150 7868 7460 3131 6754 1314 5445 6135 7111 6949 4806 6477 976 5459 1947 2414 6682 1986 7925 2606 3118 3458 4912 113 7865 429 511 5190 2905 3823 7938 7421 5208 6241 2002 1935 75...
output:
44272 44273 44272 44273 44273 44273 44272 44272 44272 44273 44273 44274 44274 44275 44275 44275 44275 44276 44276 44275 44275 44275 44275 44274 44274 44274 44275 44275 44276 44275 44275 44275 44275 44275 44276 44276 44276 44276 44276 44276 44275 44274 44274 44273 44274 44275 44276 44275 44275 44275 ...
result:
ok 100001 tokens
Test #96:
score: 20
Accepted
time: 402ms
memory: 80584kb
input:
100000 100000 1556 3900 1939 2875 5195 2979 3826 3024 124 5230 534 8182 4618 7309 6899 2408 5660 6971 3185 5427 4699 3682 6177 4882 3546 2599 3267 2826 1559 2712 3530 612 6601 6394 7331 3707 4500 598 7578 6604 35 2588 1726 1862 5040 6871 677 3975 482 3292 6253 8069 224 4171 3966 6734 4697 217 4044 8...
output:
44290 44291 44292 44293 44293 44293 44294 44294 44294 44295 44294 44294 44294 44293 44293 44294 44295 44294 44295 44296 44297 44297 44297 44296 44297 44297 44298 44299 44299 44300 44300 44300 44301 44301 44301 44301 44301 44302 44301 44302 44302 44301 44301 44300 44300 44300 44300 44300 44300 44300 ...
result:
ok 100001 tokens
Test #97:
score: 20
Accepted
time: 352ms
memory: 74848kb
input:
100000 100000 1038 4530 2112 9479 3907 2419 9927 2503 6132 7792 432 14664 14841 11977 3043 15054 9166 3764 274 6283 1776 13289 51 6986 12078 13989 4648 3951 3957 9978 7049 6624 1352 7544 6657 11628 10189 1022 9907 5160 7886 15175 5107 2858 11839 5411 2016 4759 921 1778 14214 13833 8879 8101 10692 61...
output:
43456 43456 43456 43456 43456 43457 43458 43458 43459 43458 43457 43456 43456 43457 43457 43457 43457 43456 43456 43456 43456 43456 43457 43456 43456 43456 43456 43456 43457 43456 43456 43455 43455 43455 43454 43454 43454 43454 43453 43453 43453 43453 43452 43453 43453 43453 43453 43452 43452 43452 ...
result:
ok 100001 tokens
Test #98:
score: 20
Accepted
time: 337ms
memory: 74548kb
input:
100000 100000 9331 1848 15611 14825 12931 9775 6841 1224 10627 5383 246 15594 10189 629 12013 7534 9507 10595 12245 1957 14491 5932 5538 5739 15059 10900 1072 15523 9446 10028 10328 14341 11195 13135 14882 113 9872 14258 6382 5559 15459 15192 8323 8225 10696 12368 6940 233 13678 3387 3514 4594 622 1...
output:
43491 43491 43491 43490 43491 43492 43491 43490 43489 43489 43489 43489 43489 43490 43490 43489 43489 43490 43490 43489 43489 43489 43489 43488 43488 43489 43489 43489 43488 43487 43487 43487 43486 43486 43487 43488 43488 43487 43488 43488 43488 43489 43490 43490 43490 43490 43491 43492 43492 43492 ...
result:
ok 100001 tokens
Test #99:
score: 20
Accepted
time: 279ms
memory: 68908kb
input:
100000 100000 17896 4044 6759 20664 30428 25108 7597 24899 22842 20930 25158 23548 10625 4413 17599 188 19568 3602 28473 26036 470 10417 4327 4284 10463 29534 4725 8396 12390 4484 29657 6212 18345 13920 2294 23761 1756 3847 9243 29115 2255 2009 24516 21815 10784 32159 254 25713 14932 8626 4880 12416...
output:
43843 43844 43845 43844 43845 43844 43843 43843 43843 43844 43844 43844 43845 43846 43846 43846 43846 43846 43845 43845 43845 43845 43844 43843 43842 43842 43843 43843 43844 43844 43845 43846 43846 43845 43845 43845 43845 43845 43845 43846 43845 43844 43844 43843 43844 43844 43844 43844 43845 43846 ...
result:
ok 100001 tokens
Test #100:
score: 20
Accepted
time: 285ms
memory: 69588kb
input:
100000 100000 31117 4043 256 21783 29960 26507 21852 27162 28851 9573 29069 19689 22079 31545 9439 1461 23038 6220 466 2411 29331 26896 5825 19812 19037 23156 21878 7393 17730 5849 1334 11379 13332 4496 17056 4109 25866 2909 13561 31909 9583 16706 19029 5467 19649 17579 11001 32700 15407 12683 14521...
output:
43712 43712 43712 43713 43712 43711 43710 43709 43709 43709 43709 43709 43709 43708 43708 43708 43707 43707 43707 43706 43707 43706 43707 43708 43709 43710 43709 43710 43710 43710 43710 43711 43711 43712 43712 43712 43713 43714 43713 43712 43712 43711 43711 43710 43711 43711 43711 43711 43710 43711 ...
result:
ok 100001 tokens
Subtask #6:
score: 20
Accepted
Test #101:
score: 20
Accepted
time: 659ms
memory: 47036kb
input:
200000 200000 1 2 1 1 2 1 1 1 2 1 2 2 2 1 2 1 1 2 2 2 1 2 2 2 2 1 2 1 1 1 1 2 1 2 2 1 2 2 2 2 1 1 1 2 1 1 1 2 2 1 1 1 2 1 1 2 1 1 2 2 1 1 2 2 2 1 1 1 1 1 1 2 1 1 2 1 2 2 1 2 2 2 1 2 2 1 2 2 1 1 1 1 1 2 2 2 1 1 2 2 1 1 1 2 2 1 1 2 2 2 2 2 2 1 2 1 1 2 2 2 1 1 1 2 1 2 1 1 1 1 1 2 1 1 2 2 1 1 2 2 1 2 1 ...
output:
99491 99491 99492 99493 99494 99493 99493 99493 99493 99493 99494 99494 99495 99495 99495 99494 99494 99493 99494 99494 99495 99495 99495 99494 99494 99494 99493 99492 99492 99492 99492 99492 99493 99493 99493 99492 99491 99491 99492 99491 99492 99492 99491 99491 99492 99492 99491 99490 99490 99490 ...
result:
ok 200001 tokens
Test #102:
score: 20
Accepted
time: 624ms
memory: 48048kb
input:
200000 200000 1 2 2 1 1 1 1 1 1 1 1 2 2 1 1 2 2 1 2 2 2 2 1 2 1 2 1 1 1 2 2 1 1 2 1 1 2 1 1 1 2 1 1 1 1 1 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 2 2 1 1 2 2 1 2 1 2 1 2 2 2 2 1 1 1 1 1 2 1 2 2 1 2 1 1 2 1 1 2 1 2 1 1 2 2 1 1 2 1 1 2 2 2 2 1 2 2 2 2 2 1 1 2 1 2 2 1 1 1 1 1 2 2 2 2 2 1 2 2 2 1 ...
output:
99886 99887 99887 99886 99886 99885 99886 99885 99885 99886 99885 99885 99885 99884 99885 99885 99885 99884 99885 99886 99886 99886 99885 99884 99885 99884 99883 99882 99883 99884 99884 99885 99886 99887 99887 99887 99888 99888 99889 99889 99889 99889 99889 99889 99889 99888 99888 99888 99889 99889 ...
result:
ok 200001 tokens
Test #103:
score: 20
Accepted
time: 741ms
memory: 51416kb
input:
200000 200000 3 1 2 2 4 4 4 3 4 3 1 1 3 4 1 3 2 2 4 3 2 4 3 4 4 4 1 2 3 3 2 3 1 1 4 3 1 2 1 3 4 4 1 4 3 4 2 2 4 3 4 1 4 4 1 1 2 4 2 1 1 4 2 2 2 2 4 3 3 4 2 4 4 4 1 3 4 2 3 3 1 1 3 2 4 1 4 4 3 1 3 2 3 2 3 3 4 1 2 2 4 1 1 3 4 2 1 4 3 2 2 2 4 4 3 2 2 1 1 2 3 3 2 1 3 4 2 3 4 4 3 2 3 3 2 1 1 4 2 2 3 4 4 ...
output:
99539 99539 99539 99539 99539 99539 99539 99540 99540 99539 99539 99538 99539 99540 99539 99540 99539 99540 99541 99541 99541 99542 99542 99542 99542 99542 99543 99543 99544 99543 99542 99542 99542 99542 99542 99541 99540 99539 99539 99539 99539 99539 99540 99540 99541 99541 99541 99541 99542 99543 ...
result:
ok 200001 tokens
Test #104:
score: 20
Accepted
time: 727ms
memory: 51552kb
input:
200000 200000 3 1 2 2 1 4 2 4 4 4 1 4 2 4 4 4 3 3 4 4 1 4 3 1 1 4 3 4 1 2 1 4 1 2 2 3 4 3 3 3 1 2 1 3 2 3 2 2 4 4 2 3 2 1 4 4 2 2 2 4 1 4 4 1 2 4 2 3 2 3 1 2 2 4 2 3 1 3 1 1 1 1 2 1 1 2 2 2 1 4 2 2 3 3 2 4 1 3 1 1 1 3 3 3 3 2 3 2 1 2 3 4 3 1 2 2 1 1 4 3 4 1 1 3 1 1 2 3 4 4 1 1 3 2 4 3 3 3 2 1 3 3 3 ...
output:
99577 99577 99576 99577 99576 99576 99577 99576 99577 99576 99577 99577 99577 99576 99576 99576 99576 99575 99574 99575 99574 99574 99573 99572 99573 99572 99571 99572 99572 99573 99573 99574 99575 99575 99575 99575 99576 99576 99576 99576 99576 99576 99577 99577 99576 99576 99576 99576 99576 99576 ...
result:
ok 200001 tokens
Test #105:
score: 20
Accepted
time: 792ms
memory: 57768kb
input:
200000 200000 5 1 8 4 3 8 8 7 4 8 6 3 3 2 7 4 6 5 3 3 3 7 1 1 2 2 7 6 8 2 5 5 4 8 7 5 5 2 3 8 6 2 7 3 6 7 8 5 4 2 6 6 1 1 4 3 5 2 5 2 3 7 4 6 7 3 8 6 6 5 4 8 8 5 5 2 4 1 1 6 7 2 5 5 1 1 7 3 3 3 1 3 1 5 2 4 6 2 6 3 8 2 5 3 7 1 7 4 6 6 3 6 5 1 6 4 1 5 3 3 7 6 3 6 4 1 4 7 8 5 4 4 8 8 6 1 4 7 1 8 8 3 6 ...
output:
99371 99371 99371 99372 99372 99373 99373 99374 99373 99373 99373 99373 99373 99372 99373 99372 99373 99373 99372 99372 99373 99373 99372 99371 99372 99372 99372 99371 99372 99372 99372 99373 99373 99373 99373 99372 99372 99372 99372 99373 99374 99373 99373 99373 99373 99372 99372 99372 99372 99373 ...
result:
ok 200001 tokens
Test #106:
score: 20
Accepted
time: 822ms
memory: 61804kb
input:
200000 200000 4 6 3 8 4 8 6 7 5 7 6 6 8 1 7 5 7 5 8 6 7 7 3 5 7 4 2 3 7 8 1 6 8 7 3 7 2 4 1 1 3 8 5 7 3 7 5 2 6 7 4 5 1 8 3 6 5 2 6 1 3 1 1 5 2 2 4 1 8 1 3 1 4 1 4 4 3 1 6 7 8 5 3 2 6 7 7 5 7 4 1 3 5 4 8 4 1 3 7 3 2 6 4 8 7 1 8 4 6 6 2 5 7 7 2 7 5 1 3 1 6 1 4 5 5 6 6 2 3 1 7 7 3 2 1 6 3 8 5 7 6 7 8 ...
output:
99283 99283 99283 99283 99283 99283 99284 99284 99284 99285 99284 99284 99285 99284 99284 99284 99283 99284 99285 99284 99285 99284 99284 99284 99284 99285 99285 99286 99286 99286 99285 99285 99286 99287 99288 99289 99288 99289 99289 99289 99290 99291 99290 99291 99291 99291 99291 99291 99290 99290 ...
result:
ok 200001 tokens
Test #107:
score: 20
Accepted
time: 906ms
memory: 66840kb
input:
200000 200000 15 13 5 5 9 4 11 9 6 16 11 14 9 11 9 9 14 5 14 4 12 5 10 3 9 13 8 11 12 14 15 2 15 5 12 4 10 2 9 7 14 7 8 14 4 8 14 12 1 16 4 14 2 12 15 5 15 15 15 11 6 4 5 15 5 8 2 16 11 14 4 13 15 5 10 2 15 8 10 11 12 3 11 4 14 6 16 5 1 15 9 1 5 4 1 2 7 3 10 2 4 3 9 2 13 4 1 15 7 5 9 13 16 8 9 1 8 1...
output:
99587 99588 99588 99587 99586 99586 99587 99587 99587 99588 99587 99587 99587 99586 99585 99585 99585 99584 99583 99584 99584 99584 99585 99585 99584 99584 99585 99584 99584 99584 99584 99585 99585 99584 99584 99584 99585 99586 99586 99586 99587 99588 99588 99589 99589 99589 99588 99589 99589 99588 ...
result:
ok 200001 tokens
Test #108:
score: 20
Accepted
time: 916ms
memory: 66736kb
input:
200000 200000 9 7 1 10 4 14 3 7 5 1 11 12 12 5 8 11 8 2 3 10 3 16 11 9 11 1 13 12 7 15 2 16 6 6 9 6 12 10 13 14 15 2 8 2 1 6 16 13 12 5 15 5 5 3 15 13 1 14 10 4 5 8 3 16 8 3 12 15 15 14 11 15 16 1 10 11 12 8 8 10 11 1 1 15 14 5 3 15 16 2 6 13 8 8 13 3 5 8 1 10 12 10 12 8 12 6 16 14 6 13 15 8 5 1 12 ...
output:
99375 99374 99375 99374 99374 99373 99372 99371 99371 99372 99372 99373 99372 99371 99372 99372 99373 99373 99374 99374 99373 99374 99373 99373 99374 99374 99374 99373 99373 99374 99374 99375 99376 99377 99378 99378 99377 99377 99377 99378 99379 99378 99379 99380 99380 99380 99381 99381 99382 99381 ...
result:
ok 200001 tokens
Test #109:
score: 20
Accepted
time: 952ms
memory: 78228kb
input:
200000 200000 13 20 21 26 23 31 23 7 4 30 9 15 1 3 8 29 29 3 7 21 26 10 32 30 4 4 16 24 17 13 9 32 9 21 6 6 23 8 28 1 5 31 10 14 12 21 4 2 11 24 12 21 22 28 24 8 13 32 30 4 29 16 29 21 24 19 31 10 20 6 19 20 13 31 1 10 6 10 32 18 10 22 14 10 12 4 24 6 10 3 4 28 4 31 9 27 30 18 5 4 10 7 26 5 17 28 25...
output:
99085 99085 99086 99086 99085 99084 99083 99084 99084 99084 99084 99085 99086 99086 99087 99086 99087 99088 99088 99087 99087 99088 99087 99087 99087 99086 99085 99084 99084 99085 99086 99085 99084 99083 99083 99082 99083 99082 99082 99082 99082 99082 99083 99083 99082 99083 99083 99083 99084 99084 ...
result:
ok 200001 tokens
Test #110:
score: 20
Accepted
time: 985ms
memory: 76168kb
input:
200000 200000 9 28 26 16 12 5 18 11 16 11 25 30 12 19 2 14 26 4 12 30 21 9 17 26 14 22 18 2 32 23 18 4 31 3 12 17 7 6 27 26 29 12 17 23 7 5 15 8 12 31 12 4 8 14 30 26 18 3 18 4 24 16 9 18 7 15 8 29 22 17 1 22 3 25 24 4 15 20 11 21 1 11 6 10 28 20 29 7 1 11 32 11 23 6 26 2 30 3 13 17 11 32 14 12 12 2...
output:
99007 99007 99006 99006 99006 99006 99006 99005 99005 99006 99006 99006 99005 99005 99004 99004 99004 99004 99003 99003 99003 99003 99003 99003 99004 99003 99004 99003 99004 99005 99005 99004 99004 99003 99004 99004 99003 99002 99002 99002 99001 99001 99001 99002 99002 99001 99002 99002 99001 99002 ...
result:
ok 200001 tokens
Test #111:
score: 20
Accepted
time: 1049ms
memory: 89568kb
input:
200000 200000 13 49 31 11 61 16 3 9 35 20 55 62 26 49 23 54 30 27 30 41 21 15 17 38 23 62 63 15 55 40 40 40 13 40 59 32 42 17 43 11 13 18 40 60 14 40 22 19 14 30 21 41 48 26 10 31 26 48 27 42 28 1 64 55 33 51 8 54 47 11 33 63 55 2 58 4 35 45 38 55 59 10 62 39 38 59 57 31 31 56 53 41 63 7 54 53 6 60 ...
output:
98890 98890 98891 98891 98891 98890 98890 98890 98890 98890 98889 98888 98887 98887 98887 98888 98888 98888 98888 98888 98887 98886 98885 98886 98886 98886 98886 98886 98886 98887 98886 98886 98887 98886 98885 98885 98886 98886 98885 98885 98886 98886 98886 98885 98885 98886 98887 98887 98887 98888 ...
result:
ok 200001 tokens
Test #112:
score: 20
Accepted
time: 1056ms
memory: 90252kb
input:
200000 200000 52 16 1 62 38 35 56 11 51 29 2 22 41 4 25 22 40 5 23 55 37 20 41 6 46 62 7 16 7 9 50 21 37 29 56 9 52 30 10 60 47 41 29 36 33 37 50 11 31 15 63 48 10 44 1 64 54 15 46 39 14 41 23 12 27 39 44 36 60 36 43 12 40 45 43 44 49 45 42 58 20 39 31 37 30 13 29 61 9 2 22 35 14 56 41 26 59 14 44 6...
output:
98499 98499 98498 98497 98498 98497 98497 98498 98498 98499 98500 98501 98500 98500 98500 98500 98500 98501 98501 98500 98501 98501 98502 98501 98501 98501 98502 98501 98500 98499 98500 98499 98499 98499 98499 98500 98500 98500 98500 98501 98502 98502 98503 98503 98503 98503 98503 98503 98504 98504 ...
result:
ok 200001 tokens
Test #113:
score: 20
Accepted
time: 1139ms
memory: 99668kb
input:
200000 200000 67 25 75 53 64 87 60 49 104 124 116 42 109 88 81 53 10 101 45 109 17 94 27 115 121 31 123 70 96 14 80 89 128 21 67 81 111 56 126 48 51 103 19 49 14 15 62 107 41 49 23 71 61 69 5 12 20 78 82 64 14 55 67 20 54 87 94 19 45 104 31 101 44 17 48 114 31 123 74 70 64 76 52 11 50 96 95 71 57 1 ...
output:
98246 98245 98245 98245 98246 98245 98245 98244 98243 98243 98242 98242 98242 98242 98241 98242 98242 98241 98242 98242 98241 98241 98241 98241 98242 98242 98242 98242 98242 98241 98240 98241 98240 98240 98240 98240 98239 98238 98237 98238 98239 98239 98238 98238 98239 98240 98239 98240 98240 98241 ...
result:
ok 200001 tokens
Test #114:
score: 20
Accepted
time: 1145ms
memory: 99500kb
input:
200000 200000 9 24 125 49 46 52 74 11 50 112 2 10 119 100 88 78 77 35 108 84 88 60 120 64 125 71 99 128 101 5 10 35 112 76 76 3 38 70 126 22 122 39 113 73 96 46 22 23 20 120 126 108 125 47 80 57 48 34 121 33 66 45 113 42 128 85 29 126 126 44 93 96 93 91 110 81 16 53 119 74 22 55 107 98 126 121 34 77...
output:
98286 98285 98285 98285 98286 98287 98287 98288 98288 98289 98288 98288 98288 98288 98288 98287 98286 98286 98285 98285 98285 98284 98284 98285 98284 98284 98284 98284 98283 98283 98283 98283 98284 98283 98284 98284 98284 98285 98285 98284 98283 98283 98284 98283 98283 98282 98283 98283 98282 98283 ...
result:
ok 200001 tokens
Test #115:
score: 20
Accepted
time: 1167ms
memory: 113704kb
input:
200000 200000 250 181 222 222 191 157 2 100 130 172 37 5 158 160 122 243 229 177 135 84 18 111 1 105 234 209 231 73 220 117 229 80 56 222 63 72 113 180 244 254 164 251 254 58 213 126 95 132 208 72 219 102 227 126 172 74 11 192 24 33 255 48 183 25 17 175 91 145 236 58 20 190 233 168 42 232 43 227 92 ...
output:
97629 97630 97630 97629 97629 97629 97629 97629 97629 97629 97629 97630 97630 97631 97631 97632 97632 97631 97631 97631 97632 97632 97633 97632 97632 97632 97632 97632 97632 97632 97633 97633 97633 97634 97635 97635 97635 97634 97635 97634 97633 97634 97634 97634 97635 97636 97635 97634 97633 97634 ...
result:
ok 200001 tokens
Test #116:
score: 20
Accepted
time: 1202ms
memory: 110644kb
input:
200000 200000 200 112 179 195 90 171 141 201 252 250 1 235 135 180 3 10 73 201 97 20 15 251 71 194 81 29 47 231 140 98 185 214 218 166 229 221 200 108 72 94 233 14 10 58 4 204 65 20 181 123 61 207 197 151 233 42 196 112 165 224 121 91 161 120 14 237 14 86 27 251 133 48 178 105 92 165 216 25 164 9 21...
output:
97841 97841 97841 97841 97841 97840 97840 97839 97840 97839 97839 97839 97838 97839 97838 97838 97838 97837 97837 97838 97839 97838 97839 97840 97841 97842 97842 97841 97841 97841 97840 97841 97842 97842 97842 97842 97843 97844 97843 97843 97843 97842 97843 97844 97844 97843 97843 97844 97843 97843 ...
result:
ok 200001 tokens
Test #117:
score: 20
Accepted
time: 1245ms
memory: 119516kb
input:
200000 200000 129 365 50 88 276 235 83 42 105 124 101 402 494 496 464 150 130 107 333 303 469 439 36 40 42 48 274 120 385 38 443 235 401 392 508 305 357 189 456 512 56 82 343 82 336 448 309 293 169 483 101 455 335 269 364 336 241 433 457 453 150 72 244 241 469 74 248 37 134 133 226 97 167 217 25 325...
output:
97036 97036 97035 97034 97034 97034 97034 97034 97033 97033 97034 97035 97036 97035 97035 97034 97033 97034 97034 97035 97036 97037 97037 97038 97039 97039 97040 97040 97039 97038 97037 97038 97038 97039 97040 97040 97039 97038 97037 97037 97037 97037 97038 97037 97037 97038 97037 97037 97036 97035 ...
result:
ok 200001 tokens
Test #118:
score: 20
Accepted
time: 1212ms
memory: 122548kb
input:
200000 200000 423 61 79 9 474 146 188 320 334 481 110 167 122 146 11 82 65 26 349 120 480 417 97 350 139 19 198 183 95 343 207 175 175 402 100 460 489 229 332 296 90 117 334 106 349 331 446 363 512 92 52 105 116 27 121 498 123 141 457 283 411 136 220 256 94 145 88 200 193 111 56 421 152 194 121 237 ...
output:
96891 96892 96893 96894 96895 96895 96896 96896 96895 96895 96896 96896 96896 96897 96898 96899 96899 96900 96900 96901 96901 96901 96900 96901 96901 96900 96901 96902 96902 96903 96903 96903 96903 96902 96903 96903 96903 96903 96903 96902 96903 96903 96903 96903 96902 96902 96902 96901 96900 96901 ...
result:
ok 200001 tokens
Test #119:
score: 20
Accepted
time: 1262ms
memory: 130940kb
input:
200000 200000 297 291 653 353 40 218 753 11 227 667 262 582 926 531 722 598 447 429 131 18 473 619 800 559 519 783 409 228 989 927 727 383 250 410 490 603 615 289 853 364 810 61 697 679 255 424 552 33 911 663 435 525 274 1003 1020 687 19 694 61 797 171 318 256 919 294 971 345 838 890 289 618 218 872...
output:
95720 95719 95719 95720 95719 95719 95719 95718 95717 95717 95717 95716 95716 95716 95717 95717 95718 95717 95717 95717 95718 95718 95717 95718 95717 95717 95718 95718 95717 95718 95719 95719 95720 95719 95720 95721 95720 95720 95719 95719 95720 95721 95721 95721 95721 95721 95720 95720 95720 95719 ...
result:
ok 200001 tokens
Test #120:
score: 20
Accepted
time: 1281ms
memory: 132964kb
input:
200000 200000 11 748 742 423 217 9 744 446 733 424 698 222 504 62 776 846 191 432 1023 441 946 763 276 478 260 57 1005 829 187 511 652 946 555 95 694 684 625 46 670 753 300 827 460 389 297 305 195 845 235 346 275 993 618 497 73 770 137 86 969 873 744 668 545 253 897 672 1009 429 861 386 475 498 378 ...
output:
95495 95494 95494 95493 95493 95493 95492 95491 95491 95491 95490 95491 95491 95491 95492 95492 95492 95492 95493 95494 95494 95493 95493 95492 95491 95491 95490 95490 95491 95491 95492 95491 95492 95493 95493 95494 95493 95493 95494 95494 95495 95494 95493 95493 95494 95495 95494 95494 95493 95493 ...
result:
ok 200001 tokens
Test #121:
score: 20
Accepted
time: 1253ms
memory: 137688kb
input:
200000 200000 685 183 1433 1356 1502 1016 1091 616 208 1819 1294 909 966 1943 595 593 1621 2007 1383 1886 418 632 75 1546 606 408 308 1315 1103 43 1343 1490 382 858 348 200 1031 1469 268 1232 1878 1525 225 1184 1673 142 1711 1767 4 758 1911 28 1917 1036 876 1927 861 1133 1169 1880 744 185 1710 691 1...
output:
94331 94330 94329 94328 94329 94328 94328 94328 94328 94327 94327 94327 94328 94327 94327 94326 94326 94327 94328 94328 94329 94328 94327 94328 94329 94329 94328 94327 94327 94327 94327 94328 94328 94327 94327 94328 94328 94328 94327 94326 94326 94326 94326 94325 94325 94324 94324 94323 94323 94322 ...
result:
ok 200001 tokens
Test #122:
score: 20
Accepted
time: 1208ms
memory: 138684kb
input:
200000 200000 1938 873 173 432 1117 1779 1373 618 1365 638 1444 825 1323 483 1616 566 1198 872 1911 607 299 780 435 1761 1175 444 1120 509 572 242 1589 1470 1894 1840 1174 1822 658 1266 843 2004 1662 915 1199 1268 1723 1640 118 1099 1462 447 1934 1822 259 1019 496 1413 2031 1622 341 1714 197 523 149...
output:
94285 94285 94285 94285 94285 94284 94284 94284 94283 94283 94282 94282 94282 94282 94282 94282 94282 94282 94281 94280 94281 94281 94281 94280 94279 94278 94278 94279 94279 94279 94279 94279 94280 94281 94280 94279 94279 94279 94279 94279 94279 94279 94279 94279 94279 94279 94279 94279 94278 94278 ...
result:
ok 200001 tokens
Test #123:
score: 20
Accepted
time: 1170ms
memory: 142368kb
input:
200000 200000 2799 2562 102 3634 3708 756 3584 3051 3901 2706 1140 2495 3960 1825 2863 3577 3937 999 2840 2216 3427 588 819 2498 2664 1103 4032 1269 2869 2855 382 2117 8 3437 2167 3706 3952 2288 1547 1942 104 3242 475 722 3991 3439 2895 4071 2243 650 1076 379 2825 3141 1793 3641 2206 2899 2177 3550 ...
output:
92699 92699 92698 92698 92697 92697 92697 92696 92696 92697 92697 92697 92697 92697 92698 92698 92698 92698 92698 92699 92700 92700 92699 92699 92699 92699 92699 92699 92699 92699 92699 92698 92698 92698 92698 92697 92698 92697 92697 92696 92697 92697 92698 92697 92697 92697 92697 92698 92699 92699 ...
result:
ok 200001 tokens
Test #124:
score: 20
Accepted
time: 1155ms
memory: 143504kb
input:
200000 200000 3751 172 466 2336 3863 1887 3935 4050 3635 3398 3005 993 2078 2774 671 63 123 685 3419 834 630 2926 723 1694 3378 1238 2144 2937 2681 642 137 2138 2185 2301 2920 1554 608 2458 3064 2531 2453 1835 3972 1182 1561 203 1281 3803 153 4091 275 3689 1671 2685 107 2663 1127 2227 38 4060 233 82...
output:
92604 92604 92604 92604 92603 92602 92603 92602 92603 92603 92602 92601 92601 92600 92600 92600 92599 92599 92599 92598 92597 92597 92597 92596 92596 92596 92595 92594 92595 92594 92595 92595 92595 92595 92595 92596 92596 92596 92595 92595 92595 92595 92594 92594 92593 92593 92594 92593 92592 92592 ...
result:
ok 200001 tokens
Test #125:
score: 20
Accepted
time: 1085ms
memory: 147080kb
input:
200000 200000 1301 1448 1613 569 2892 791 667 5388 5026 1842 2714 4095 8009 6581 7018 2535 3855 7801 1108 8153 716 440 2270 5866 1419 4121 3080 6279 4082 834 7473 2408 41 2403 3283 6263 3933 1259 7372 1330 421 3491 6382 806 2687 5514 2977 2501 875 6300 3640 1063 3338 6365 1266 7273 4678 130 7656 489...
output:
90486 90486 90486 90487 90488 90488 90489 90489 90490 90489 90490 90491 90491 90492 90492 90491 90490 90489 90488 90488 90487 90487 90487 90487 90488 90488 90487 90487 90488 90487 90486 90485 90485 90486 90487 90486 90486 90486 90486 90486 90485 90485 90485 90485 90485 90486 90485 90486 90487 90486 ...
result:
ok 200001 tokens
Test #126:
score: 20
Accepted
time: 1103ms
memory: 146100kb
input:
200000 200000 3269 1639 53 3807 288 695 3674 6803 2258 5502 4452 812 1168 3792 2815 4587 7940 2586 5195 5471 1738 3088 492 6264 7930 6647 1598 1593 6583 4231 5109 5477 2430 5717 1732 7538 5845 1985 1420 3476 6606 3798 4724 5474 7874 4825 776 2170 828 3484 1279 8022 2773 4613 7499 5924 6621 2615 7512...
output:
90579 90580 90580 90581 90581 90580 90580 90581 90582 90582 90583 90584 90584 90583 90582 90581 90581 90580 90580 90579 90580 90580 90580 90580 90581 90582 90581 90581 90580 90580 90579 90580 90580 90580 90579 90579 90579 90580 90581 90582 90581 90580 90579 90580 90581 90581 90582 90581 90581 90582 ...
result:
ok 200001 tokens
Test #127:
score: 20
Accepted
time: 954ms
memory: 139912kb
input:
200000 200000 6125 15133 4913 3467 12883 3835 2871 3100 10396 2483 13347 13619 12552 6604 491 3083 10996 4016 10255 7525 1483 11764 10446 5669 2847 5430 902 5521 2667 6084 1252 4648 14420 5642 9439 13122 6696 2068 11225 10787 4767 50 5710 14139 16331 2150 13132 8226 5052 12741 4136 12796 11126 5987 ...
output:
88461 88460 88459 88458 88459 88459 88458 88458 88458 88457 88456 88455 88454 88454 88454 88455 88454 88455 88454 88455 88454 88454 88454 88455 88456 88457 88457 88457 88458 88458 88458 88458 88458 88459 88458 88457 88457 88456 88456 88456 88456 88455 88455 88455 88456 88456 88455 88455 88455 88456 ...
result:
ok 200001 tokens
Test #128:
score: 20
Accepted
time: 965ms
memory: 142000kb
input:
200000 200000 7476 12868 253 11571 663 4368 14423 11466 15219 7503 4138 10395 9785 11798 1028 3355 1699 1411 1543 1356 15335 2003 3132 15611 6600 4800 5921 7075 4186 7082 1906 14728 9721 6632 7974 14160 8946 4754 11755 3503 2990 1520 14339 11339 4974 8797 697 10223 10220 6762 1203 6304 14524 6923 73...
output:
88652 88652 88653 88652 88652 88652 88651 88651 88652 88652 88651 88650 88651 88651 88652 88653 88654 88654 88654 88654 88653 88654 88655 88656 88656 88657 88658 88657 88658 88657 88657 88657 88658 88659 88660 88660 88659 88659 88658 88659 88659 88659 88659 88659 88659 88658 88657 88657 88656 88656 ...
result:
ok 200001 tokens
Test #129:
score: 20
Accepted
time: 797ms
memory: 130952kb
input:
200000 200000 21682 7941 14220 2211 1361 6143 6865 8284 17683 8592 10947 13649 668 15216 4090 12920 2781 32465 4374 895 27167 7315 5128 24142 18728 3185 25316 5973 32380 17469 6643 24334 16539 18660 21055 20526 17858 23389 23040 3987 790 29678 25534 19729 15572 25231 12702 17002 26983 21487 29830 52...
output:
87194 87195 87194 87193 87194 87195 87195 87194 87193 87193 87193 87194 87193 87193 87194 87194 87194 87195 87196 87196 87196 87197 87197 87198 87199 87200 87201 87200 87200 87199 87199 87198 87197 87197 87197 87197 87197 87196 87195 87196 87197 87196 87196 87196 87196 87196 87197 87197 87197 87198 ...
result:
ok 200001 tokens
Test #130:
score: 20
Accepted
time: 791ms
memory: 132648kb
input:
200000 200000 4796 29942 5120 22792 16000 28318 4774 22973 23072 26568 17147 20569 21459 3414 28239 16851 20923 21108 9843 5394 13194 560 31905 29009 26837 23060 29374 32565 31239 32396 28205 20385 1940 2143 25040 16775 26208 4279 19332 24548 21800 16084 17691 8329 28085 19825 15311 24876 16009 815 ...
output:
87317 87317 87316 87316 87316 87316 87315 87314 87314 87314 87314 87314 87313 87312 87312 87311 87311 87311 87312 87313 87312 87312 87311 87310 87311 87310 87310 87311 87311 87310 87310 87310 87309 87308 87308 87308 87309 87309 87309 87308 87308 87308 87308 87307 87306 87306 87306 87306 87306 87305 ...
result:
ok 200001 tokens