QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#666184 | #7684. Sweet Sugar | treasuresgc | AC ✓ | 410ms | 106436kb | C++23 | 1.7kb | 2024-10-22 17:00:29 | 2024-10-22 17:00:44 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
inline int read()
{
int sum=0,f=1;
char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f*=-1;ch=getchar();}
while(isdigit(ch)){sum=sum*10+ch-48;ch=getchar();}
return sum*f;
}
int K;
int f[1000005][2];
int g[1000005];
int d[1000005];
vector<int> vec[1000005];
inline void firm(int u)
{
if(f[u][K&1] >= K)
{
g[u]++;
f[u][0]=f[u][1]=-2;
}
}
inline void trans(int u,int v)
{
// cout<<u<<" "<<v<<endl;
// cout<<g[u]<<" "<<g[v]<<endl;
// cout<<f[u][0]<<" "<<f[u][1]<<" "<<f[v][0]<<" "<<f[v][1]<<endl;
// system("pause");
g[u]+=g[v];
int u0=f[u][0];
int u1=f[u][1];
if(f[u][0]>=-1)
{
if(u0>=0&&f[v][0]>=0) f[u][0]=max(f[u][0],u0+f[v][0]);
if(u1>=0&&f[v][1]>=0) f[u][0]=max(f[u][0],u1+f[v][1]);
}
if(f[u][1]>=-1)
{
if(u1>=0&&f[v][0]>=0) f[u][1]=max(f[u][1],u1+f[v][0]);
if(u0>=0&&f[v][1]>=0) f[u][1]=max(f[u][1],u0+f[v][1]);
}
firm(u);
}
void dfs(int now,int las)
{
for(int i=0;i<vec[now].size();i++)
{
int to=vec[now][i];
if(to==las)continue;
dfs(to,now);
}
f[now][d[now]&1]=d[now];
f[now][(d[now]&1)^1]=-1;
firm(now);
for(int i=0;i<vec[now].size();i++)
{
int to=vec[now][i];
if(to==las)continue;
trans(now,to);
}
// cout<<g[now]<<" "<<f[now][1]<<" "<<f[now][0]<<endl;
}
inline void solve()
{
int n;
n=read(),K=read();
for(int i=1;i<=n;i++) vec[i].clear();
for(int i=1;i<=n;i++) f[i][0]=f[i][1]=g[i]=0;
for(int i=1;i<=n;i++) d[i]=read();
for(int i=1;i<n;i++)
{
int u,v;
u=read(),v=read();
vec[u].push_back(v);
vec[v].push_back(u);
}
dfs(1,0);
cout<<g[1]<<endl;
}
signed main()
{
int T;
T=read();
while(T--) solve();
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 9752kb
input:
4 7 5 1 2 1 2 2 1 2 1 2 2 3 3 4 3 5 5 6 5 7 2 2 1 0 1 2 1 1 1 1 2 1
output:
2 0 1 0
result:
ok 4 number(s): "2 0 1 0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 9812kb
input:
12 1 1 0 1 1 1 1 1 2 1 2 0 1 2 1 1 2 2 1 3 0 1 3 1 1 3 2 1 2000000 0 1 2000000 1 1 2000000 2
output:
0 1 0 0 0 1 0 0 0 0 0 0
result:
ok 12 numbers
Test #3:
score: 0
Accepted
time: 84ms
memory: 9744kb
input:
200000 5 2 1 1 0 0 1 2 4 5 2 4 1 3 2 5 1 0 0 0 0 0 5 1 1 2 3 2 5 4 5 3 1 0 0 0 1 1 4 4 2 3 4 5 2 5 9 1 0 0 0 2 4 3 2 1 3 1 5 1 5 3 0 1 1 0 1 5 4 2 1 4 3 5 1 5 1 0 2 1 1 1 5 3 2 4 3 4 1 4 5 1 1 0 1 1 0 1 5 4 2 1 3 5 2 5 7 0 2 1 1 2 5 1 2 3 2 5 5 4 5 5 0 1 0 1 0 2 4 4 3 5 2 1 5 5 1 0 0 1 0 1 4 1 4 5 2...
output:
1 0 0 0 1 3 3 0 0 2 0 0 2 1 0 0 1 1 0 2 0 1 0 2 1 0 0 0 0 0 1 2 0 0 2 2 0 1 0 0 0 0 3 3 0 0 1 1 2 1 2 0 4 0 1 1 0 1 0 0 1 5 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 3 1 0 1 0 0 4 0 0 0 1 1 0 0 1 0 2 0 5 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1 2 0 1 2 0 0 2 0 0 1 0 0 0 0 0 ...
result:
ok 200000 numbers
Test #4:
score: 0
Accepted
time: 56ms
memory: 9704kb
input:
100000 10 16 0 1 0 1 0 1 1 0 1 1 4 10 3 10 9 1 4 7 5 2 9 5 6 9 2 3 8 4 10 18 1 0 0 1 0 0 1 1 0 2 5 1 4 2 5 3 3 4 2 10 4 9 3 8 7 3 6 5 10 13 0 1 0 1 0 1 1 0 1 1 5 2 4 3 1 6 8 9 1 8 3 5 9 4 7 6 3 10 10 16 1 0 1 0 1 1 1 0 1 1 6 8 2 4 9 6 2 6 4 10 5 3 1 6 8 7 3 6 10 13 0 0 0 0 1 0 1 0 1 0 2 1 2 7 7 9 7 ...
output:
0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0 0 0 0 0 2 1 2 1 0 2 0 0 1 0 0 2 5 1 0 2 1 0 0 1 0 0 1 1 0 1 0 1 7 0 1 1 0 0 1 1 8 1 0 1 1 1 1 0 1 1 4 0 1 0 0 0 3 0 0 2 1 10 1 1 0 2 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 7 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 5 0 6 1 2 0 1 0 0 0 0 4 1 0 0 0 7 0...
result:
ok 100000 numbers
Test #5:
score: 0
Accepted
time: 59ms
memory: 9752kb
input:
50000 20 37 2 1 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 3 17 14 8 8 16 18 4 14 20 7 10 10 6 2 10 13 11 5 3 6 5 6 13 11 18 1 6 12 9 9 8 15 16 19 5 9 5 20 13 0 0 0 0 1 2 1 1 0 1 0 0 0 0 0 0 1 0 0 1 17 2 3 5 11 13 12 14 13 2 19 3 1 7 12 15 6 10 17 8 20 7 1 3 3 6 13 15 16 6 3 9 9 4 13 18 3 2 20 13 0 0 0 2 0...
output:
0 0 0 0 0 0 0 0 5 1 0 1 17 3 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 1 0 2 3 0 1 2 1 1 0 1 1 0 0 2 0 2 0 1 1 5 1 0 1 0 15 2 3 1 0 1 2 1 1 1 2 0 1 1 1 1 1 18 1 1 2 1 2 4 0 2 1 5 0 1 0 1 1 9 0 0 0 0 1 0 8 0 0 0 1 0 3 0 0 3 1 0 0 0 1 0 0 1 0 5 0 0 0 0 0 0 0 9 0 1 0 3 0 0 0 0 0 0 3 1 1 1 1 0 2 1...
result:
ok 50000 numbers
Test #6:
score: 0
Accepted
time: 67ms
memory: 9824kb
input:
20000 50 81 1 0 1 0 0 1 0 2 1 1 0 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 45 6 43 7 29 38 3 27 42 50 27 32 50 24 41 6 12 32 17 18 6 31 44 5 2 9 2 32 28 26 2 20 40 47 34 27 16 43 4 23 36 43 9 13 19 47 4 50 25 48 37 19 49 22 42 11 46 25 1 15 10 16 8 23 6 39 30 8 2...
output:
0 3 0 0 0 0 23 0 0 0 0 0 1 0 0 1 1 0 0 0 8 0 2 4 0 6 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 3 1 1 1 1 3 0 0 1 2 1 1 3 1 1 1 1 0 5 1 0 0 0 1 2 1 7 4 3 2 1 0 1 0 1 0 3 1 3 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 11 0 0 1 0 0 17 3 0 4 2 0 0 2 1 2 0 0 3 1 0 0 0 0 1 0 2 0 0 2 0 0 2 1 1 1 7...
result:
ok 20000 numbers
Test #7:
score: 0
Accepted
time: 65ms
memory: 10104kb
input:
2000 500 895 1 2 0 0 1 0 1 1 0 0 0 0 1 1 0 0 1 0 1 0 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 0 0 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 2 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1...
output:
0 0 6 0 0 1 0 0 1 0 1 0 35 0 0 1 0 0 0 1 0 0 1 1 4 5 0 0 0 0 0 1 0 0 0 0 3 0 0 0 0 134 0 0 3 1 12 6 9 9 1 0 0 2 2 0 1 3 0 4 11 0 1 26 0 0 3 0 2 1 0 3 5 2 3 0 1 1 12 1 1 2 36 15 1 1 0 0 2 1 1 4 1 2 0 1 0 1 1 3 0 2 0 2 0 0 0 0 0 2 1 0 0 3 3 4 0 0 0 1 0 0 0 0 0 2 0 2 1 0 0 0 0 0 0 0 0 0 2 1 4 0 1 2 9 2...
result:
ok 2000 numbers
Test #8:
score: 0
Accepted
time: 66ms
memory: 11556kb
input:
200 5000 3054 2 1 0 1 2 2 1 2 2 2 2 2 2 2 0 2 2 0 0 2 1 0 2 0 2 2 2 2 2 0 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 0 1 0 0 2 0 2 0 2 2 2 2 2 2 2 2 2 2 0 2 2 1 0 2 2 2 1 2 2 1 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 0 2 1 2 2 2 2 2 2 2 0 1 1 2 1 1 1 2 2 2 2 0 2 2 2 2 1 0 2 2 2 2 2 ...
output:
2 1 5 14 0 1 3 1 2 1 1 1 1 1 4 0 54 1 0 1 10 1 0 1 0 2 3 4 0 1 1 0 0 3 1 3 0 0 0 0 0 0 0 4 1 0 0 1 0 0 10 1 0 7 1 0 0 3 8 1 2 2 1 1 1 6 0 29 3 1 4 10 5 1 1 1 1 2 0 0 0 33 1 1 18 1 0 1 0 11 0 1 0 0 0 0 1 1 0 20 3 0 3 2 2 1 1 1 14 4 1 10 1 1 1 3 2 4 0 0 1 0 4 0 30 1 0 0 1 1 1 0 0 12 0 0 0 0 13 2 0 1 1...
result:
ok 200 numbers
Test #9:
score: 0
Accepted
time: 118ms
memory: 18484kb
input:
20 50000 24898 2 2 2 2 2 1 1 2 0 1 0 0 0 2 0 2 1 2 2 2 1 1 1 1 2 2 1 1 2 2 2 2 2 0 0 2 2 2 0 2 2 0 2 1 0 2 1 0 0 1 0 1 0 2 2 2 0 0 0 2 2 2 2 0 2 1 2 2 0 0 1 1 2 0 2 1 2 0 2 2 2 1 1 2 1 2 1 2 1 1 2 2 0 0 1 1 1 0 2 2 1 1 0 0 0 2 2 1 2 1 2 1 1 2 1 1 1 2 1 2 2 0 1 2 1 1 2 0 1 2 0 0 1 1 2 1 0 2 2 2 0 2 0...
output:
2 0 5 100 13 19 0 1 0 1 0 1 3 1 0 0 1 8 0 1
result:
ok 20 numbers
Test #10:
score: 0
Accepted
time: 383ms
memory: 105376kb
input:
1 1000000 3 1 1 2 0 2 1 2 2 1 0 0 1 0 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 0 1 2 1 2 2 1 2 0 2 2 0 1 2 0 2 1 2 0 2 2 1 0 2 2 2 2 0 2 0 2 0 0 0 2 0 0 0 2 2 0 2 0 1 0 0 0 1 2 1 2 2 2 1 0 1 0 1 2 2 2 2 0 1 1 0 2 2 2 1 1 2 2 0 1 0 1 2 1 2 0 0 1 2 0 2 0 2 0 2 2 2 0 1 0 2 2 1 2 0 2 0 2 1 2 0 1 2 1 1 ...
output:
206384
result:
ok 1 number(s): "206384"
Test #11:
score: 0
Accepted
time: 351ms
memory: 94484kb
input:
1 1000000 50 1 2 0 2 0 0 0 1 2 1 2 1 1 0 2 0 0 1 2 1 2 2 2 0 0 2 2 2 2 1 2 2 1 1 1 2 2 1 0 0 2 1 1 1 0 0 2 2 0 2 0 2 1 2 0 0 2 2 2 0 0 1 0 2 1 1 1 1 0 2 2 2 0 2 0 2 2 0 0 0 2 0 2 2 0 2 0 0 2 0 0 1 0 1 2 1 2 2 2 2 2 2 1 1 0 2 0 2 2 1 2 2 2 0 2 2 2 1 2 1 2 0 0 1 1 2 0 1 1 2 1 2 2 0 0 0 0 1 1 2 1 1 2 1...
output:
22653
result:
ok 1 number(s): "22653"
Test #12:
score: 0
Accepted
time: 374ms
memory: 104264kb
input:
1 1000000 51 1 1 2 0 0 2 2 1 2 0 0 1 2 0 0 0 0 2 1 1 2 2 2 2 2 0 1 1 1 0 2 1 1 1 0 2 2 2 0 0 2 1 2 2 2 1 0 2 1 1 0 2 2 1 2 1 1 0 0 2 2 1 0 1 1 1 2 2 0 1 2 2 1 0 1 0 2 2 2 1 2 2 0 2 0 0 1 1 1 1 2 2 1 2 2 2 1 2 2 1 0 0 2 1 2 2 2 0 2 2 2 1 1 2 0 2 2 2 1 0 1 1 2 1 0 0 1 0 0 0 2 2 1 2 2 1 0 0 1 0 2 2 1 1...
output:
22240
result:
ok 1 number(s): "22240"
Test #13:
score: 0
Accepted
time: 373ms
memory: 97048kb
input:
1 1000000 233 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
4027
result:
ok 1 number(s): "4027"
Test #14:
score: 0
Accepted
time: 380ms
memory: 93812kb
input:
1 1000000 233 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0
result:
ok 1 number(s): "0"
Test #15:
score: 0
Accepted
time: 373ms
memory: 93612kb
input:
1 1000000 233 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 0 2 1 2 2 0 2 2 2 2 1 0 2 2 2 2 2 1 2 2 2 2 1 2 1 0 1 2 2 2 1 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 0 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 0 2 2 2 2 0 2 2 2 0 0 2 2 2 1 2 2 2 2 2 2 2 2 1 0 2 2 2 2 1 2 1 2 2 2 2 0 2 2 2 0 2 2 2 ...
output:
6671
result:
ok 1 number(s): "6671"
Test #16:
score: 0
Accepted
time: 359ms
memory: 106248kb
input:
1 1000000 233 1 0 2 1 1 0 0 1 1 0 2 2 0 2 0 0 1 2 2 0 2 1 0 0 0 2 2 2 0 0 2 2 2 1 2 0 1 1 2 2 2 0 1 2 2 0 2 2 0 1 0 2 1 0 2 2 1 1 2 1 1 1 2 2 0 2 2 2 2 2 2 2 1 0 0 1 2 1 2 0 2 2 0 2 2 2 1 2 2 2 2 2 2 2 2 2 0 1 2 2 0 1 1 1 0 0 2 2 1 0 0 2 2 1 2 1 0 1 2 2 1 0 1 2 2 1 1 2 1 0 1 2 2 0 1 0 2 2 2 1 0 0 2 ...
output:
4979
result:
ok 1 number(s): "4979"
Test #17:
score: 0
Accepted
time: 389ms
memory: 106280kb
input:
1 1000000 233 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 1 1 2 2 1 0 2 0 1 0 1 1 0 0 1 0 0 1 1 0 1 1 1 0 1 1 0 2 0 0 0 1 1 0 0 2 2 1 1 1 0 1 0 0 2 0 0 0 1 1 2 1 0 1 0 1 1 0 2 1 1 2 1 1 0 0 1 2 2 0 1 2 1 1 0 2 1 0 1 1 1 1 1 1 1 0 1 1 2 1 1 2 1 1 1 1 1 1 1 0 0 2 1 1 0 1 0 0 1 0 0 1 0 0 1 0 ...
output:
2642
result:
ok 1 number(s): "2642"
Test #18:
score: 0
Accepted
time: 370ms
memory: 106412kb
input:
1 1000000 234 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
7199
result:
ok 1 number(s): "7199"
Test #19:
score: 0
Accepted
time: 365ms
memory: 91772kb
input:
1 1000000 234 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
7880
result:
ok 1 number(s): "7880"
Test #20:
score: 0
Accepted
time: 346ms
memory: 104704kb
input:
1 1000000 234 2 2 2 2 2 1 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 0 0 1 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 0 2 0 0 2 2 2 2 1 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 1 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 0 2 2 0 1 2 ...
output:
6655
result:
ok 1 number(s): "6655"
Test #21:
score: 0
Accepted
time: 365ms
memory: 105792kb
input:
1 1000000 234 1 0 2 2 2 2 0 2 1 0 0 2 2 1 0 1 2 1 2 2 1 2 1 1 2 0 2 0 0 0 2 2 0 0 1 2 2 0 2 2 0 0 2 2 2 2 0 2 2 0 0 0 2 0 2 0 0 0 2 1 1 0 1 2 2 2 2 2 1 2 2 0 0 0 0 0 0 1 2 0 2 2 2 0 0 1 1 0 2 2 1 2 0 2 2 0 2 0 2 1 2 2 2 1 0 2 1 1 2 2 2 2 1 2 2 1 2 2 1 2 2 0 2 0 2 2 1 2 2 0 2 0 1 0 2 1 1 2 2 0 0 0 2 ...
output:
4951
result:
ok 1 number(s): "4951"
Test #22:
score: 0
Accepted
time: 388ms
memory: 106288kb
input:
1 1000000 234 2 1 0 0 1 1 1 0 1 2 2 0 0 0 1 2 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 1 1 0 0 1 2 0 1 1 2 2 2 1 0 1 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 2 1 0 2 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 0 2 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 1 1 0 1 1 ...
output:
2640
result:
ok 1 number(s): "2640"
Test #23:
score: 0
Accepted
time: 385ms
memory: 105920kb
input:
1 1000000 23333 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
84
result:
ok 1 number(s): "84"
Test #24:
score: 0
Accepted
time: 351ms
memory: 103928kb
input:
1 1000000 23333 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0
result:
ok 1 number(s): "0"
Test #25:
score: 0
Accepted
time: 355ms
memory: 104872kb
input:
1 1000000 23334 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 0 1 0 0 2 2 0 1 2 2 2 0 2 2 0 2 2 2 0 1 0 2 2 2 2 2 2 0 0 2 0 2 2 0 0 2 2 2 2 0 2 2 2 1 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 0 2 2 1 2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 0 2 2 0 1 2 2 1 2 2 2 0 2 2 2 2 2 2 0 2 0 2 2 2 1 2 2 2 2 2 0 2 2 ...
output:
72
result:
ok 1 number(s): "72"
Test #26:
score: 0
Accepted
time: 366ms
memory: 106248kb
input:
1 1000000 23334 2 2 1 2 2 2 2 0 0 1 0 2 2 0 2 1 2 2 1 2 2 1 1 2 2 1 0 2 2 2 0 2 2 2 2 0 2 0 1 1 2 0 0 1 1 2 1 2 0 2 2 2 1 0 2 0 0 1 1 1 0 0 1 2 2 2 1 1 2 2 2 2 1 0 2 1 2 2 1 2 2 0 2 0 2 1 0 1 0 1 2 1 2 2 2 2 2 2 1 2 0 2 1 1 1 0 1 2 2 2 0 1 1 1 2 1 2 2 0 1 2 0 0 2 2 1 1 1 1 2 2 1 2 1 2 2 2 1 2 1 2 0 ...
output:
53
result:
ok 1 number(s): "53"
Test #27:
score: 0
Accepted
time: 388ms
memory: 105436kb
input:
1 1000000 23333 0 1 0 0 0 0 2 0 0 2 0 0 0 0 1 1 1 1 0 1 1 2 1 0 0 1 1 2 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 0 1 0 2 2 0 2 1 2 2 1 2 0 1 0 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 1 1 2 1 1 0 2 0 2 0 1 1 2 2 0 1 2 0 0 1 1 0 0 1 1 ...
output:
28
result:
ok 1 number(s): "28"
Test #28:
score: 0
Accepted
time: 410ms
memory: 105924kb
input:
1 1000000 76545 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
25
result:
ok 1 number(s): "25"
Test #29:
score: 0
Accepted
time: 377ms
memory: 106176kb
input:
1 1000000 56757 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0
result:
ok 1 number(s): "0"
Test #30:
score: 0
Accepted
time: 368ms
memory: 105332kb
input:
1 1000000 65766 2 2 2 2 2 2 2 2 0 2 2 1 2 2 1 2 2 2 2 2 2 2 0 2 2 0 2 2 2 2 2 2 2 0 2 2 2 2 1 2 2 2 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 0 2 2 2 1 2 1 1 2 2 2 2 2 2 2 2 2 1 2 1 2 1 2 0 2 2 2 2 1 2 2 2 1 2 2 1 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
25
result:
ok 1 number(s): "25"
Test #31:
score: 0
Accepted
time: 385ms
memory: 106436kb
input:
1 1000000 99824 0 2 2 0 1 0 2 0 2 0 2 1 0 2 2 2 0 1 0 1 0 0 2 2 2 2 2 2 2 2 0 2 1 1 2 2 2 1 2 2 1 2 2 2 0 1 2 2 2 2 0 2 2 1 0 2 1 2 2 2 1 1 0 1 2 2 2 0 2 2 1 2 2 2 0 2 2 0 0 2 0 2 2 2 1 0 0 2 2 2 2 1 2 2 2 1 2 2 2 0 0 1 1 2 0 1 1 2 0 0 0 0 0 2 1 2 0 2 2 2 0 2 2 2 2 1 2 0 2 2 1 0 2 2 0 2 1 1 2 0 2 2 ...
output:
12
result:
ok 1 number(s): "12"
Test #32:
score: 0
Accepted
time: 370ms
memory: 101368kb
input:
1 1000000 43530 0 0 1 0 1 1 1 2 1 0 0 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 2 1 0 1 0 0 1 0 0 1 2 2 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 1 0 2 2 1 1 1 0 2 0 0 0 2 1 2 1 0 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 0 1 1 2 1 0 1 1 0 0 2 0 0 0 1 ...
output:
15
result:
ok 1 number(s): "15"
Test #33:
score: 0
Accepted
time: 401ms
memory: 102540kb
input:
1 1000000 233334 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2...
output:
8
result:
ok 1 number(s): "8"
Test #34:
score: 0
Accepted
time: 393ms
memory: 106028kb
input:
1 1000000 233333 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
0
result:
ok 1 number(s): "0"
Test #35:
score: 0
Accepted
time: 388ms
memory: 106260kb
input:
1 1000000 233334 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 0 2 2 2 0 2 1 2 1 2 2 0 0 2 2 2 2 2 2 2 2 2 1 2 1 2 0 2 2 2 2 2 2 2 0 2 2 2 1 2 2 2 2 2 2 2 2 2 2 0 2 1 2 2 2 2 2 2 2 2 2 2 2...
output:
7
result:
ok 1 number(s): "7"
Test #36:
score: 0
Accepted
time: 364ms
memory: 105500kb
input:
1 1000000 233333 2 1 2 2 0 2 2 1 2 0 2 1 0 1 0 2 2 2 2 2 2 2 0 2 2 2 1 2 2 1 0 1 1 2 0 0 1 2 2 2 2 0 0 2 1 0 0 2 0 1 1 2 2 1 0 0 1 2 2 2 2 0 1 2 2 2 1 2 0 1 0 0 2 2 2 0 0 0 1 2 0 1 1 0 2 2 2 2 0 2 2 0 2 2 1 0 0 1 2 0 2 2 2 2 2 2 2 1 2 0 1 0 2 2 2 2 2 1 2 2 2 2 1 0 2 2 2 2 1 1 0 2 2 2 2 1 1 2 0 1 1 1...
output:
5
result:
ok 1 number(s): "5"
Test #37:
score: 0
Accepted
time: 374ms
memory: 92532kb
input:
1 1000000 233334 0 1 2 1 1 1 0 0 1 1 1 1 1 0 1 0 1 1 1 0 0 1 2 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 2 1 1 1 1 0 1 0 1 2 1 0 1 2 1 0 2 1 0 0 0 0 0 1 0 2 1 0 0 1 0 0 0 0 2 1 1 1 2 0 0 0 1 0 2 0 2 0 1 1 0 0 1 0 1 1 1 1 0 0 2 1 0 1 1 1 1 0 0 1 2 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 1 0 1 0 1 2 2 1 0 1 2 2...
output:
2
result:
ok 1 number(s): "2"
Test #38:
score: 0
Accepted
time: 377ms
memory: 90448kb
input:
1 1000000 131072 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
15
result:
ok 1 number(s): "15"
Test #39:
score: 0
Accepted
time: 376ms
memory: 105588kb
input:
1 1000000 234234 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
8
result:
ok 1 number(s): "8"
Test #40:
score: 0
Accepted
time: 379ms
memory: 91752kb
input:
1 1000000 456459 1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 0 2 0 2 2 2 1 2 2 2 0 0 0 2 2 2 2 2 0 2 1 0 1 2 2 2 0 2 2 2 2 1 2 2 2 2 2 1 2 2 2 2 1 2 2 2 2 0 2 2 2 2 2 2 2 2 2 0 0 2 2 1 2 2 0 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 1 1 2 2 2 1 2 2 2 2 1 2 0 2 2 1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 0 2 2 2...
output:
3
result:
ok 1 number(s): "3"
Test #41:
score: 0
Accepted
time: 351ms
memory: 105440kb
input:
1 1000000 342461 0 2 2 0 1 2 1 2 2 2 2 0 0 1 1 1 2 2 2 2 2 0 2 1 2 2 2 2 0 2 2 2 2 2 0 0 1 2 2 0 2 0 2 0 2 2 2 2 2 2 2 2 0 2 1 2 2 0 2 0 1 1 0 1 1 2 0 1 2 2 0 2 2 1 2 0 2 0 0 0 2 2 0 0 2 2 1 2 2 2 2 0 1 0 2 1 2 0 0 2 1 1 0 2 2 2 1 1 2 1 2 0 0 0 2 1 1 1 0 2 2 2 2 1 0 2 0 2 2 2 0 1 1 0 2 1 2 0 2 2 2 2...
output:
3
result:
ok 1 number(s): "3"
Test #42:
score: 0
Accepted
time: 367ms
memory: 103440kb
input:
1 1000000 633537 1 1 0 0 2 0 0 1 1 1 0 1 1 2 0 1 0 1 1 1 0 0 1 1 1 1 0 1 0 1 0 0 1 0 0 0 1 1 1 0 1 0 1 2 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 2 1 2 2 1 1 1 0 2 0 1 1 0 0 0 0 0 1 0 0 0 1 1 0 2 0 1 1 1 0 0 1 2 1 2 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 0 2 0 2 1 0...
output:
1
result:
ok 1 number(s): "1"
Test #43:
score: 0
Accepted
time: 365ms
memory: 90644kb
input:
1 1000000 131072 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
15
result:
ok 1 number(s): "15"
Test #44:
score: 0
Accepted
time: 387ms
memory: 97116kb
input:
1 1000000 234234 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
8
result:
ok 1 number(s): "8"
Test #45:
score: 0
Accepted
time: 358ms
memory: 91516kb
input:
1 1000000 456459 2 0 2 2 2 2 2 0 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 0 2 2 0 1 2 2 2 0 2 2 2 2 2 2 2 2 2 2 0 2 2 0 2 2 0 2 2 2 0 2 2 2 0 2 2 2 2 2 0 0 2 2 0 2 2 2 2 2 2 2 1 2 0 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 2 0 1 2 2 2 2 1 2 2 2 0 0 2 2 1 2 0 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2...
output:
3
result:
ok 1 number(s): "3"
Test #46:
score: 0
Accepted
time: 370ms
memory: 94232kb
input:
1 1000000 342461 2 2 0 2 1 1 2 0 2 1 2 0 2 2 2 1 2 0 1 2 0 2 2 1 2 2 2 1 2 2 0 2 2 0 2 0 1 1 2 2 2 1 2 1 1 0 1 1 0 2 2 1 0 2 2 0 1 2 0 0 1 2 1 2 2 1 2 2 2 2 0 1 1 1 2 2 0 2 2 2 0 2 2 0 2 1 2 1 2 2 1 1 0 2 1 2 0 0 2 2 2 1 0 1 2 0 2 2 2 0 1 2 1 2 2 2 1 2 0 2 2 1 2 2 2 2 2 0 2 2 2 2 2 2 2 2 1 2 0 1 2 2...
output:
3
result:
ok 1 number(s): "3"
Test #47:
score: 0
Accepted
time: 402ms
memory: 99540kb
input:
1 1000000 633537 1 2 0 2 1 1 1 2 1 2 1 0 0 0 2 1 0 1 1 0 0 2 0 0 0 0 1 1 1 0 1 2 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 2 0 1 1 1 1 1 1 0 1 0 1 2 1 0 1 0 1 1 0 1 0 0 1 1 0 0 1 1 0 1 2 1 1 2 1 0 0 0 0 1 1 0 0 0 1 0 1 0 2 1 1 0 1 0 0 0 0 2 2 2 1 0 1 0 0 2 1 2 0 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 1 2 1 1 2 0...
output:
1
result:
ok 1 number(s): "1"
Test #48:
score: 0
Accepted
time: 359ms
memory: 105908kb
input:
1 1000000 1234567 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1
result:
ok 1 number(s): "1"
Test #49:
score: 0
Accepted
time: 384ms
memory: 105892kb
input:
1 1000000 1234568 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1
result:
ok 1 number(s): "1"
Test #50:
score: 0
Accepted
time: 353ms
memory: 100624kb
input:
1 1000000 1234567 0 0 0 2 2 1 2 2 2 1 2 2 1 2 2 1 2 2 2 2 2 2 0 2 2 2 2 2 2 1 2 2 1 2 0 2 2 2 2 2 2 2 2 2 1 2 0 2 1 0 2 0 0 2 0 2 2 2 2 1 2 2 2 2 0 0 2 2 1 1 2 0 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 2 1 2 2 2 2 2 2 1 2 2 2 2 1 2 2 1 2 2 2 2 2 1 2 1 0 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 1 1 2 2 1 2 2 0 ...
output:
1
result:
ok 1 number(s): "1"
Test #51:
score: 0
Accepted
time: 377ms
memory: 97960kb
input:
1 1000000 1234568 0 1 0 2 1 1 2 2 2 0 0 1 2 2 1 2 2 2 2 1 2 0 2 2 2 0 2 0 0 0 0 1 2 2 0 0 2 2 0 0 1 1 1 1 0 2 1 1 2 2 0 1 1 2 1 2 0 0 2 2 1 1 0 0 1 1 1 1 2 2 2 2 2 1 1 2 0 0 0 2 1 2 1 2 2 2 1 2 1 0 2 2 2 2 2 2 2 2 2 1 0 1 1 2 0 2 2 1 2 2 1 1 2 2 2 1 2 0 2 0 0 1 2 1 0 2 0 1 1 1 0 1 1 1 2 2 1 2 2 0 2 ...
output:
1
result:
ok 1 number(s): "1"
Test #52:
score: 0
Accepted
time: 397ms
memory: 106088kb
input:
1 1000000 1234567 0 0 0 0 2 0 0 0 1 1 0 1 0 0 2 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 1 1 0 0 1 2 1 0 0 1 1 0 0 2 1 0 0 1 1 0 0 1 0 1 2 0 0 0 1 1 0 1 1 1 1 0 1 0 2 0 0 2 1 0 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 2 2 0 0 2 0 1 1 0 0 1 0 0 0 2 0 1 0 1 1 0 1 1 0 1 0 1 1 ...
output:
0
result:
ok 1 number(s): "0"
Test #53:
score: 0
Accepted
time: 376ms
memory: 106316kb
input:
1 1000000 2000000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1
result:
ok 1 number(s): "1"
Test #54:
score: 0
Accepted
time: 204ms
memory: 77812kb
input:
1 1000000 2000000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1
result:
ok 1 number(s): "1"
Test #55:
score: 0
Accepted
time: 224ms
memory: 78132kb
input:
1 1000000 233 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0
result:
ok 1 number(s): "0"
Test #56:
score: 0
Accepted
time: 200ms
memory: 77780kb
input:
1 1000000 233 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
51
result:
ok 1 number(s): "51"
Test #57:
score: 0
Accepted
time: 206ms
memory: 77832kb
input:
1 1000000 233 1 2 2 1 2 0 2 0 2 2 2 1 1 2 0 2 2 2 2 2 0 2 2 0 2 0 2 0 0 0 1 2 0 2 2 2 1 2 2 0 1 1 0 0 0 2 1 1 1 1 2 0 0 2 1 1 2 2 2 2 0 2 2 1 1 2 0 0 2 2 1 2 0 0 1 2 2 1 0 2 2 1 2 2 0 2 0 1 2 2 2 1 1 1 2 0 2 2 2 0 0 0 2 2 2 2 0 2 0 2 1 0 2 1 0 2 2 2 0 2 2 0 0 1 1 0 1 2 2 1 2 1 1 2 1 2 2 1 2 1 0 1 0 ...
output:
64
result:
ok 1 number(s): "64"
Test #58:
score: 0
Accepted
time: 220ms
memory: 77800kb
input:
1 1000000 234 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
96
result:
ok 1 number(s): "96"
Test #59:
score: 0
Accepted
time: 192ms
memory: 77932kb
input:
1 1000000 234 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
83
result:
ok 1 number(s): "83"
Test #60:
score: 0
Accepted
time: 190ms
memory: 77856kb
input:
1 1000000 234 2 1 2 2 0 2 2 2 0 2 2 2 2 2 2 2 2 0 2 2 2 1 2 2 0 1 2 1 2 0 1 2 0 0 1 2 0 0 0 1 2 1 0 1 2 2 2 2 0 2 2 2 0 0 0 2 0 1 2 1 0 2 0 2 0 2 0 2 2 2 2 2 0 0 0 2 2 0 1 1 1 0 2 2 1 2 2 2 1 1 0 0 1 1 2 1 1 1 0 2 0 2 2 1 1 2 2 0 1 2 2 0 2 1 2 0 1 0 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 0 2 2 1 1 0 1 2 2 ...
output:
64
result:
ok 1 number(s): "64"
Test #61:
score: 0
Accepted
time: 207ms
memory: 78016kb
input:
1 1000000 34567 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0
result:
ok 1 number(s): "0"
Test #62:
score: 0
Accepted
time: 186ms
memory: 78052kb
input:
1 1000000 34567 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
11
result:
ok 1 number(s): "11"
Test #63:
score: 0
Accepted
time: 217ms
memory: 78024kb
input:
1 1000000 34567 0 2 0 2 1 0 2 0 1 0 2 2 2 0 1 0 2 2 0 2 2 0 1 1 2 0 1 2 2 2 2 2 2 1 2 1 0 2 2 0 2 2 0 0 1 2 0 1 2 1 1 2 0 2 2 2 2 2 0 2 2 2 2 2 2 0 0 0 2 1 1 2 1 0 2 0 2 2 2 1 2 2 2 0 2 2 0 1 0 2 0 0 0 2 2 2 2 0 2 1 2 2 1 2 1 1 0 2 0 2 2 2 0 2 2 2 0 0 2 0 0 2 2 2 1 2 2 1 2 1 0 2 0 2 1 0 2 1 2 0 2 2 ...
output:
10
result:
ok 1 number(s): "10"
Test #64:
score: 0
Accepted
time: 210ms
memory: 78044kb
input:
1 1000000 34568 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
11
result:
ok 1 number(s): "11"
Test #65:
score: 0
Accepted
time: 220ms
memory: 78148kb
input:
1 1000000 34568 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
11
result:
ok 1 number(s): "11"
Test #66:
score: 0
Accepted
time: 210ms
memory: 77852kb
input:
1 1000000 34568 1 0 1 1 2 2 2 0 0 1 2 2 0 1 0 2 2 2 0 0 2 1 2 2 2 1 0 0 2 0 2 1 0 1 0 2 2 2 2 2 1 2 0 2 0 2 2 1 2 2 0 0 1 0 1 0 2 0 0 2 1 1 0 1 2 1 1 2 2 0 2 0 2 0 0 1 2 1 2 2 2 0 0 0 0 2 0 2 0 2 2 2 1 2 2 2 0 2 1 2 2 2 2 2 2 0 1 2 0 1 2 2 0 2 2 0 2 1 0 1 2 2 1 2 0 2 0 2 2 0 0 2 1 0 2 1 2 2 1 1 2 0 ...
output:
10
result:
ok 1 number(s): "10"
Test #67:
score: 0
Accepted
time: 208ms
memory: 78032kb
input:
1 1000000 432576 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
3
result:
ok 1 number(s): "3"
Test #68:
score: 0
Accepted
time: 221ms
memory: 78000kb
input:
1 1000000 432576 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
3
result:
ok 1 number(s): "3"
Test #69:
score: 0
Accepted
time: 218ms
memory: 77816kb
input:
1 1000000 432576 2 0 2 0 0 1 2 1 2 1 2 2 1 2 0 2 2 2 0 2 1 0 1 2 2 2 2 2 0 2 2 2 1 1 1 2 2 2 2 1 1 2 2 2 2 1 2 0 2 1 2 1 2 0 1 2 1 2 1 2 2 2 2 2 1 2 0 1 2 2 0 2 2 2 1 2 2 2 2 2 2 2 2 0 1 0 0 0 1 1 2 2 2 2 2 2 2 2 2 0 2 2 0 0 0 0 1 1 2 2 2 1 2 2 2 1 2 2 2 2 1 0 2 2 1 2 1 0 2 0 2 0 2 1 1 2 0 2 2 1 2 0...
output:
2
result:
ok 1 number(s): "2"
Test #70:
score: 0
Accepted
time: 209ms
memory: 78128kb
input:
1 1000000 432577 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
0
result:
ok 1 number(s): "0"
Test #71:
score: 0
Accepted
time: 186ms
memory: 78024kb
input:
1 1000000 432577 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
3
result:
ok 1 number(s): "3"
Test #72:
score: 0
Accepted
time: 217ms
memory: 78004kb
input:
1 1000000 432577 2 1 2 0 2 1 1 2 0 0 0 2 0 2 1 2 2 1 2 2 2 2 1 0 2 1 0 2 2 0 2 0 2 1 2 0 2 0 0 0 1 2 2 0 0 2 2 2 1 2 2 0 0 0 0 1 1 1 0 0 2 2 2 0 1 2 0 0 0 0 2 1 2 1 0 1 1 2 2 2 1 0 2 1 2 2 0 2 2 2 2 1 0 2 1 2 2 2 2 1 0 1 0 0 2 2 1 2 2 2 0 2 1 2 1 1 2 2 0 2 2 0 2 0 1 2 2 1 1 2 2 2 0 2 2 1 0 0 0 2 1 2...
output:
2
result:
ok 1 number(s): "2"
Test #73:
score: 0
Accepted
time: 195ms
memory: 78048kb
input:
1 1000000 876868 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
2
result:
ok 1 number(s): "2"
Test #74:
score: 0
Accepted
time: 219ms
memory: 77788kb
input:
1 1000000 876868 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
2
result:
ok 1 number(s): "2"
Test #75:
score: 0
Accepted
time: 215ms
memory: 77856kb
input:
1 1000000 876868 1 2 0 0 0 1 2 1 2 2 1 2 2 0 0 1 0 1 0 2 0 1 0 2 2 1 2 2 1 2 2 2 0 2 2 2 2 2 1 2 1 0 1 2 0 0 1 2 1 0 2 1 2 0 2 2 2 2 2 0 1 0 1 2 1 1 2 2 1 1 2 2 1 2 2 1 2 1 0 2 2 2 0 0 0 2 1 2 2 2 2 1 1 2 1 1 2 0 1 1 2 0 0 0 2 0 2 2 2 0 2 0 1 2 2 2 2 2 2 2 1 2 2 2 0 1 2 1 2 1 2 2 0 2 2 2 1 0 1 2 2 2...
output:
1
result:
ok 1 number(s): "1"
Test #76:
score: 0
Accepted
time: 216ms
memory: 77824kb
input:
1 1000000 876869 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
0
result:
ok 1 number(s): "0"
Test #77:
score: 0
Accepted
time: 217ms
memory: 78012kb
input:
1 1000000 876869 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
2
result:
ok 1 number(s): "2"
Test #78:
score: 0
Accepted
time: 187ms
memory: 78076kb
input:
1 1000000 876869 0 2 1 2 2 2 0 1 2 2 2 0 2 0 2 2 1 2 1 1 0 2 0 0 1 2 2 2 0 2 0 2 2 2 2 2 2 2 0 2 1 2 2 2 1 1 2 0 0 2 2 2 2 2 2 2 1 2 2 2 0 2 2 1 2 2 1 2 0 1 1 2 2 2 2 2 1 2 2 2 2 2 2 0 0 1 1 2 0 1 1 2 2 1 1 0 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 1 2 0 1 2 0 2 1 0 0 2 0 2 0 1 2 2 2 0 1 1 0 1 1 0 1 1 1 2 1 0...
output:
1
result:
ok 1 number(s): "1"
Test #79:
score: 0
Accepted
time: 222ms
memory: 78036kb
input:
1 1000000 876869 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 2 1 1 1 1 0 0 1 1...
output:
0
result:
ok 1 number(s): "0"
Test #80:
score: 0
Accepted
time: 204ms
memory: 77968kb
input:
1 1000000 876869 0 1 0 2 2 2 1 0 0 0 1 0 1 1 0 0 1 2 2 1 0 1 1 0 0 0 0 2 0 1 1 0 1 0 0 0 2 0 1 1 1 1 0 0 1 2 1 0 0 1 2 1 1 0 0 0 1 0 0 0 1 2 1 0 1 1 0 1 0 0 1 1 2 2 0 2 1 1 0 1 0 1 1 1 1 2 1 1 0 1 0 0 0 1 2 1 1 2 1 1 1 1 1 2 2 0 0 0 0 2 0 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 0 2 0 1 0 0 2 2 0 1 0 1 1 1 2 1...
output:
0
result:
ok 1 number(s): "0"
Test #81:
score: 0
Accepted
time: 252ms
memory: 77800kb
input:
1 1000000 876869 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1 2 2 0 2 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 2 0 0 0 1 1 2 0 1 1 1 1 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0...
output:
0
result:
ok 1 number(s): "0"
Test #82:
score: 0
Accepted
time: 0ms
memory: 9688kb
input:
12 2 2000000 1 0 1 2 2 2000000 1 1 2 1 2 2000000 1 2 2 1 1 2000000 0 1 2000000 1 2 2000000 2 0 1 2 2 2000000 2 1 2 1 2 2000000 2 2 2 1 1 2000000 2 2 2000000 0 0 1 2 2 2000000 0 1 2 1 2 2000000 0 2 2 1
output:
0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 12 numbers
Test #83:
score: 0
Accepted
time: 112ms
memory: 9796kb
input:
200000 5 1914575 0 1 1 1 0 3 4 5 3 3 2 4 1 5 996221 1 0 1 1 0 2 3 2 5 4 1 1 2 5 723492 0 0 1 1 1 5 1 5 4 3 4 4 2 5 1189770 1 1 2 0 0 5 2 1 5 4 5 3 5 5 1469525 1 0 0 1 0 4 1 1 5 3 1 3 2 5 76763 1 0 1 1 0 1 3 2 5 5 3 3 4 5 407965 1 2 0 0 0 1 4 2 1 2 5 5 3 5 429447 0 1 0 0 0 1 3 4 1 4 5 2 1 5 765063 0 ...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 200000 numbers
Test #84:
score: 0
Accepted
time: 181ms
memory: 59860kb
input:
100001 500000 36426 1 0 2 2 1 2 0 0 0 2 1 2 1 2 2 1 2 2 2 1 1 2 0 0 2 2 0 0 1 0 2 2 2 2 2 0 2 2 0 2 2 2 2 1 2 0 2 0 2 2 0 0 1 1 2 0 2 0 1 0 0 2 2 2 1 2 2 2 1 2 0 1 0 2 0 2 2 2 2 1 2 2 0 0 0 2 0 0 1 2 0 2 2 2 2 2 0 1 0 1 2 0 2 1 1 1 2 1 2 0 0 2 2 0 1 1 1 2 2 1 0 0 2 0 1 2 1 2 2 2 0 0 2 2 0 0 2 1 2 1 ...
output:
17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 100001 numbers
Test #85:
score: 0
Accepted
time: 263ms
memory: 9820kb
input:
1000000 1 260522 0 1 1933447 0 1 1963982 1 1 895728 0 1 539679 1 1 287940 1 1 823355 1 1 1374934 1 1 1195922 1 1 284691 1 1 1381221 0 1 1229302 0 1 870607 0 1 1187475 1 1 1207354 0 1 1751951 0 1 472167 1 1 1976483 0 1 56553 0 1 309279 0 1 1708200 1 1 1226467 1 1 661473 0 1 383718 1 1 986530 1 1 1508...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 1000000 numbers
Extra Test:
score: 0
Extra Test Passed