QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#651810#3083. Bit Operationxyz123AC ✓252ms58828kbC++231.9kb2024-10-18 18:03:122024-10-18 18:03:14

Judging History

你现在查看的是最新测评结果

  • [2024-10-18 18:03:14]
  • 评测
  • 测评结果:AC
  • 用时:252ms
  • 内存:58828kb
  • [2024-10-18 18:03:12]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const long long mod=998244353;
long long T,a,b,c,d[1000001],v[1000001],o,h[1000001],fa[1000001],q,w,e,an,cn,fac[1000001],inv[1000001],st[1000001],u[1000001];
long long dp[1000001],pw[1000001],fc[1000001];
char s[1000001];
struct p{long long q,w;}l[1000001];
long long pow_(long long qq,long long ww){long long ee=1;while(ww){if(ww&1) ee*=qq,ee%=mod;qq*=qq,qq%=mod,ww>>=1;}return ee%mod;}
inline int read(){int x=0,f=1;char c=getchar();while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}return x*f;}
void add(long long qq,long long ww){l[++o].q=ww,l[o].w=h[qq],h[qq]=o;}
long long gcd(long long qq,long long ww){return !ww?qq:gcd(ww,qq%ww);}
long long find(long long qq){return qq==fa[qq]?qq:fa[qq]=find(fa[qq]);}
void merge(long long qq,long long ww){long long f1=find(qq),f2=find(ww);if(f1==f2) return;fa[f1]=f2;}
long long C(long long qq,long long ww){return fac[qq]*inv[ww]%mod*inv[qq-ww]%mod;}
int main()
{
//	freopen("1.in","r",stdin);
	srand((unsigned)(time(0)^(*new int)));
	fac[0]=1;for(int i=1;i<=1000000;i++) fac[i]=fac[i-1]*i%mod;
	inv[1000000]=pow_(fac[1000000],mod-2);for(int i=999999;i>=0;i--) inv[i]=inv[i+1]*(i+1)%mod;
	fc[0]=1;
	for(int i=1;i<=1000000;i++) fc[i]=fc[i-1]*pow_(2,mod-2)%mod*(2*i-1)%mod;
	pw[0]=1;
	for(int i=1;i<=1000000;i++) pw[i]=pw[i-1]*2%mod;
	scanf("%lld",&a);
	for(int i=1;i<=a;i++)
	{
		scanf("%lld",&d[i]);
	}
	for(int i=1;i<=a;i++)
	{
		dp[i]=fc[i-1]*fc[a-i]%mod*pow_(2,a-1)%mod*C(a-1,i-1)%mod;
	}
	for(int i=1;i<=a;i++)
	{
		if(d[i]) an=(an+dp[i])%mod;
	}
//	for(int i=2;i<=a;i++)
//	{
//		for(int j=1;j+i-1<=a;j++)
//		{
//			int r=j+i-1;
//			for(int k=j;k<r;k++)
//			{
//				dp[j][r]=(dp[j][r]+(dp[j][k]*pw[r-k-1]%mod+dp[k+1][r]*pw[k-j]%mod)*pow_(r-j,mod-2))%mod;
//			}
//		}
//	}
	printf("%lld",(an%mod+mod)%mod);
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 236ms
memory: 58604kb

input:

999993
1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 0 0 1 1...

output:

318158140

result:

ok single line: '318158140'

Test #2:

score: 0
Accepted
time: 247ms
memory: 58440kb

input:

999994
0 1 0 1 0 0 1 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 0 0 1 1 0 1 1 1 0 1 0 1...

output:

736536253

result:

ok single line: '736536253'

Test #3:

score: 0
Accepted
time: 230ms
memory: 53592kb

input:

999999
0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 0 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0...

output:

363776643

result:

ok single line: '363776643'

Test #4:

score: 0
Accepted
time: 250ms
memory: 54968kb

input:

999995
0 0 1 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 1 1...

output:

814595627

result:

ok single line: '814595627'

Test #5:

score: 0
Accepted
time: 236ms
memory: 53096kb

input:

999995
0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 1 1 1...

output:

58308900

result:

ok single line: '58308900'

Test #6:

score: 0
Accepted
time: 243ms
memory: 56908kb

input:

999992
1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 0 0 0 0...

output:

952608310

result:

ok single line: '952608310'

Test #7:

score: 0
Accepted
time: 242ms
memory: 54956kb

input:

999992
1 1 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 0 0 1 1 1 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 1 1...

output:

426397420

result:

ok single line: '426397420'

Test #8:

score: 0
Accepted
time: 244ms
memory: 58228kb

input:

999993
0 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 1 0 1 1 0 0 0 1 0 0...

output:

194529914

result:

ok single line: '194529914'

Test #9:

score: 0
Accepted
time: 242ms
memory: 53560kb

input:

999999
0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1...

output:

377113412

result:

ok single line: '377113412'

Test #10:

score: 0
Accepted
time: 245ms
memory: 56936kb

input:

999999
1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 0 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0...

output:

860438179

result:

ok single line: '860438179'

Test #11:

score: 0
Accepted
time: 235ms
memory: 58548kb

input:

999990
1 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 0 1 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1...

output:

921664099

result:

ok single line: '921664099'

Test #12:

score: 0
Accepted
time: 237ms
memory: 54920kb

input:

999990
1 0 0 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 0 1 0 1 0 0 1 0 0 1 1...

output:

611834606

result:

ok single line: '611834606'

Test #13:

score: 0
Accepted
time: 229ms
memory: 56044kb

input:

999997
0 0 0 0 1 0 1 1 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0...

output:

217377088

result:

ok single line: '217377088'

Test #14:

score: 0
Accepted
time: 242ms
memory: 53040kb

input:

1000000
1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 0 0 1 0 ...

output:

618928120

result:

ok single line: '618928120'

Test #15:

score: 0
Accepted
time: 247ms
memory: 53308kb

input:

999996
0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0...

output:

142290670

result:

ok single line: '142290670'

Test #16:

score: 0
Accepted
time: 240ms
memory: 55960kb

input:

999993
1 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1...

output:

127070214

result:

ok single line: '127070214'

Test #17:

score: 0
Accepted
time: 238ms
memory: 55672kb

input:

999991
0 0 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0...

output:

54081091

result:

ok single line: '54081091'

Test #18:

score: 0
Accepted
time: 237ms
memory: 55764kb

input:

999999
0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 0 1...

output:

562791365

result:

ok single line: '562791365'

Test #19:

score: 0
Accepted
time: 241ms
memory: 58612kb

input:

999993
1 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 1 1 0 1 1...

output:

733477224

result:

ok single line: '733477224'

Test #20:

score: 0
Accepted
time: 238ms
memory: 56084kb

input:

999990
0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0...

output:

729778193

result:

ok single line: '729778193'

Test #21:

score: 0
Accepted
time: 230ms
memory: 58668kb

input:

999992
0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0...

output:

372070644

result:

ok single line: '372070644'

Test #22:

score: 0
Accepted
time: 238ms
memory: 58540kb

input:

999990
1 1 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 0 0 0 1 1 0 1 1 1 0 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 0 0 1 1 1 1 0 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0...

output:

779146459

result:

ok single line: '779146459'

Test #23:

score: 0
Accepted
time: 242ms
memory: 56120kb

input:

999992
1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 1 1 0 1 1 0 0 0 0 1 0 1...

output:

806185513

result:

ok single line: '806185513'

Test #24:

score: 0
Accepted
time: 236ms
memory: 58320kb

input:

1000000
1 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 0 1 ...

output:

496270135

result:

ok single line: '496270135'

Test #25:

score: 0
Accepted
time: 242ms
memory: 53128kb

input:

999993
1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 1...

output:

975259794

result:

ok single line: '975259794'

Test #26:

score: 0
Accepted
time: 233ms
memory: 53280kb

input:

999990
0 1 1 1 0 0 1 1 0 1 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1...

output:

355858407

result:

ok single line: '355858407'

Test #27:

score: 0
Accepted
time: 238ms
memory: 53292kb

input:

999997
1 1 0 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1...

output:

102162802

result:

ok single line: '102162802'

Test #28:

score: 0
Accepted
time: 243ms
memory: 55972kb

input:

999992
0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 1 1 1 0 0 1 0 1 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 1 0 1 1 1 1 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 1...

output:

862156045

result:

ok single line: '862156045'

Test #29:

score: 0
Accepted
time: 239ms
memory: 58632kb

input:

999992
1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 1 1 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 0...

output:

727870908

result:

ok single line: '727870908'

Test #30:

score: 0
Accepted
time: 247ms
memory: 58464kb

input:

1000000
1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 1 1 1 0 0 0 1 1 ...

output:

775085392

result:

ok single line: '775085392'

Test #31:

score: 0
Accepted
time: 225ms
memory: 53316kb

input:

999994
1 1 0 1 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 0 0...

output:

777548729

result:

ok single line: '777548729'

Test #32:

score: 0
Accepted
time: 242ms
memory: 55724kb

input:

999997
1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0...

output:

996565000

result:

ok single line: '996565000'

Test #33:

score: 0
Accepted
time: 252ms
memory: 56960kb

input:

999997
0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1...

output:

520159051

result:

ok single line: '520159051'

Test #34:

score: 0
Accepted
time: 249ms
memory: 53372kb

input:

999994
0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 1...

output:

244544266

result:

ok single line: '244544266'

Test #35:

score: 0
Accepted
time: 245ms
memory: 53296kb

input:

999994
1 0 0 0 1 1 1 1 1 0 0 0 1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1...

output:

187376116

result:

ok single line: '187376116'

Test #36:

score: 0
Accepted
time: 241ms
memory: 53040kb

input:

999997
1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 1 0 0 0 1...

output:

368784324

result:

ok single line: '368784324'

Test #37:

score: 0
Accepted
time: 245ms
memory: 55740kb

input:

999999
1 1 0 0 0 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 0 1 0 0 0 0 0 0 1...

output:

567410834

result:

ok single line: '567410834'

Test #38:

score: 0
Accepted
time: 234ms
memory: 53148kb

input:

999992
0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 0 0 1 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0...

output:

816168792

result:

ok single line: '816168792'

Test #39:

score: 0
Accepted
time: 245ms
memory: 58508kb

input:

999995
0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0...

output:

605715137

result:

ok single line: '605715137'

Test #40:

score: 0
Accepted
time: 237ms
memory: 55792kb

input:

999995
0 1 1 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 1...

output:

610640006

result:

ok single line: '610640006'

Test #41:

score: 0
Accepted
time: 240ms
memory: 55884kb

input:

999992
1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 1 1 0...

output:

125439784

result:

ok single line: '125439784'

Test #42:

score: 0
Accepted
time: 225ms
memory: 58536kb

input:

999997
1 0 1 1 0 0 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 1 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 0 1 1 0 1 0 0 0 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 1 0 0...

output:

940457570

result:

ok single line: '940457570'

Test #43:

score: 0
Accepted
time: 235ms
memory: 58756kb

input:

1000000
1 0 0 1 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 ...

output:

236836840

result:

ok single line: '236836840'

Test #44:

score: 0
Accepted
time: 243ms
memory: 55744kb

input:

999993
0 1 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1...

output:

118434117

result:

ok single line: '118434117'

Test #45:

score: 0
Accepted
time: 249ms
memory: 58336kb

input:

999999
1 1 1 0 0 1 1 0 1 0 0 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1...

output:

499981579

result:

ok single line: '499981579'

Test #46:

score: 0
Accepted
time: 228ms
memory: 55724kb

input:

999993
0 0 1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1...

output:

234057296

result:

ok single line: '234057296'

Test #47:

score: 0
Accepted
time: 236ms
memory: 55752kb

input:

999997
0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0...

output:

178509355

result:

ok single line: '178509355'

Test #48:

score: 0
Accepted
time: 241ms
memory: 55824kb

input:

999991
1 1 0 0 0 1 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0...

output:

860877036

result:

ok single line: '860877036'

Test #49:

score: 0
Accepted
time: 241ms
memory: 53284kb

input:

999990
1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 1...

output:

775433491

result:

ok single line: '775433491'

Test #50:

score: 0
Accepted
time: 249ms
memory: 53220kb

input:

999996
1 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 1 1...

output:

324125788

result:

ok single line: '324125788'

Test #51:

score: 0
Accepted
time: 248ms
memory: 58216kb

input:

999995
0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 1 0 1 1...

output:

585903054

result:

ok single line: '585903054'

Test #52:

score: 0
Accepted
time: 234ms
memory: 53384kb

input:

999994
1 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 0 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 1 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1...

output:

464904873

result:

ok single line: '464904873'

Test #53:

score: 0
Accepted
time: 235ms
memory: 54968kb

input:

1000000
1 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 1 0 0 ...

output:

625255294

result:

ok single line: '625255294'

Test #54:

score: 0
Accepted
time: 246ms
memory: 56120kb

input:

999994
1 1 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 1 1 0 1 0 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 1 1 0 1 0 1...

output:

643007677

result:

ok single line: '643007677'

Test #55:

score: 0
Accepted
time: 233ms
memory: 56108kb

input:

999995
1 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 0 1 1 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 1 0 1...

output:

608107195

result:

ok single line: '608107195'

Test #56:

score: 0
Accepted
time: 238ms
memory: 58224kb

input:

999992
0 0 1 1 1 0 1 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 0 1 1...

output:

736402215

result:

ok single line: '736402215'

Test #57:

score: 0
Accepted
time: 232ms
memory: 53492kb

input:

999997
0 0 0 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 0 1 0 0 0 0 1 0...

output:

917421915

result:

ok single line: '917421915'

Test #58:

score: 0
Accepted
time: 248ms
memory: 54996kb

input:

999995
0 1 1 0 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1...

output:

127400055

result:

ok single line: '127400055'

Test #59:

score: 0
Accepted
time: 244ms
memory: 53324kb

input:

999991
1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1 0 1...

output:

777055294

result:

ok single line: '777055294'

Test #60:

score: 0
Accepted
time: 238ms
memory: 58324kb

input:

999992
0 1 0 0 1 1 0 1 1 0 0 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1...

output:

247501360

result:

ok single line: '247501360'

Test #61:

score: 0
Accepted
time: 229ms
memory: 53236kb

input:

999996
0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 0 0...

output:

302782056

result:

ok single line: '302782056'

Test #62:

score: 0
Accepted
time: 236ms
memory: 58500kb

input:

999993
1 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 0 1 1 1 1 1 0...

output:

579340891

result:

ok single line: '579340891'

Test #63:

score: 0
Accepted
time: 239ms
memory: 58484kb

input:

999999
1 1 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 0 0 1...

output:

73797103

result:

ok single line: '73797103'

Test #64:

score: 0
Accepted
time: 245ms
memory: 58804kb

input:

999997
0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 0 1 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0...

output:

804342804

result:

ok single line: '804342804'

Test #65:

score: 0
Accepted
time: 238ms
memory: 58760kb

input:

999998
1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 1 0 1...

output:

977813530

result:

ok single line: '977813530'

Test #66:

score: 0
Accepted
time: 229ms
memory: 53412kb

input:

999990
0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 1 1 1 1...

output:

881014254

result:

ok single line: '881014254'

Test #67:

score: 0
Accepted
time: 246ms
memory: 58708kb

input:

999999
1 0 1 0 1 1 1 0 1 1 0 1 0 1 0 1 1 1 1 1 0 0 1 1 1 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 0 1 1 0 0 1...

output:

240682594

result:

ok single line: '240682594'

Test #68:

score: 0
Accepted
time: 238ms
memory: 56176kb

input:

999998
1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0...

output:

624659184

result:

ok single line: '624659184'

Test #69:

score: 0
Accepted
time: 233ms
memory: 55768kb

input:

999999
1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 0 1 0 1 1 1 0 0 0 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0...

output:

210494334

result:

ok single line: '210494334'

Test #70:

score: 0
Accepted
time: 250ms
memory: 56940kb

input:

999992
1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 1...

output:

709548602

result:

ok single line: '709548602'

Test #71:

score: 0
Accepted
time: 237ms
memory: 56236kb

input:

999990
0 1 1 1 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1...

output:

114312429

result:

ok single line: '114312429'

Test #72:

score: 0
Accepted
time: 238ms
memory: 53032kb

input:

999998
0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 1...

output:

89107166

result:

ok single line: '89107166'

Test #73:

score: 0
Accepted
time: 241ms
memory: 53092kb

input:

1000000
0 1 1 0 1 1 0 1 1 0 0 1 1 0 0 0 0 1 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 ...

output:

874029200

result:

ok single line: '874029200'

Test #74:

score: 0
Accepted
time: 246ms
memory: 54896kb

input:

999996
1 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0...

output:

125673594

result:

ok single line: '125673594'

Test #75:

score: 0
Accepted
time: 250ms
memory: 55000kb

input:

999992
0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 0 1 0...

output:

781214720

result:

ok single line: '781214720'

Test #76:

score: 0
Accepted
time: 236ms
memory: 56016kb

input:

999999
1 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 0...

output:

744043904

result:

ok single line: '744043904'

Test #77:

score: 0
Accepted
time: 242ms
memory: 58360kb

input:

999994
0 1 0 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 0...

output:

423677816

result:

ok single line: '423677816'

Test #78:

score: 0
Accepted
time: 235ms
memory: 53612kb

input:

999993
0 0 1 1 1 0 0 0 1 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 0...

output:

880070674

result:

ok single line: '880070674'

Test #79:

score: 0
Accepted
time: 239ms
memory: 58460kb

input:

1000000
0 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 0 0 0 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 ...

output:

423491451

result:

ok single line: '423491451'

Test #80:

score: 0
Accepted
time: 246ms
memory: 55100kb

input:

999996
1 0 1 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 0 0 1 0 1 1 0...

output:

185978851

result:

ok single line: '185978851'

Test #81:

score: 0
Accepted
time: 230ms
memory: 56096kb

input:

1000000
1 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 0 ...

output:

129937968

result:

ok single line: '129937968'

Test #82:

score: 0
Accepted
time: 240ms
memory: 53132kb

input:

999991
1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0...

output:

940551534

result:

ok single line: '940551534'

Test #83:

score: 0
Accepted
time: 236ms
memory: 58296kb

input:

999995
0 0 0 0 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0 0 0 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 1 1...

output:

403892921

result:

ok single line: '403892921'

Test #84:

score: 0
Accepted
time: 243ms
memory: 53392kb

input:

999995
0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0...

output:

383027708

result:

ok single line: '383027708'

Test #85:

score: 0
Accepted
time: 245ms
memory: 53528kb

input:

999992
0 1 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 1 0 1 0 0...

output:

459981971

result:

ok single line: '459981971'

Test #86:

score: 0
Accepted
time: 228ms
memory: 53324kb

input:

999992
1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0...

output:

450533286

result:

ok single line: '450533286'

Test #87:

score: 0
Accepted
time: 244ms
memory: 52836kb

input:

999991
1 1 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0...

output:

193486317

result:

ok single line: '193486317'

Test #88:

score: 0
Accepted
time: 230ms
memory: 58640kb

input:

999994
0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0...

output:

578170758

result:

ok single line: '578170758'

Test #89:

score: 0
Accepted
time: 237ms
memory: 58320kb

input:

999991
0 0 0 1 0 0 1 0 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 1 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 1 0 1 0 1 1...

output:

217478828

result:

ok single line: '217478828'

Test #90:

score: 0
Accepted
time: 242ms
memory: 58512kb

input:

999990
1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0...

output:

642747653

result:

ok single line: '642747653'

Test #91:

score: 0
Accepted
time: 246ms
memory: 53360kb

input:

1000000
0 1 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 ...

output:

43492410

result:

ok single line: '43492410'

Test #92:

score: 0
Accepted
time: 245ms
memory: 54848kb

input:

999991
1 0 1 1 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0...

output:

729065332

result:

ok single line: '729065332'

Test #93:

score: 0
Accepted
time: 237ms
memory: 53144kb

input:

999994
0 1 0 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1...

output:

106580674

result:

ok single line: '106580674'

Test #94:

score: 0
Accepted
time: 237ms
memory: 55808kb

input:

999997
1 1 0 0 1 1 0 0 1 0 1 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 1 0 1 0 0 0 1 0 0 1 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 0 1 1 0 1 1...

output:

859248878

result:

ok single line: '859248878'

Test #95:

score: 0
Accepted
time: 251ms
memory: 58504kb

input:

1000000
1 1 0 1 1 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 1 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 1 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 1 0 1 1 0 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 ...

output:

800661291

result:

ok single line: '800661291'

Test #96:

score: 0
Accepted
time: 244ms
memory: 58108kb

input:

999998
0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 1 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 1 1 0 1 1 1 0 1...

output:

712300850

result:

ok single line: '712300850'

Test #97:

score: 0
Accepted
time: 239ms
memory: 58828kb

input:

999992
0 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1...

output:

276954336

result:

ok single line: '276954336'

Test #98:

score: 0
Accepted
time: 246ms
memory: 58636kb

input:

999990
1 0 0 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 1 0 0 1...

output:

512990818

result:

ok single line: '512990818'

Test #99:

score: 0
Accepted
time: 233ms
memory: 55736kb

input:

999997
0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1...

output:

727772610

result:

ok single line: '727772610'

Test #100:

score: 0
Accepted
time: 245ms
memory: 54788kb

input:

999991
0 0 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0...

output:

913053479

result:

ok single line: '913053479'