QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#99721#6355. 518MichaelAC ✓3390ms35960kbC++143.4kb2023-04-23 15:44:392023-04-23 15:44:43

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-23 15:44:43]
  • 评测
  • 测评结果:AC
  • 用时:3390ms
  • 内存:35960kb
  • [2023-04-23 15:44:39]
  • 提交

answer

#include<bits/stdc++.h>
#define LL long long
using namespace std;
const int MxN=200002,MxV=MxN*2+20;
int n,s,s1=0,t,i0=0,i1=1,res=0;
LL ans=0;
int a[MxN],id[MxN],cnt[MxN];
typedef pair<int,int> P;
P p;
vector<P> tmp;
vector<P> vec[2][MxV];
template<class T>void read(T &x)
{
	x=0;int f=0;char ch=getchar();
	while(ch<'0' || ch>'9')f|=(ch=='-'),ch=getchar();
	while(ch>='0' && ch<='9')x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
	x=f? -x:x;return ;
}
inline bool cmp(int x,int y)
{
	return cnt[x]*(x-res)<cnt[y]*(y-res);
}
inline void clear()
{
	for(int i=0;i<=s1;++i)vec[i1][i].clear();
}
inline vector<P> merge(vector<P> &A,vector<P> &B)
{
	if(!A.size())return B;
	if(!B.size())return A;
	vector<P> C;
	int tA=0,tB=0;
	P p;
	for(;tA<A.size() && tB<B.size();)
	{
		if(A[tA].first<B[tB].first)p=A[tA],++tA;
		else p=B[tB],++tB;
		f1:
		if(tA<A.size() && A[tA].first<=p.second)
		{
			p.second=max(p.second,A[tA].second),++tA;
			goto f1;
		}
		if(tB<B.size() && B[tB].first<=p.second)
		{
			p.second=max(p.second,B[tB].second),++tB;
			goto f1;
		}
		C.push_back(p);
	}
	for(;tA<A.size();)
	{
		p=A[tA],++tA;
		f2:
		if(tA<A.size() && A[tA].first<=p.second)
		{
			p.second=max(p.second,A[tA].second),++tA;
			goto f2;
		}
		C.push_back(p);
	}
	for(;tB<B.size();)
	{
		p=B[tB],++tB;
		f3:
		if(tB<B.size() && B[tB].first<=p.second)
		{
			p.second=max(p.second,B[tB].second),++tB;
			goto f3;
		}
		C.push_back(p);
	}
	return C;
}
inline void print()
{
	printf("vec:\n");
	for(int i=0;i<=s1;++i)if(vec[i0][i].size())
	{
		printf(" %d:",i);
		for(int j=0;j<vec[i0][i].size();++j)printf("(%d,%d)%c",vec[i0][i][j].first,vec[i0][i][j].second,j+1==vec[i0][i].size()? '\n':' ');
	}
}
inline void RSH(vector<P> &vec,int o)
{
	for(int i=0;i<vec.size();++i)vec[i].first+=o,vec[i].second+=o;
}
inline void solve1()
{
	int a=abs(p.first),b=p.second,sgn=(p.first<0? -1:1);
	//printf("a:%d b:%d sgn:%d\n",a,b,sgn);
	clear();
	if(sgn>0)s1+=a*b;
	for(int i=0;i<a;++i)
	{
		int tot=(s1-i)/a;
		for(int j=i;j<=s1;j+=a)
		{
			int x=j/a;
			RSH(vec[i0][j],-x*sgn);
		}
		for(int j=0;j<=tot;++j)
		{
			if(!(j%b))tmp=vec[i0][j*a+i];
			else tmp=merge(tmp,vec[i0][j*a+i]);
			if(sgn>0)vec[i1][j*a+i]=tmp;
			else if((j-b)*a+i>=0)vec[i1][(j-b)*a+i]=tmp;
		}
		if(sgn<0)for(int j=tot-b+1;j<=tot && j%b;++j)if(j*a+i>=0)vec[i1][j*a+i]=tmp;
		tmp.clear();
		for(int j=tot;j>=0;--j)
		{
			if(!((j+1)%b))tmp=vec[i0][j*a+i];
			else tmp=merge(tmp,vec[i0][j*a+i]);
			if(sgn>0)
			{
				if((j+b)*a+i<=s1)vec[i1][(j+b)*a+i]=merge(vec[i1][(j+b)*a+i],tmp);
			}
			else vec[i1][j*a+i]=merge(vec[i1][j*a+i],tmp);
		}
	}
	for(int i=0;i<=s1;++i)RSH(vec[i1][i],(i/a)*sgn);
	i0^=1,i1^=1;
}
inline void solve3()
{
	for(int i=s1;~i;--i)vec[i0][i+p.second]=vec[i0][i];
	for(int i=p.second-1;~i;--i)vec[i0][i].clear();
	s1+=p.second,solve1();
}
int main()
{
	//freopen("L.in","r",stdin);
	read(n),read(s);
	for(int i=1;i<=n;++i)read(a[i]),res+=(!a[i])-(a[i]==1),++cnt[a[i]];
	for(int i=0;i<=s;++i)id[i]=i;
	res=(res>=0? 0:1),sort(id,id+s+1,cmp),t=cnt[res],vec[0][0].push_back(P(0,t));
	for(int i=0;i<=s;++i)if(cnt[id[i]])
	{
		if(id[i]-res<=0)continue;
		p=P(id[i]-res,cnt[id[i]]),solve1();
	}
	if(id[0]-res<0)p=P(id[0]-res,cnt[id[0]]),solve3();
	for(int i=0;i<=s1;++i)for(int j=0;j<vec[i0][i].size();++j)ans+=vec[i0][i][j].second-vec[i0][i][j].first+1;
	return 0&printf("%lld",ans);
}

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 22344kb

input:

7 9
0 0 0 1 1 2 5

output:

42

result:

ok 1 number(s): "42"

Test #2:

score: 0
Accepted
time: 1ms
memory: 23448kb

input:

10 33
9 9 8 1 1 1 1 1 1 1

output:

48

result:

ok 1 number(s): "48"

Test #3:

score: 0
Accepted
time: 4ms
memory: 22980kb

input:

10 14
2 4 4 1 0 1 0 1 0 1

output:

81

result:

ok 1 number(s): "81"

Test #4:

score: 0
Accepted
time: 4ms
memory: 22760kb

input:

10 14
3 5 3 0 1 0 1 0 1 0

output:

87

result:

ok 1 number(s): "87"

Test #5:

score: 0
Accepted
time: 1ms
memory: 22956kb

input:

40 50
1 1 1 1 3 3 0 3 1 1 0 0 2 1 0 0 1 0 0 2 7 1 2 1 3 0 2 2 3 1 1 0 0 2 0 1 1 0 1 1

output:

1067

result:

ok 1 number(s): "1067"

Test #6:

score: 0
Accepted
time: 1ms
memory: 24036kb

input:

1200 1000
1 1 2 3 0 1 0 0 1 1 0 2 3 0 1 2 0 0 1 0 4 1 1 2 1 1 0 0 1 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 0 1 0 0 1 1 0 1 2 0 4 0 3 1 6 0 1 1 0 0 0 0 4 0 0 0 0 0 0 1 0 0 1 7 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 3 0 1 0 1 0 0 1 1 2 2 0 1 1 0 0 1 4 1 2 0 0 0 3 0 0 2 1 0 2 0 0 0 1 1 0 0 2 0 0 0 0 1 1 0 1 0 1 6 1 1 ...

output:

737899

result:

ok 1 number(s): "737899"

Test #7:

score: 0
Accepted
time: 13ms
memory: 23376kb

input:

12000 10000
1 1 0 0 1 0 2 1 3 0 0 1 0 3 1 1 0 1 1 1 1 1 2 1 0 1 2 1 0 1 2 0 5 1 1 1 0 2 0 1 0 1 0 3 2 0 1 0 1 1 2 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 4 0 1 3 1 0 0 1 0 1 2 1 0 0 1 1 0 2 1 1 0 1 0 1 0 0 2 1 1 3 0 1 1 1 0 0 0 1 1 1 0 3 0 0 0 2 0 0 0 1 0 2 0 1 1 1 0 0 1 0 1 0 2 0 0 0 0 0 0 0 1 0 1 0 0 4 1 ...

output:

73685347

result:

ok 1 number(s): "73685347"

Test #8:

score: 0
Accepted
time: 15ms
memory: 25664kb

input:

36000 30000
0 3 4 1 2 1 1 0 0 1 1 0 1 0 2 1 0 0 0 0 2 1 0 2 0 0 0 0 0 1 1 4 1 4 0 0 2 0 0 0 1 1 0 0 1 1 0 1 0 0 0 0 1 1 0 3 1 1 1 0 0 0 0 0 0 1 2 0 2 3 0 0 0 0 3 1 0 0 0 1 0 1 2 0 0 2 0 1 0 0 2 1 1 0 3 1 6 0 0 1 1 2 0 1 2 0 0 1 0 1 1 0 0 1 0 0 0 1 0 2 0 1 1 1 0 0 5 2 0 5 1 0 0 0 0 1 1 1 8 0 1 1 0 1 ...

output:

658813003

result:

ok 1 number(s): "658813003"

Test #9:

score: 0
Accepted
time: 67ms
memory: 34700kb

input:

200000 200000
0 1 1 1 1 1 0 1 0 3 1 0 0 1 1 0 1 1 1 2 3 0 1 0 1 0 2 5 0 1 1 4 1 1 0 0 0 0 0 0 2 1 0 0 2 1 1 2 0 3 0 1 3 0 1 1 1 0 1 0 1 2 0 1 1 0 0 2 2 1 0 1 1 2 4 1 0 2 0 5 1 2 0 0 1 0 2 3 1 0 1 1 1 1 0 0 0 5 1 0 0 1 2 1 1 0 0 0 1 0 0 1 2 1 0 0 2 1 2 3 0 0 3 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 0 1 1 1 ...

output:

23477878007

result:

ok 1 number(s): "23477878007"

Test #10:

score: 0
Accepted
time: 70ms
memory: 32980kb

input:

140000 200000
0 1 3 0 0 0 0 0 1 1 1 1 4 1 1 8 1 1 0 3 0 0 0 1 5 0 1 1 0 4 1 0 2 1 0 0 1 1 1 0 2 4 0 2 0 3 0 2 1 2 1 2 1 1 1 2 1 0 0 1 1 1 1 0 1 0 9 1 5 1 1 4 0 1 1 4 1 1 1 1 3 1 1 1 1 4 1 1 0 3 1 0 1 3 1 1 3 1 1 3 4 1 1 0 0 1 1 0 1 4 1 1 1 1 0 1 1 0 0 2 0 6 5 1 1 3 2 4 0 1 4 1 1 1 1 2 0 0 2 1 5 1 1 ...

output:

15405328745

result:

ok 1 number(s): "15405328745"

Test #11:

score: 0
Accepted
time: 134ms
memory: 32688kb

input:

90000 200000
3 1 1 1 4 5 1 1 1 1 10 1 3 2 1 1 7 8 1 1 8 5 1 1 6 1 1 1 0 1 4 5 0 5 1 21 1 4 0 2 4 3 1 6 7 3 1 1 1 0 1 2 5 1 1 1 1 2 0 8 0 1 2 4 0 0 11 1 2 2 2 1 28 0 1 1 2 1 2 1 11 1 5 9 1 1 1 1 1 2 1 1 1 1 2 1 0 4 1 1 2 1 1 1 4 1 5 1 1 5 4 1 5 1 0 1 1 1 1 0 1 2 4 1 1 1 1 1 1 1 1 1 2 1 1 3 1 2 1 1 0 ...

output:

9895248405

result:

ok 1 number(s): "9895248405"

Test #12:

score: 0
Accepted
time: 173ms
memory: 32652kb

input:

80000 200000
1 5 1 1 1 3 1 0 3 11 1 5 1 2 1 21 4 13 1 1 1 1 0 1 1 1 2 1 13 2 1 4 5 0 1 1 6 3 1 1 1 1 1 1 8 1 1 6 3 1 1 1 1 8 1 2 0 1 1 1 1 1 1 1 17 1 1 1 6 1 1 1 11 1 15 5 1 1 1 1 1 2 8 0 0 1 1 2 3 14 1 1 3 18 1 1 1 3 1 1 1 1 1 1 4 0 9 1 0 1 1 1 0 4 1 2 1 1 3 2 3 21 3 2 11 1 1 0 1 29 1 1 2 1 5 6 1 5...

output:

8980751457

result:

ok 1 number(s): "8980751457"

Test #13:

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

input:

70000 200000
4 0 0 2 5 1 0 1 4 1 1 1 1 3 12 1 1 1 0 1 1 6 5 1 1 1 1 1 0 1 1 1 16 1 1 1 1 1 10 1 2 1 1 0 1 7 1 0 3 3 1 1 1 1 2 2 1 1 7 1 1 2 1 1 1 1 14 1 6 1 1 12 1 1 1 1 1 1 1 7 1 1 1 7 1 1 1 1 2 1 0 1 13 1 0 1 1 1 3 1 3 1 0 1 4 1 1 1 1 3 1 13 0 1 1 7 0 0 1 1 12 3 1 1 3 1 1 1 6 1 1 1 1 1 1 1 1 10 1 ...

output:

8196878191

result:

ok 1 number(s): "8196878191"

Test #14:

score: 0
Accepted
time: 378ms
memory: 33124kb

input:

60000 200000
1 1 1 1 25 1 4 1 1 1 1 1 10 2 12 1 1 1 1 1 12 7 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 2 1 12 1 1 1 1 0 1 1 3 1 6 1 6 1 1 2 29 1 0 1 13 3 1 1 0 1 1 5 3 1 1 1 1 1 1 7 1 0 9 1 7 1 1 12 4 1 1 1 23 1 4 24 1 36 1 23 1 18 29 1 1 11 1 1 1 1 1 1 0 1 1 2 13 1 32 1 3 1 0 1 1 1 1 5 23 9 1 1 1 8 12 14 1 1 1...

output:

7466221263

result:

ok 1 number(s): "7466221263"

Test #15:

score: 0
Accepted
time: 980ms
memory: 33620kb

input:

50000 200000
1 1 87 20 1 1 1 1 1 1 1 1 41 1 1 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 5 1 1 1 1 1 1 1 17 1 1 1 1 1 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 17 18 1 1 1 1 1 13 1 1 1 1 1 32 1 1 7 1 10 1 1 1 1 14 20 1 1 1 1 1 3 23 27 1 1 1 9 1 1 1 1 4 8 1 12 1 1 1 53 1 1 1 1 26 1 1 1 1 1 1 1 1 1 1 1...

output:

6870036861

result:

ok 1 number(s): "6870036861"

Test #16:

score: 0
Accepted
time: 1724ms
memory: 33820kb

input:

45000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 26 1 1 10 1 1 1 1 1 1 1 1 1 1 1 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 26 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 25 1 1 1 1...

output:

6615361583

result:

ok 1 number(s): "6615361583"

Test #17:

score: 0
Accepted
time: 1842ms
memory: 33924kb

input:

44000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 16 1 1 1 1 104 1 1 1 1 1 1 50 23 1 1 1 1 1 1 23 1 18 1 1 1 1 1 1 1 28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 12 1 1 1 1 1 1 1 49 1 1 1 1 1 1 1 1 1 1 1 1 53 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 76 1 1 1 1 1 1 1 1 1 149 1 1 1 1 1 0 1 1...

output:

6575348967

result:

ok 1 number(s): "6575348967"

Test #18:

score: 0
Accepted
time: 2337ms
memory: 33852kb

input:

43000 200000
1 53 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 1 1 1 1 104 1 1 1 1 1 1 1 1 20 1 1 1 1 1 1 1 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 13 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 65 1 1 1 1 138 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 62 1 1 1 1...

output:

6527389951

result:

ok 1 number(s): "6527389951"

Test #19:

score: 0
Accepted
time: 3209ms
memory: 33960kb

input:

42000 200000
1 1 1 1 1 1 1 1 23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 239 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 58 1 ...

output:

6480594507

result:

ok 1 number(s): "6480594507"

Test #20:

score: 0
Accepted
time: 2817ms
memory: 34020kb

input:

41000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 43 1 1 1 1 1 1 1 1 1 85 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 58 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 152 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6440851777

result:

ok 1 number(s): "6440851777"

Test #21:

score: 0
Accepted
time: 2269ms
memory: 33648kb

input:

40800 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 398 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6433344943

result:

ok 1 number(s): "6433344943"

Test #22:

score: 0
Accepted
time: 1716ms
memory: 34068kb

input:

40500 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 151 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6419515129

result:

ok 1 number(s): "6419515129"

Test #23:

score: 0
Accepted
time: 845ms
memory: 33248kb

input:

40300 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6413828837

result:

ok 1 number(s): "6413828837"

Test #24:

score: 0
Accepted
time: 655ms
memory: 33596kb

input:

40200 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6406509705

result:

ok 1 number(s): "6406509705"

Test #25:

score: 0
Accepted
time: 305ms
memory: 33796kb

input:

40100 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 353 1 1 1 1 1 1 1 1...

output:

6394891119

result:

ok 1 number(s): "6394891119"

Test #26:

score: 0
Accepted
time: 275ms
memory: 33740kb

input:

40080 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6353150219

result:

ok 1 number(s): "6353150219"

Test #27:

score: 0
Accepted
time: 201ms
memory: 33248kb

input:

40060 200000
1 1 1 1 1 1 1 1 1 1 1992 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6324862643

result:

ok 1 number(s): "6324862643"

Test #28:

score: 0
Accepted
time: 102ms
memory: 32328kb

input:

40030 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6148794579

result:

ok 1 number(s): "6148794579"

Test #29:

score: 0
Accepted
time: 66ms
memory: 31096kb

input:

40020 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

4915254493

result:

ok 1 number(s): "4915254493"

Test #30:

score: 0
Accepted
time: 24ms
memory: 24288kb

input:

40010 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

40961024

result:

ok 1 number(s): "40961024"

Test #31:

score: 0
Accepted
time: 20ms
memory: 24068kb

input:

40005 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

1280032

result:

ok 1 number(s): "1280032"

Test #32:

score: 0
Accepted
time: 19ms
memory: 24196kb

input:

40003 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

320008

result:

ok 1 number(s): "320008"

Test #33:

score: 0
Accepted
time: 10ms
memory: 24076kb

input:

40002 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

160004

result:

ok 1 number(s): "160004"

Test #34:

score: 0
Accepted
time: 10ms
memory: 24036kb

input:

40001 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

80002

result:

ok 1 number(s): "80002"

Test #35:

score: 0
Accepted
time: 74ms
memory: 32916kb

input:

150000 200000
4 1 2 1 3 1 1 1 0 1 2 1 1 3 1 1 1 1 0 4 1 1 3 1 1 3 1 0 2 1 0 1 0 0 1 0 3 6 1 0 3 0 1 3 2 5 0 0 0 1 3 0 2 1 5 0 1 1 1 2 1 1 0 1 1 1 0 0 0 3 1 1 6 3 0 0 3 1 0 3 1 5 0 1 2 1 5 1 3 3 2 0 0 1 2 5 0 0 0 1 1 1 1 0 3 4 2 0 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 1 3 1 1 1 1 2 0 1 1 1 0 1 1 1 0 1 5 1 2 ...

output:

16598916037

result:

ok 1 number(s): "16598916037"

Test #36:

score: 0
Accepted
time: 68ms
memory: 32824kb

input:

160000 200000
2 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 4 0 1 0 3 0 0 2 1 2 1 4 1 1 1 1 2 1 1 6 1 1 3 0 0 2 0 0 1 0 0 0 1 1 1 1 0 8 4 0 4 1 1 1 0 0 1 1 1 1 1 1 3 1 5 0 5 4 1 1 0 1 2 0 0 1 0 4 4 3 1 1 0 1 0 1 1 0 2 1 3 1 4 5 0 0 0 0 1 1 1 3 1 1 0 3 1 3 0 1 1 2 0 3 1 2 5 2 3 1 3 0 0 1 0 0 1 4 1 0 1 4 3 0 1 1 0 ...

output:

17975355171

result:

ok 1 number(s): "17975355171"

Test #37:

score: 0
Accepted
time: 56ms
memory: 33220kb

input:

170000 200000
5 1 0 0 7 3 1 0 1 0 0 1 1 2 5 0 0 0 1 1 0 2 1 0 1 0 1 4 0 1 2 2 0 1 1 1 1 3 0 2 3 0 2 1 1 1 1 1 0 1 0 1 0 3 1 1 0 0 1 0 1 1 1 0 0 3 1 1 0 2 1 0 0 0 0 0 2 1 0 1 1 0 1 1 1 2 0 1 1 1 0 1 0 0 6 1 3 1 8 1 0 0 3 0 1 3 0 0 3 1 1 1 0 1 0 1 1 1 1 1 0 0 2 0 0 1 1 1 4 0 0 1 0 0 0 0 0 1 0 1 1 4 0 ...

output:

19302687621

result:

ok 1 number(s): "19302687621"

Test #38:

score: 0
Accepted
time: 54ms
memory: 33480kb

input:

180000 200000
1 1 0 1 1 1 0 4 2 0 1 1 1 5 0 0 0 1 0 3 1 1 1 14 0 0 1 0 0 0 0 0 4 0 1 3 2 2 3 0 1 0 1 2 4 4 6 0 1 0 1 1 0 2 0 0 3 1 7 3 1 1 2 1 0 1 0 0 1 1 1 0 2 1 0 1 1 1 1 1 2 0 1 2 1 1 0 1 1 1 2 1 1 1 0 1 1 2 1 1 0 1 1 0 1 0 1 1 0 1 2 2 1 0 1 1 1 0 0 2 0 1 0 1 0 6 0 1 2 0 0 2 1 0 0 3 1 1 1 0 7 1 1...

output:

20620443627

result:

ok 1 number(s): "20620443627"

Test #39:

score: 0
Accepted
time: 64ms
memory: 33972kb

input:

190000 200000
0 1 2 0 0 1 1 0 1 0 0 0 0 3 0 5 0 0 1 2 1 0 1 0 0 2 0 1 1 0 0 1 1 6 2 2 1 0 2 1 3 1 1 1 1 0 1 1 2 0 1 0 0 1 1 0 1 2 1 0 0 1 1 0 2 0 1 2 1 0 1 0 1 1 1 0 0 1 1 0 2 0 1 0 0 1 1 0 0 0 0 1 0 2 0 0 2 1 0 5 0 3 0 0 1 2 0 0 1 2 0 1 0 2 3 1 1 0 1 3 1 1 1 0 0 0 0 5 0 2 1 0 1 0 1 1 0 2 5 1 0 3 4 ...

output:

22057165057

result:

ok 1 number(s): "22057165057"

Test #40:

score: 0
Accepted
time: 60ms
memory: 34596kb

input:

199000 200000
1 0 0 1 1 0 1 0 1 4 1 1 0 0 0 0 0 1 0 0 7 0 3 1 3 0 0 1 1 3 0 4 1 1 0 1 2 1 1 4 2 5 1 0 0 0 0 0 2 5 2 0 1 1 1 1 0 1 0 2 1 1 1 3 1 0 0 1 1 1 1 1 0 2 2 0 1 1 1 0 2 1 1 1 1 0 2 2 1 0 0 0 0 0 5 1 0 0 0 1 0 0 1 0 0 1 0 0 1 2 1 1 1 0 0 1 0 1 1 0 3 1 1 1 1 0 1 0 0 3 4 0 0 0 1 0 0 2 2 0 1 2 2 ...

output:

23338533811

result:

ok 1 number(s): "23338533811"

Test #41:

score: 0
Accepted
time: 57ms
memory: 34272kb

input:

198000 200000
1 1 0 1 2 1 4 0 0 0 5 0 0 2 0 1 0 1 0 1 2 1 3 2 1 3 2 0 2 0 0 1 1 1 0 1 2 1 0 1 0 0 1 1 2 3 1 0 1 1 0 6 3 0 1 0 0 1 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 1 2 1 0 1 0 2 5 1 1 0 1 1 1 0 0 1 2 1 1 0 0 0 0 2 1 3 0 1 0 4 2 0 0 2 2 2 1 1 0 0 2 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 2 ...

output:

23205443235

result:

ok 1 number(s): "23205443235"

Test #42:

score: 0
Accepted
time: 59ms
memory: 34560kb

input:

197000 200000
1 0 1 1 0 0 3 0 0 1 2 1 0 0 1 1 1 1 1 1 1 3 2 1 1 1 1 0 0 0 1 4 1 1 3 1 0 3 1 1 2 0 0 1 0 0 0 0 1 0 0 1 0 1 0 2 3 0 1 1 0 2 1 2 1 1 1 1 1 0 1 0 1 4 1 0 1 1 1 0 1 0 1 0 1 2 1 1 0 1 1 2 1 0 1 1 0 1 0 2 1 0 1 0 2 1 0 1 0 0 1 0 0 2 0 0 3 1 0 0 1 6 1 0 5 0 0 4 0 0 1 2 3 0 0 0 2 1 1 0 0 0 0 ...

output:

23008514485

result:

ok 1 number(s): "23008514485"

Test #43:

score: 0
Accepted
time: 64ms
memory: 34556kb

input:

196000 200000
2 1 1 1 0 2 1 2 0 1 2 0 3 1 0 0 0 1 2 1 0 1 0 1 0 0 0 5 0 1 3 0 5 1 1 3 5 1 1 1 0 0 0 4 0 0 1 1 4 1 1 1 0 0 0 1 5 1 0 0 1 5 1 4 0 2 2 3 1 0 0 0 2 1 4 0 1 3 0 1 1 2 0 0 0 2 0 2 1 0 3 1 0 0 0 1 1 1 1 1 0 1 0 0 0 1 0 1 4 1 0 0 0 1 0 0 0 0 4 1 0 1 1 0 1 1 1 1 0 1 0 1 3 0 0 0 0 1 0 1 2 1 0 ...

output:

22830578635

result:

ok 1 number(s): "22830578635"

Test #44:

score: 0
Accepted
time: 59ms
memory: 34528kb

input:

195000 200000
0 1 1 1 0 0 0 2 0 1 0 0 0 3 0 3 1 0 1 0 0 1 4 0 0 0 1 1 5 0 0 3 2 1 1 1 2 0 1 1 0 0 3 0 1 1 0 1 0 1 0 4 1 1 1 0 1 1 1 1 1 0 1 2 0 0 0 1 0 4 1 2 0 1 0 0 1 4 1 0 1 2 1 1 2 1 1 0 1 1 4 1 0 1 1 0 2 0 0 1 2 0 0 5 0 1 1 0 0 0 2 0 0 2 0 4 1 0 1 4 0 3 1 0 4 0 2 0 1 1 0 0 1 0 1 1 1 0 4 1 3 1 1 ...

output:

22728530185

result:

ok 1 number(s): "22728530185"

Test #45:

score: 0
Accepted
time: 83ms
memory: 32556kb

input:

130000 200000
1 1 1 6 0 1 0 3 1 2 1 0 1 2 1 1 4 1 1 1 1 1 3 0 4 1 1 4 1 7 1 1 0 1 2 1 1 1 4 3 0 2 0 1 0 3 1 1 8 4 1 1 1 0 0 1 1 1 0 7 1 3 1 0 1 1 1 0 1 0 2 0 9 1 1 1 1 3 4 1 3 2 1 2 1 0 0 1 3 7 1 0 0 1 1 2 0 0 1 1 1 0 0 4 1 5 2 1 1 8 1 0 0 1 2 1 1 0 1 1 2 3 9 1 1 4 3 2 2 1 1 0 1 1 1 1 4 5 4 1 1 0 0 ...

output:

14134819093

result:

ok 1 number(s): "14134819093"

Test #46:

score: 0
Accepted
time: 94ms
memory: 32188kb

input:

120000 200000
4 1 1 4 4 2 0 4 1 1 0 1 4 3 1 8 0 1 1 0 0 0 3 3 0 1 1 1 1 1 0 2 3 1 9 0 2 3 2 0 2 1 16 1 7 0 1 1 1 1 1 3 2 1 5 1 1 2 3 4 1 1 6 1 0 1 0 3 1 1 0 1 1 1 3 1 3 1 1 0 1 0 3 8 1 3 0 1 13 0 1 0 1 0 2 1 1 1 1 0 4 0 1 0 1 2 3 1 4 0 1 2 0 1 0 1 1 5 3 0 2 1 0 1 3 1 0 1 1 0 1 4 1 2 1 1 0 4 1 0 1 0 ...

output:

13048112685

result:

ok 1 number(s): "13048112685"

Test #47:

score: 0
Accepted
time: 100ms
memory: 32572kb

input:

110000 200000
1 1 8 4 8 1 0 0 1 3 1 1 9 0 1 5 1 1 1 3 3 1 16 4 1 1 4 0 0 5 0 0 2 1 0 0 4 1 1 1 3 2 1 1 1 1 2 1 5 3 1 5 1 5 0 3 2 1 3 1 5 1 1 0 1 1 1 5 1 0 0 1 0 1 1 0 1 1 1 1 2 1 1 2 1 5 1 0 0 2 0 2 1 1 1 6 1 1 8 1 0 2 4 1 4 1 3 1 1 1 1 1 1 1 1 1 3 1 1 0 1 1 2 1 1 1 0 1 1 1 6 2 1 5 1 5 1 1 1 1 1 1 0...

output:

11875762941

result:

ok 1 number(s): "11875762941"

Test #48:

score: 0
Accepted
time: 117ms
memory: 32540kb

input:

100000 200000
0 2 1 5 1 0 1 1 1 1 1 3 0 4 8 1 1 1 1 0 0 1 1 1 1 1 4 0 4 1 1 5 6 2 1 1 1 1 1 2 1 1 1 3 1 3 1 0 1 0 6 1 1 1 4 1 1 5 8 0 1 6 1 1 1 0 4 9 7 1 10 1 1 3 4 1 1 1 1 3 3 0 2 0 1 1 2 1 1 1 1 1 1 1 0 0 4 3 2 2 1 5 1 2 1 1 10 1 1 1 1 1 1 3 0 1 1 1 1 1 4 1 1 0 0 1 4 1 5 5 1 5 0 1 3 2 1 0 4 9 3 1 ...

output:

10871306605

result:

ok 1 number(s): "10871306605"

Test #49:

score: 0
Accepted
time: 11ms
memory: 24056kb

input:

40001 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

80002

result:

ok 1 number(s): "80002"

Test #50:

score: 0
Accepted
time: 13ms
memory: 24080kb

input:

40002 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

160004

result:

ok 1 number(s): "160004"

Test #51:

score: 0
Accepted
time: 23ms
memory: 24280kb

input:

40005 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

1280032

result:

ok 1 number(s): "1280032"

Test #52:

score: 0
Accepted
time: 26ms
memory: 23552kb

input:

40010 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

40961024

result:

ok 1 number(s): "40961024"

Test #53:

score: 0
Accepted
time: 65ms
memory: 30368kb

input:

40020 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

4626623607

result:

ok 1 number(s): "4626623607"

Test #54:

score: 0
Accepted
time: 130ms
memory: 33412kb

input:

40040 200000
1 1 1 1 1 1 7667 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2139 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6244348043

result:

ok 1 number(s): "6244348043"

Test #55:

score: 0
Accepted
time: 202ms
memory: 33540kb

input:

40060 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6329597379

result:

ok 1 number(s): "6329597379"

Test #56:

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

input:

40080 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6393987891

result:

ok 1 number(s): "6393987891"

Test #57:

score: 0
Accepted
time: 303ms
memory: 33836kb

input:

40100 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6393848161

result:

ok 1 number(s): "6393848161"

Test #58:

score: 0
Accepted
time: 600ms
memory: 33592kb

input:

40200 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6404886465

result:

ok 1 number(s): "6404886465"

Test #59:

score: 0
Accepted
time: 1183ms
memory: 33484kb

input:

40400 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 420 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 563 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6415036421

result:

ok 1 number(s): "6415036421"

Test #60:

score: 0
Accepted
time: 1716ms
memory: 34048kb

input:

40600 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 1 1 1 1 23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6423932929

result:

ok 1 number(s): "6423932929"

Test #61:

score: 0
Accepted
time: 2223ms
memory: 33920kb

input:

40800 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 791 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6432643769

result:

ok 1 number(s): "6432643769"

Test #62:

score: 0
Accepted
time: 2846ms
memory: 33868kb

input:

41000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 235 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 309 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6440202809

result:

ok 1 number(s): "6440202809"

Test #63:

score: 0
Accepted
time: 2915ms
memory: 33840kb

input:

42000 200000
1 1 1 1 1 1 1 1 1 1 1 57 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 54 1 1 1 1 1 1 1 26 1 1 1 1 1 1 1 1 1 1 1 1 60 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 46 1 1 1 1 180 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 65 1 1 1 1 1 1 1 141 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6477624213

result:

ok 1 number(s): "6477624213"

Test #64:

score: 0
Accepted
time: 1832ms
memory: 33656kb

input:

44000 200000
1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 90 60 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 44 1 1 1 1 1 1 1 1 1 1 47 37 1 1 1 1 1 1 1 1 14 25 1 198 74 1 1 1 1 1 1 1 24 1 1 1 1 1 1 1 1 1 1 1 1 23 13 1 1 1 1 24 1 1 1 104 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 65 1 1 1 1 1 1...

output:

6550566425

result:

ok 1 number(s): "6550566425"

Test #65:

score: 0
Accepted
time: 898ms
memory: 32848kb

input:

48000 200000
1 1 1 1 1 1 1 1 1 1 1 21 1 1 1 1 1 1 1 40 1 1 1 1 1 1 1 1 1 1 1 1 49 1 19 1 6 1 1 1 2 1 1 1 39 1 1 15 1 1 9 1 1 1 1 1 33 12 5 1 51 48 1 1 1 13 3 1 1 35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 1 1 1 1 1 1 1 1 1 25 1 1 1 1 1 1 1 1 40 1 35 35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 5 1 36 1...

output:

6674182047

result:

ok 1 number(s): "6674182047"

Test #66:

score: 0
Accepted
time: 365ms
memory: 32464kb

input:

56000 200000
1 25 1 12 5 1 2 1 1 1 1 1 6 1 1 32 1 1 1 13 9 1 1 9 1 15 22 1 1 7 1 1 1 1 1 1 1 27 4 1 1 1 2 1 28 1 1 1 1 1 8 1 10 1 2 2 1 5 23 1 12 1 1 1 1 1 1 1 1 16 8 1 1 2 1 3 6 2 1 7 1 1 1 1 1 19 1 1 1 3 1 1 1 1 16 1 1 1 1 3 1 7 1 4 1 1 3 4 1 1 1 2 2 1 1 1 3 1 20 1 1 21 1 1 1 1 1 1 2 1 1 2 1 1 1 1...

output:

6844905709

result:

ok 1 number(s): "6844905709"

Test #67:

score: 0
Accepted
time: 108ms
memory: 31796kb

input:

72000 200000
1 5 1 2 1 8 6 1 15 2 2 7 14 2 1 1 1 1 2 1 5 1 1 1 1 1 1 8 2 1 1 1 3 1 4 2 1 8 9 1 7 1 1 1 9 6 2 5 1 3 1 9 1 1 12 1 1 5 5 1 6 1 1 1 1 1 1 1 6 1 1 1 6 1 2 5 1 4 1 6 1 1 1 1 1 1 2 2 1 6 3 3 7 3 7 1 7 3 1 4 1 1 8 7 1 2 1 4 1 1 1 3 5 6 3 1 2 2 1 2 1 1 5 1 1 1 1 2 1 3 1 1 5 3 8 7 4 2 1 6 7 1 ...

output:

6880182507

result:

ok 1 number(s): "6880182507"

Test #68:

score: 0
Accepted
time: 30ms
memory: 29012kb

input:

104000 200000
3 1 1 1 3 1 2 1 3 3 1 2 5 2 2 1 2 2 1 4 2 3 1 1 1 2 1 2 2 2 2 3 1 1 3 3 2 2 2 2 2 1 1 1 3 2 2 2 4 5 3 3 1 2 5 2 2 2 2 2 1 1 5 1 2 2 3 1 4 1 3 1 2 1 2 2 1 2 2 3 3 2 1 2 2 1 2 3 2 1 3 1 2 2 3 2 1 1 2 2 2 1 2 2 2 1 1 1 1 2 2 1 2 2 1 1 2 2 2 3 4 2 1 2 2 1 1 7 1 1 1 3 3 2 2 1 3 1 5 2 2 2 1 ...

output:

5374274367

result:

ok 1 number(s): "5374274367"

Test #69:

score: 0
Accepted
time: 36ms
memory: 30580kb

input:

120000 200000
2 1 3 3 2 1 2 2 3 2 2 0 1 1 2 2 2 1 0 1 1 3 1 2 1 1 1 1 1 2 1 2 0 3 2 0 3 2 1 3 2 4 1 2 1 1 1 1 1 1 2 0 2 0 1 2 2 0 2 1 1 2 2 1 2 2 1 2 3 2 2 0 1 2 3 1 1 1 2 2 3 2 0 1 2 2 1 1 3 2 2 0 0 2 5 1 1 2 2 1 2 1 1 3 2 1 2 2 3 1 1 2 2 2 1 2 1 1 2 2 0 2 1 0 2 2 2 2 2 2 1 2 2 1 1 0 4 1 0 2 1 0 1 ...

output:

6745448219

result:

ok 1 number(s): "6745448219"

Test #70:

score: 0
Accepted
time: 53ms
memory: 31168kb

input:

110000 200000
2 5 2 2 1 2 0 2 1 1 1 2 0 1 1 1 1 2 2 1 3 3 4 2 2 1 2 1 1 1 1 1 2 3 1 4 0 0 1 1 0 0 2 2 0 1 3 1 4 1 1 2 3 2 1 1 1 0 3 2 1 1 3 2 2 3 2 2 0 2 1 1 2 1 2 2 1 1 2 4 2 1 2 2 1 1 2 1 1 1 0 1 4 3 3 1 3 2 5 1 1 0 0 3 2 1 1 2 4 2 2 1 5 1 1 1 0 0 1 5 2 1 1 0 3 1 2 2 1 0 4 2 0 2 1 3 1 4 1 1 1 3 2 ...

output:

7712193683

result:

ok 1 number(s): "7712193683"

Test #71:

score: 0
Accepted
time: 93ms
memory: 32168kb

input:

90000 200000
2 2 2 1 8 1 1 1 4 12 1 1 2 4 4 1 15 3 1 4 2 1 6 2 1 1 4 3 1 1 2 1 1 1 6 2 4 9 3 1 3 0 3 7 2 2 3 3 1 8 2 2 1 0 1 1 1 0 3 2 2 1 0 4 1 0 1 3 1 1 1 1 1 1 0 1 4 1 5 2 2 2 3 4 2 1 1 1 1 1 2 5 2 5 1 1 3 1 0 1 7 1 1 1 1 1 0 3 1 2 5 1 2 1 1 1 0 1 1 3 3 3 2 1 1 3 12 10 1 1 1 4 2 1 0 1 12 1 0 0 0 ...

output:

8718437229

result:

ok 1 number(s): "8718437229"

Test #72:

score: 0
Accepted
time: 146ms
memory: 32920kb

input:

80000 200000
2 6 3 1 1 1 2 8 1 11 1 1 1 1 1 13 0 1 5 1 1 1 3 0 1 4 1 1 6 1 2 3 1 1 1 1 0 0 9 0 1 2 1 3 1 4 2 1 1 3 6 1 1 3 9 1 22 1 1 1 2 0 0 1 1 1 1 5 4 1 1 4 1 0 2 1 1 4 14 1 0 1 1 1 1 1 1 2 1 1 3 3 0 0 6 1 1 4 2 1 6 7 1 2 1 1 1 1 0 1 4 1 1 1 1 3 2 1 1 1 3 0 0 1 2 9 9 1 1 15 1 7 0 0 4 2 1 6 2 8 0 ...

output:

8892185533

result:

ok 1 number(s): "8892185533"

Test #73:

score: 0
Accepted
time: 261ms
memory: 33868kb

input:

70000 200000
1 1 4 1 0 1 1 1 1 5 1 0 1 1 1 1 1 1 1 6 1 1 1 1 3 2 1 13 0 4 1 1 8 1 11 1 7 1 1 1 1 1 2 1 1 1 1 1 1 2 2 1 1 1 1 6 1 1 0 0 0 10 5 1 0 0 1 1 6 1 1 1 1 18 1 9 1 1 1 0 0 6 1 1 0 0 1 8 0 1 1 1 1 0 14 1 1 1 4 1 5 8 2 20 1 0 4 1 0 0 0 1 1 1 1 1 1 10 0 1 3 1 1 3 19 1 1 0 0 1 1 0 1 1 1 1 14 0 0 ...

output:

8895563309

result:

ok 1 number(s): "8895563309"

Test #74:

score: 0
Accepted
time: 722ms
memory: 34404kb

input:

60000 200000
1 1 29 1 1 1 19 1 61 32 1 1 18 1 0 6 20 1 1 1 1 24 0 0 1 1 16 1 1 1 0 46 22 1 1 1 40 1 1 4 2 1 1 1 1 1 34 1 0 1 14 1 1 10 1 1 1 1 1 1 1 5 1 0 1 1 1 0 8 14 1 1 0 31 1 1 1 1 1 15 11 1 0 1 0 1 1 1 1 0 5 1 0 1 9 4 1 1 1 0 0 1 3 1 8 1 0 0 1 0 0 1 1 1 5 1 1 1 1 5 1 0 37 1 0 1 1 0 1 0 1 1 11 0...

output:

8715188297

result:

ok 1 number(s): "8715188297"

Test #75:

score: 0
Accepted
time: 1764ms
memory: 34524kb

input:

55000 200000
1 0 1 0 1 1 1 49 1 0 1 16 1 1 0 1 1 11 1 1 1 1 1 1 10 1 0 1 0 0 0 0 0 1 1 1 1 60 1 23 1 0 0 1 46 1 1 0 1 1 1 25 1 2 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 33 0 1 1 1 0 17 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 106 1 1 1 0 1 6 0 1 0 0 1 1 50 28 1 1 1 1 0 12 1 ...

output:

8586958759

result:

ok 1 number(s): "8586958759"

Test #76:

score: 0
Accepted
time: 1832ms
memory: 34188kb

input:

54000 200000
0 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1 1 53 0 0 1 0 1 1 1 0 0 0 1 1 1 1 21 0 1 1 1 0 0 0 1 59 1 1 1 1 7 1 1 58 1 1 1 1 30 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 52 0 0...

output:

8546536201

result:

ok 1 number(s): "8546536201"

Test #77:

score: 0
Accepted
time: 2546ms
memory: 34500kb

input:

53000 200000
0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 0 53 0 40 1 32 1 1 1 1 0 1 1 1 28 1 38 1 1 1 1 1 1 1 0 1 1 1 0 1 1 0 1 1 100 33 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 0 1 1 0 1 54 1 1 0 0 1...

output:

8510129081

result:

ok 1 number(s): "8510129081"

Test #78:

score: 0
Accepted
time: 3207ms
memory: 34556kb

input:

52000 200000
1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 0 1 1 163 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 258 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 26 1 0 1 13 1 1 1 73 1 1 ...

output:

8481623611

result:

ok 1 number(s): "8481623611"

Test #79:

score: 0
Accepted
time: 39ms
memory: 31376kb

input:

130000 200000
1 1 1 1 2 2 1 1 2 1 2 3 2 3 2 4 3 2 1 1 1 1 2 1 2 2 1 1 0 2 1 0 2 2 3 1 1 2 3 2 2 1 2 2 2 0 1 2 2 1 2 1 4 0 2 1 2 3 2 1 3 0 3 3 3 2 0 1 1 2 1 1 3 0 2 2 2 5 2 2 2 0 2 1 3 2 3 0 0 2 2 1 0 0 1 0 2 2 2 1 2 0 1 0 1 1 2 1 2 2 4 2 1 0 0 3 2 0 2 1 3 2 2 1 2 1 0 1 2 3 2 1 0 0 1 0 2 2 2 2 1 2 1 ...

output:

8747015491

result:

ok 1 number(s): "8747015491"

Test #80:

score: 0
Accepted
time: 49ms
memory: 31968kb

input:

120000 200000
3 3 1 0 1 1 1 0 2 1 2 2 4 4 2 0 1 2 2 1 1 2 2 1 0 6 4 0 1 0 3 2 2 1 2 0 2 1 1 2 2 0 2 0 2 2 0 2 4 3 2 1 3 2 1 2 1 2 4 3 1 0 2 1 0 2 0 1 1 2 2 1 2 0 1 2 3 0 1 3 0 1 3 2 2 1 1 0 0 2 0 3 2 0 1 3 2 1 4 2 1 2 1 0 0 1 3 1 3 1 2 4 0 1 1 2 2 2 2 4 4 2 2 2 10 2 1 2 4 2 0 0 1 1 2 1 4 2 1 0 0 1 0...

output:

9720298457

result:

ok 1 number(s): "9720298457"

Test #81:

score: 0
Accepted
time: 93ms
memory: 33308kb

input:

100000 200000
3 1 3 1 0 1 1 5 2 3 3 6 1 10 1 0 0 1 3 2 1 0 1 1 0 1 2 1 1 1 1 1 1 4 1 1 3 0 1 4 2 1 1 3 0 1 0 7 3 3 1 1 5 1 1 1 1 5 0 0 6 1 2 3 9 0 1 1 1 4 2 0 4 5 1 2 4 2 1 1 3 2 0 2 1 1 2 4 1 0 1 1 1 2 1 7 2 3 1 0 0 0 1 0 1 1 1 2 3 0 2 0 2 1 2 0 1 2 1 3 1 5 1 2 1 1 1 1 1 0 2 1 2 0 0 1 1 2 2 1 1 1 0...

output:

10714478349

result:

ok 1 number(s): "10714478349"

Test #82:

score: 0
Accepted
time: 157ms
memory: 33588kb

input:

90000 200000
0 1 1 29 7 8 1 1 1 1 2 0 6 1 1 1 1 2 3 0 4 2 1 1 1 9 1 6 1 0 1 3 1 3 13 1 4 2 0 0 5 0 8 0 1 1 5 1 2 8 1 13 1 0 1 4 1 1 11 6 1 0 8 1 5 1 3 0 0 0 0 1 1 1 1 1 1 1 11 0 0 0 0 0 0 1 1 1 1 3 1 2 0 1 1 8 1 0 16 2 5 1 0 1 1 2 0 5 1 17 1 1 1 1 5 1 0 1 0 2 0 1 0 0 0 7 0 0 3 0 1 0 1 2 2 2 1 1 4 6 ...

output:

10902301123

result:

ok 1 number(s): "10902301123"

Test #83:

score: 0
Accepted
time: 274ms
memory: 34436kb

input:

80000 200000
1 19 22 7 0 1 1 1 1 9 0 1 1 4 0 10 0 0 1 4 1 1 1 9 0 1 1 1 1 1 0 1 1 15 14 6 9 3 1 1 5 0 0 0 5 6 3 1 2 1 0 1 0 1 35 2 1 1 0 0 1 16 1 0 1 0 3 2 1 1 1 1 1 0 1 1 2 1 1 1 1 1 0 1 0 4 1 1 0 1 1 6 1 0 0 1 10 0 1 1 0 0 7 0 0 0 0 1 1 0 1 0 1 1 1 1 2 17 0 1 1 1 0 11 1 21 5 1 1 1 1 0 1 0 0 1 1 0 ...

output:

10882604805

result:

ok 1 number(s): "10882604805"

Test #84:

score: 0
Accepted
time: 685ms
memory: 34828kb

input:

70000 200000
1 1 1 1 1 1 1 15 0 0 1 1 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 14 4 1 5 0 0 1 0 1 3 0 1 1 1 1 1 0 1 0 13 35 0 0 1 1 1 0 1 1 1 8 24 1 0 1 0 1 0 19 1 1 0 1 1 0 1 1 8 1 0 1 0 15 0 0 11 0 1 0 28 0 49 1 3 1 1 1 21 0 0 0 1 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 0 0 1 1 1 5 1 0 1 48 0 1 1 1 13 1 1 0 1 1 1 1 ...

output:

10726599245

result:

ok 1 number(s): "10726599245"

Test #85:

score: 0
Accepted
time: 1551ms
memory: 35128kb

input:

65000 200000
53 1 0 1 1 0 0 1 1 0 16 0 1 2 1 1 0 20 1 1 26 0 1 1 1 0 1 0 1 2 57 1 107 1 1 1 1 3 1 0 1 1 1 0 0 1 1 1 20 1 1 1 1 1 1 1 0 0 0 1 0 1 1 0 11 1 1 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 0 1 1 0 1 1 0 33 1 1 1 0 9 0 0 0 0 1 0 1 1 1 0 0 1 1 0 1 1 19 1 1 1 1 0 0 1 7 0 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 ...

output:

10585560517

result:

ok 1 number(s): "10585560517"

Test #86:

score: 0
Accepted
time: 1814ms
memory: 35532kb

input:

64000 200000
0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 2 1 0 1 1 1 1 1 1 7 1 1 1 0 0 0 1 0 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 55 0 1 1 1 1 0 0 15 0 0 1 32 102 1 1 1 1 1 1 1 1 1 40 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 1 1 1 1 0 1 0 1 1 1 9 1 1 1 0 0 1 1 1 1 1 1 14 1 0 0 1 0 1 1 ...

output:

10542275555

result:

ok 1 number(s): "10542275555"

Test #87:

score: 0
Accepted
time: 2418ms
memory: 35164kb

input:

63000 200000
1 0 0 1 1 0 1 0 0 1 1 1 152 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 0 1 1 1 0 0 0 1 1 43 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 31 0 0 1 0 0 1 0 1 1 1 1 1 1 3 1 1 0 0 60 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 0 0 0 ...

output:

10510594287

result:

ok 1 number(s): "10510594287"

Test #88:

score: 0
Accepted
time: 3052ms
memory: 35356kb

input:

62000 200000
0 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 0 1 1 0 98 1 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 ...

output:

10477303837

result:

ok 1 number(s): "10477303837"

Test #89:

score: 0
Accepted
time: 2684ms
memory: 35420kb

input:

61000 200000
0 1 1 91 415 1 415 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 1 1 1 427 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0 0 1 1 114 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 161 1 0 0 ...

output:

10441540213

result:

ok 1 number(s): "10441540213"

Test #90:

score: 0
Accepted
time: 43ms
memory: 31592kb

input:

140000 200000
2 2 1 2 0 0 2 2 0 3 4 1 2 2 1 2 1 3 0 1 2 2 2 2 2 1 2 1 2 2 1 1 3 0 2 1 1 2 1 1 2 2 1 1 0 1 2 0 1 2 1 2 1 0 2 2 3 0 1 2 2 3 1 3 0 2 2 0 1 0 2 1 2 0 0 0 2 3 0 0 0 1 0 1 2 1 1 2 1 2 2 1 2 2 3 1 2 2 2 1 0 1 2 2 2 2 1 2 1 2 2 0 1 2 1 1 2 1 1 0 2 2 1 1 1 2 1 2 0 2 2 2 1 0 0 1 0 2 2 0 1 2 0 ...

output:

10746595211

result:

ok 1 number(s): "10746595211"

Test #91:

score: 0
Accepted
time: 50ms
memory: 32588kb

input:

130000 200000
2 2 1 0 1 1 2 1 0 1 0 2 0 0 1 4 0 1 2 1 0 2 6 1 1 2 2 3 2 1 1 3 0 3 2 3 1 0 4 1 0 3 2 2 1 1 2 5 2 2 0 2 2 0 1 3 4 6 1 1 2 1 1 0 2 0 3 3 5 1 2 1 0 1 1 1 2 0 1 0 1 2 1 0 1 0 3 1 0 2 1 2 0 3 1 0 6 1 1 4 0 4 1 1 3 1 2 2 1 2 5 2 0 0 0 2 5 3 2 2 3 1 2 1 2 1 2 0 0 0 1 2 2 0 1 5 0 2 2 1 0 3 1 ...

output:

11710688677

result:

ok 1 number(s): "11710688677"

Test #92:

score: 0
Accepted
time: 102ms
memory: 33740kb

input:

110000 200000
1 1 1 2 2 1 3 0 1 2 1 3 1 2 0 1 0 1 2 0 2 7 5 2 0 2 2 1 4 5 0 4 3 0 1 3 1 1 2 1 0 1 5 5 0 6 5 1 1 0 5 1 1 4 1 0 2 0 1 1 5 1 3 0 4 0 0 1 3 3 4 0 2 2 0 0 3 0 0 1 1 1 2 5 1 0 1 0 1 1 1 2 1 0 1 2 2 1 3 3 11 2 1 0 0 0 4 1 1 0 0 3 0 0 0 1 1 2 1 1 4 1 4 1 1 0 1 1 0 0 0 0 3 3 0 0 1 1 11 0 10 1...

output:

12718293357

result:

ok 1 number(s): "12718293357"

Test #93:

score: 0
Accepted
time: 135ms
memory: 34160kb

input:

100000 200000
0 5 0 0 8 1 2 1 9 1 1 1 1 1 0 1 7 0 0 0 1 1 0 0 1 1 1 0 1 6 1 1 0 1 0 0 0 5 1 6 6 0 1 0 1 2 0 2 1 0 0 4 1 1 0 4 1 1 1 4 1 4 2 2 1 4 0 2 1 0 1 0 0 5 8 1 1 0 0 1 1 0 0 2 1 1 1 3 1 4 0 0 1 8 1 0 1 1 0 8 1 1 1 9 1 4 0 2 0 1 0 15 8 5 0 17 2 0 1 9 0 1 13 1 4 4 0 1 0 4 0 0 1 7 5 0 1 2 1 4 0 0...

output:

12891943621

result:

ok 1 number(s): "12891943621"

Test #94:

score: 0
Accepted
time: 283ms
memory: 34520kb

input:

90000 200000
0 18 0 2 0 0 0 1 1 0 0 3 0 0 0 1 1 0 1 1 1 0 1 1 1 2 1 4 1 1 1 0 0 1 0 1 0 1 0 0 1 4 1 11 1 0 0 1 1 0 1 25 13 0 0 0 0 2 0 1 1 17 1 1 5 0 1 1 1 0 18 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 1 0 1 0 0 0 1 6 1 1 1 1 10 0 0 1 1 1 0 0 0 7 3 0 0 1 4 1 1 1 1 1 6 1 0 1 0 1 1 0 0 1 1 1 1 0 6 19 1 1 1 0 1 1...

output:

12897176255

result:

ok 1 number(s): "12897176255"

Test #95:

score: 0
Accepted
time: 733ms
memory: 35688kb

input:

80000 200000
0 1 0 1 1 3 0 1 1 1 0 0 1 0 1 1 0 1 1 0 1 1 6 7 0 0 0 1 1 1 0 12 1 1 1 24 1 0 0 25 1 1 0 0 0 1 1 1 0 7 0 0 1 0 0 0 1 1 0 1 18 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 1 1 0 11 0 0 0 1 0 1 1 1 0 1 0 15 0 1 0 0 1 0 1 0 1 0 1 0 13 1 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 24 40 3 13 1 9 1 1 1 43 0 0 22 0 1 0 0...

output:

12728826669

result:

ok 1 number(s): "12728826669"

Test #96:

score: 0
Accepted
time: 1518ms
memory: 35804kb

input:

75000 200000
1 4 0 4 0 0 1 0 0 1 0 1 15 1 1 10 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 43 0 0 0 1 32 1 0 1 1 0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 1 1 1 1 1 1 8 1 1 0 1 1 1 1 1 1 0 0 5 1 0 1 0 0 1 0 4 1 1 0 0 16 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 1 51 1 1 1 0 0 0 0 1 19 0 50 1 1 1 0 1...

output:

12580253909

result:

ok 1 number(s): "12580253909"

Test #97:

score: 0
Accepted
time: 1811ms
memory: 35392kb

input:

74000 200000
0 0 0 1 1 1 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 123 1 0 0 1 0 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 0 1 1 1 101 1 0 1 1 1 1 0 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 1 0 1 2 1 0 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 0 15 0 8 0 0 0 1 ...

output:

12550928267

result:

ok 1 number(s): "12550928267"

Test #98:

score: 0
Accepted
time: 2542ms
memory: 35960kb

input:

73000 200000
1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 0 0 0 1 16 1 1 0 1 1 0 0 0 0 0 1 1 148 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 1 0 31 0 1 1 203 0 0 0 0 1 1 0 1 1 1 1 14 0 0 1 1 1 1 0 0 1 46 0 1 1 34 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 72 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 1 0 0 120 1 0 182...

output:

12513485405

result:

ok 1 number(s): "12513485405"

Test #99:

score: 0
Accepted
time: 3351ms
memory: 35752kb

input:

72000 200000
1 1 0 0 1 0 1 1 1 1 0 1 0 0 91 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 10 0 0 1 0 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 4 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 1 0 1 0 66 1 1 1 1 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 0 ...

output:

12476602933

result:

ok 1 number(s): "12476602933"

Test #100:

score: 0
Accepted
time: 3093ms
memory: 35956kb

input:

71000 200000
0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 0 28 1 1 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 0 92 0 1 0 1 1 0 1 1 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 0 51 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 1 0 62 1...

output:

12440350831

result:

ok 1 number(s): "12440350831"

Test #101:

score: 0
Accepted
time: 37ms
memory: 33580kb

input:

170000 200000
2 0 2 3 2 0 3 0 2 2 0 2 1 0 2 2 1 2 2 2 2 2 0 0 2 1 2 1 2 0 2 1 0 0 2 0 2 1 2 1 0 0 2 0 2 1 0 0 1 3 2 1 2 2 0 0 1 0 2 2 2 1 0 0 3 0 2 2 0 3 2 2 2 1 0 0 1 1 2 2 2 3 1 1 2 1 0 0 1 0 0 2 3 2 3 2 2 3 2 1 0 0 0 1 2 2 2 1 1 2 2 2 0 1 2 2 2 1 1 3 3 1 2 2 1 1 3 2 2 0 2 2 2 1 0 0 2 0 0 2 2 0 2 ...

output:

16745250085

result:

ok 1 number(s): "16745250085"

Test #102:

score: 0
Accepted
time: 64ms
memory: 34824kb

input:

160000 200000
1 0 1 0 1 3 2 2 0 3 1 1 0 0 1 2 3 0 0 1 2 3 2 2 0 1 1 2 3 1 1 1 0 1 2 0 0 1 2 0 0 1 0 2 2 1 3 1 3 0 1 1 1 0 2 0 0 0 3 1 0 0 0 0 0 1 6 2 0 5 1 0 0 4 4 2 1 4 2 1 0 1 0 1 0 2 0 2 0 1 0 2 3 0 1 3 2 1 2 3 1 1 0 1 2 2 4 0 2 0 0 0 0 4 2 1 0 2 2 0 2 0 0 0 0 5 1 2 1 0 0 1 1 2 0 2 1 0 3 0 4 5 2 ...

output:

17710796705

result:

ok 1 number(s): "17710796705"

Test #103:

score: 0
Accepted
time: 127ms
memory: 35840kb

input:

140000 200000
0 1 0 0 0 1 0 4 0 0 0 0 1 2 13 0 0 1 0 0 2 0 0 1 0 6 1 0 1 0 7 2 3 0 1 0 0 5 1 0 1 0 0 1 1 1 0 0 1 1 3 1 0 0 3 1 0 1 2 0 1 1 0 0 0 2 2 0 0 0 5 1 0 1 6 2 1 0 0 0 1 1 1 0 1 2 1 0 0 3 0 0 0 0 4 7 0 0 1 2 1 0 1 0 0 1 0 1 1 0 8 1 0 1 0 0 1 3 0 0 3 0 0 0 1 2 1 0 0 2 1 0 9 1 1 0 4 1 0 1 1 1 1...

output:

18722320233

result:

ok 1 number(s): "18722320233"

Test #104:

score: 0
Accepted
time: 176ms
memory: 35692kb

input:

130000 200000
2 1 1 0 5 6 1 0 1 1 0 0 0 0 0 0 1 4 0 1 0 1 4 1 1 1 0 0 9 0 5 1 0 1 5 0 0 1 0 1 1 1 0 1 1 6 2 5 0 1 0 0 0 0 1 0 0 1 1 1 23 1 6 0 1 1 1 0 0 0 6 1 0 0 0 1 0 0 3 12 1 0 1 1 7 0 7 1 1 9 0 0 1 1 2 7 0 1 1 2 1 1 0 1 0 3 1 5 5 1 0 2 0 0 0 1 0 1 1 0 0 1 1 4 2 3 1 1 1 1 1 1 0 0 7 0 1 6 0 1 8 0 ...

output:

18887947123

result:

ok 1 number(s): "18887947123"

Test #105:

score: 0
Accepted
time: 330ms
memory: 35924kb

input:

120000 200000
1 1 4 0 17 8 1 0 0 1 7 4 1 25 32 0 0 22 1 1 0 1 3 16 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 8 0 1 0 0 1 0 1 0 7 0 1 1 0 0 0 0 0 6 1 18 0 3 1 0 0 3 1 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 3 0 0 6 0 1 1 0 1 1 0 3 0 1 0 0 5 0 5 6 1 1 0 1 0 0 0 1 1 1 0 0 13 1 9 4 1 1 0 0 0 0 0 11 1 16 0 0 0 0 0 0...

output:

18889893023

result:

ok 1 number(s): "18889893023"

Test #106:

score: 0
Accepted
time: 895ms
memory: 35432kb

input:

110000 200000
1 0 1 0 1 3 0 1 1 0 1 94 0 0 1 0 1 2 1 0 1 0 0 5 0 0 1 0 1 0 6 1 1 1 0 11 1 0 0 1 0 0 1 0 0 0 1 15 0 1 1 0 0 1 0 1 0 11 1 0 0 0 0 0 1 37 0 0 0 0 0 1 0 1 0 1 1 0 0 1 1 0 28 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 3 1 21 0 0 0 0 0 1 0 0 0 12 1 1 0 1 1 0 1 1 0 9 10 1 0 4 1 0...

output:

18726901365

result:

ok 1 number(s): "18726901365"

Test #107:

score: 0
Accepted
time: 1643ms
memory: 35552kb

input:

105000 200000
1 0 1 0 1 1 0 0 0 0 0 1 0 0 1 0 12 1 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 1 0 0 1 0 1 1 0 0 0 1 1 0 52 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 6 1 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 19 0 0 0 0 1 0 0 1 0 0 1 0 1 0 16 1 2 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 ...

output:

18587746035

result:

ok 1 number(s): "18587746035"

Test #108:

score: 0
Accepted
time: 2151ms
memory: 35164kb

input:

104000 200000
0 1 1 1 1 0 0 0 0 1 1 1 0 54 0 1 0 0 1 1 0 0 1 0 1 0 1 8 0 0 0 1 1 1 0 0 93 0 1 0 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 0 0 ...

output:

18547998553

result:

ok 1 number(s): "18547998553"

Test #109:

score: 0
Accepted
time: 2322ms
memory: 35640kb

input:

103000 200000
0 1 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 0 27 0 1 0 0 0 0 1 1 1 24 0 0 0 0 1 4 0 0 64 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 0 1 0 0...

output:

18513858687

result:

ok 1 number(s): "18513858687"

Test #110:

score: 0
Accepted
time: 2872ms
memory: 35508kb

input:

102000 200000
1 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 0 1 26 1 0 0 127 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 0 1 0 1...

output:

18476252267

result:

ok 1 number(s): "18476252267"

Test #111:

score: 0
Accepted
time: 3019ms
memory: 35540kb

input:

101000 200000
1 0 0 0 1 0 0 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 245 1 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 278 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 1 1 0 1 0 30 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0...

output:

18439259353

result:

ok 1 number(s): "18439259353"

Test #112:

score: 0
Accepted
time: 32ms
memory: 33228kb

input:

180000 200000
2 0 2 0 0 1 1 0 2 1 2 0 0 2 2 2 3 1 2 3 1 2 1 0 2 0 0 1 1 0 2 0 2 2 0 2 2 1 0 2 2 0 0 0 1 0 1 2 2 1 2 2 2 0 1 2 1 2 0 2 1 2 0 1 0 0 0 2 1 2 2 0 1 2 1 2 2 0 1 0 1 0 2 1 1 1 1 0 1 0 2 1 1 2 1 2 1 1 2 2 2 3 2 0 3 2 1 3 0 3 1 0 2 0 0 2 1 3 0 1 2 1 1 2 0 1 0 2 1 0 0 0 2 0 0 0 2 2 0 2 0 1 2 ...

output:

16622983963

result:

ok 1 number(s): "16622983963"

Test #113:

score: 0
Accepted
time: 56ms
memory: 34532kb

input:

170000 200000
0 2 0 2 2 2 2 1 1 0 0 1 1 0 0 0 2 7 0 3 1 2 2 1 0 2 1 3 4 2 2 2 4 3 0 0 0 1 3 0 0 0 1 2 2 1 1 3 1 2 0 2 0 0 2 0 3 0 2 3 0 3 2 1 0 2 1 1 2 3 2 1 1 1 1 0 1 1 3 1 1 1 2 3 2 2 0 0 1 2 0 0 0 1 0 2 1 1 1 3 0 2 1 0 2 3 0 2 3 0 2 0 0 1 2 1 2 0 0 0 0 0 2 3 1 1 3 0 0 0 2 2 4 0 0 2 2 1 1 3 0 2 0 ...

output:

17848447615

result:

ok 1 number(s): "17848447615"

Test #114:

score: 0
Accepted
time: 99ms
memory: 34904kb

input:

150000 200000
1 1 1 2 0 1 0 0 4 0 0 0 2 1 6 1 1 5 0 2 0 1 3 1 0 0 0 0 1 1 0 0 4 0 1 1 0 0 0 1 1 0 0 1 1 1 3 0 4 2 1 0 1 0 1 0 4 1 0 0 1 3 1 0 0 0 4 2 1 7 3 0 0 3 0 2 1 5 1 0 0 1 2 1 0 0 1 0 0 0 1 2 0 3 0 1 2 1 0 0 1 5 0 4 4 2 2 0 2 1 0 1 2 1 0 1 1 2 0 0 0 2 1 2 11 1 5 2 4 1 5 0 1 2 0 1 0 1 0 2 0 0 1...

output:

19210442767

result:

ok 1 number(s): "19210442767"

Test #115:

score: 0
Accepted
time: 160ms
memory: 35344kb

input:

140000 200000
1 1 1 0 0 1 1 0 0 0 3 1 6 2 3 0 1 1 3 1 1 1 6 0 0 1 0 0 2 0 0 1 0 0 1 1 0 1 0 0 11 1 0 1 0 7 1 1 5 1 0 0 0 0 0 1 3 5 6 2 0 0 9 4 0 1 7 8 1 1 1 1 0 0 8 1 0 6 0 3 0 0 1 0 0 1 0 1 1 1 2 0 0 6 1 0 0 1 0 16 2 0 0 0 1 0 14 1 0 1 0 4 1 0 1 6 0 0 9 1 0 9 1 1 0 0 0 11 0 2 1 1 3 1 0 1 0 0 1 0 3 ...

output:

19541350693

result:

ok 1 number(s): "19541350693"

Test #116:

score: 0
Accepted
time: 282ms
memory: 35380kb

input:

130000 200000
1 0 0 1 1 11 24 2 1 0 2 0 0 1 0 1 21 0 1 1 1 0 1 1 0 0 0 0 0 1 0 1 1 1 2 1 1 0 0 0 1 1 3 1 1 1 0 1 1 0 8 0 3 1 1 0 1 0 2 1 11 0 1 0 0 0 0 0 0 0 0 1 15 2 1 1 0 0 4 1 0 1 0 11 1 1 0 0 4 1 1 1 0 0 5 6 14 0 1 1 0 6 8 2 1 1 1 0 0 1 0 0 9 2 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 0 1 2 0 1 1 1 0 0 1 0...

output:

19695497145

result:

ok 1 number(s): "19695497145"

Test #117:

score: 0
Accepted
time: 788ms
memory: 35436kb

input:

120000 200000
0 1 0 1 1 1 1 1 0 0 0 14 0 0 8 13 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 0 0 1 0 1 7 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 20 1 0 0 0 0 0 0 0 25 0 1 0 0 0 0 1 1 18 0 0 1 0 1 0 0 19 0 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 0 18 0 0 1 1 1 1 0 2 1 0 0 0 0 0 0...

output:

19676384775

result:

ok 1 number(s): "19676384775"

Test #118:

score: 0
Accepted
time: 1252ms
memory: 35240kb

input:

115000 200000
0 1 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 10 0 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 0 1 1 0 0 1 0 0 0 1 1 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 1 31 1 0 0 0 1 0 0 0 0 0 18 1 0 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 0 1 51 1 0 0 0 1 0 1 1 1 1 6 0 0 1 0 ...

output:

19604022905

result:

ok 1 number(s): "19604022905"

Test #119:

score: 0
Accepted
time: 1615ms
memory: 35556kb

input:

114000 200000
0 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 12 1 0 0 36 2 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 13 0 1 1 1 1 1 1 0 0 0 0 39 1 0 0 0 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 1 ...

output:

19584002611

result:

ok 1 number(s): "19584002611"

Test #120:

score: 0
Accepted
time: 2129ms
memory: 35320kb

input:

113000 200000
0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 6 32 0 1 1 0 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 1 0...

output:

19565883951

result:

ok 1 number(s): "19565883951"

Test #121:

score: 0
Accepted
time: 2701ms
memory: 34988kb

input:

112000 200000
1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 0 1 0 1 3 0 0 0 1 1 1 0 1 50 1 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 11 1 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 ...

output:

19546111275

result:

ok 1 number(s): "19546111275"

Test #122:

score: 0
Accepted
time: 2592ms
memory: 35300kb

input:

111000 200000
0 1 0 1 0 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 1 0 1 139 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 1 1 1 0 1 0 0 0 0 193 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 ...

output:

19524369297

result:

ok 1 number(s): "19524369297"

Test #123:

score: 0
Accepted
time: 2953ms
memory: 33628kb

input:

41000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 24 1 1 90 118 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 850 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 153 1 1 1 37 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6440443909

result:

ok 1 number(s): "6440443909"

Test #124:

score: 0
Accepted
time: 3303ms
memory: 34008kb

input:

42000 200000
1 1 1 1 1 1 1 1 1 43 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 120 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 188 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 254 168 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 70 1 1 1 1 1 1 1 249 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6473218113

result:

ok 1 number(s): "6473218113"

Test #125:

score: 0
Accepted
time: 1789ms
memory: 33720kb

input:

44000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 7 1 1 1 1 1 1 53 1 90 1 1 1 12 1 1 1 1 1 1 1 1 15 1 120 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 10 1 1 1 1 42 1 1 62 1 1 1 1 1 1 1 1 1 53 1 16 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6541045667

result:

ok 1 number(s): "6541045667"

Test #126:

score: 0
Accepted
time: 826ms
memory: 33448kb

input:

48000 200000
1 109 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 22 16 1 1 6 1 1 1 1 1 1 1 1 1 1 23 3 1 1 1 1 1 1 1 1 4 1 59 1 1 1 17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 26 3 12 1 1 1 37 1 1 1 21 1 1 1 1 1 1 1 1 1 1 1 62 1 1 1 9 1 5 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 21 1 1 1 1 1 1 1...

output:

6639623735

result:

ok 1 number(s): "6639623735"

Test #127:

score: 0
Accepted
time: 299ms
memory: 33052kb

input:

56000 200000
1 1 1 20 1 1 1 1 1 1 1 13 1 1 1 3 1 1 1 1 1 1 1 1 3 1 1 5 1 1 1 1 1 4 1 1 14 1 1 1 1 1 1 1 23 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 16 3 1 1 1 1 1 1 23 5 1 1 1 1 21 1 1 1 1 1 40 1 1 3 1 5 1 9 7 1 1 1 1 1 1 1 18 1 14 9 1 9 1 5 1 1 1 1 1 5 1 1 1 4 9 1 4 1 5 1 1 5 1 1 1 12 1 1 1 6 1 10 1 1 1 6 1 6...

output:

6706407213

result:

ok 1 number(s): "6706407213"

Test #128:

score: 0
Accepted
time: 87ms
memory: 31464kb

input:

72000 200000
4 4 1 1 1 5 1 1 1 1 1 1 1 6 1 1 1 1 1 1 3 1 1 4 1 5 1 1 1 9 1 1 1 1 1 1 6 4 1 1 3 1 7 1 3 1 21 1 1 1 7 1 1 1 1 4 1 3 1 4 1 13 3 1 3 1 1 6 1 1 3 1 3 1 1 9 4 6 1 3 7 3 1 1 1 1 3 1 1 1 3 1 5 4 1 3 1 1 4 1 3 1 8 1 4 1 3 3 5 5 4 1 1 1 8 1 1 1 1 1 3 1 3 1 3 1 6 1 1 1 1 5 4 6 3 3 4 1 4 4 1 1 6...

output:

6348977609

result:

ok 1 number(s): "6348977609"

Test #129:

score: 0
Accepted
time: 33ms
memory: 28508kb

input:

90000 200000
1 1 3 1 1 1 3 1 3 3 5 3 4 1 1 1 1 1 3 3 1 3 1 3 1 1 1 3 1 3 3 3 3 1 1 3 3 3 4 1 1 3 1 3 1 1 1 1 3 3 3 1 3 1 1 1 3 3 3 1 3 4 1 1 3 3 1 5 1 3 3 1 1 4 1 3 3 4 3 1 3 1 1 1 3 3 1 1 4 1 3 3 3 3 3 3 1 3 1 1 1 1 3 1 3 3 3 3 1 4 1 3 3 3 3 1 4 3 1 3 3 3 3 1 3 1 3 3 3 1 3 1 1 4 1 1 3 3 4 1 1 3 1 3...

output:

4828716105

result:

ok 1 number(s): "4828716105"

Test #130:

score: 0
Accepted
time: 2423ms
memory: 34036kb

input:

41000 200000
32 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 39 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 27 1 1 1 1 1 1 1 43 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 ...

output:

6437142047

result:

ok 1 number(s): "6437142047"

Test #131:

score: 0
Accepted
time: 2826ms
memory: 33412kb

input:

42000 200000
1 1 1 1 1 1 23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 43 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 97 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6470681159

result:

ok 1 number(s): "6470681159"

Test #132:

score: 0
Accepted
time: 2270ms
memory: 33908kb

input:

44000 200000
24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 23 1 1 1 1 1 1 1 1 1 5 1 1 11 1 1 1 1 1 25 96 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 39 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 1 1 1 1 25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 46 1 1 118 1 1 1 20 1 1 1 22 1 1 1 1 35 1 19 1 10 1 1 1 1 1 1 1 1...

output:

6522954181

result:

ok 1 number(s): "6522954181"

Test #133:

score: 0
Accepted
time: 772ms
memory: 33940kb

input:

48000 200000
11 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 26 11 1 1 1 1 1 12 1 1 1 1 9 1 43 1 1 1 1 1 9 7 1 1 1 1 1 11 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 17 18 28 1 1 1 1 1 1 1 44 1 1 17 1 25 1 1 1 5 1 1 1 1 1 1 7 1 1 1 1 1 32 26 1 1 1 1 1 1 1 1 1 1 1 1 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6575984667

result:

ok 1 number(s): "6575984667"

Test #134:

score: 0
Accepted
time: 188ms
memory: 32724kb

input:

56000 200000
8 1 1 1 1 1 1 1 1 20 1 1 1 1 1 1 15 1 1 1 1 1 1 1 1 1 1 5 11 1 1 6 1 17 1 8 15 5 1 9 1 1 1 1 1 1 1 1 1 1 15 11 1 8 13 9 1 1 9 1 1 1 14 1 9 1 1 1 1 9 1 1 1 1 1 1 1 1 1 7 5 1 9 1 1 1 1 1 1 1 7 9 1 1 1 1 27 1 7 1 15 1 1 1 1 1 6 1 1 1 5 1 1 7 1 1 1 1 15 1 13 6 1 1 1 14 13 1 1 1 1 1 1 1 1 13...

output:

6459988515

result:

ok 1 number(s): "6459988515"

Test #135:

score: 0
Accepted
time: 17ms
memory: 25192kb

input:

72000 200000
1 5 1 1 1 5 5 5 5 1 5 5 1 5 5 5 5 5 5 1 1 1 1 1 5 1 1 5 5 5 5 5 1 5 5 5 5 1 5 1 1 5 1 1 1 1 1 5 1 5 5 1 1 1 1 1 5 5 1 1 5 1 5 5 1 5 1 5 5 5 5 5 5 1 1 1 1 5 1 1 1 5 1 1 1 1 5 1 1 5 1 1 1 5 5 5 1 1 1 5 5 1 1 1 1 1 1 5 5 5 5 1 5 5 5 5 1 1 1 1 1 1 5 1 5 1 1 1 1 5 5 1 1 1 1 1 5 5 5 1 1 1 1 5...

output:

1280072001

result:

ok 1 number(s): "1280072001"

Test #136:

score: 0
Accepted
time: 2561ms
memory: 33984kb

input:

41000 200000
1 1 1 68 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 157 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6436544675

result:

ok 1 number(s): "6436544675"

Test #137:

score: 0
Accepted
time: 2955ms
memory: 33880kb

input:

42000 200000
1 1 1 1 1 17 1 1 1 1 1 1 1 1 1 1 1 1 235 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 66 1 59 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 82 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6464518453

result:

ok 1 number(s): "6464518453"

Test #138:

score: 0
Accepted
time: 1563ms
memory: 33624kb

input:

44000 200000
1 1 1 9 1 1 1 1 64 1 1 1 1 1 1 1 1 1 1 1 1 1 1 29 99 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 68 1 1 1 1 31 1 1 1 1 1 1 1 1 1 24 1 1 1 1 1 13 1 1 1 1 1 1 1 1 1 1 1 1 1 22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 49 1 1 1 1 1 1 ...

output:

6502429111

result:

ok 1 number(s): "6502429111"

Test #139:

score: 0
Accepted
time: 492ms
memory: 33400kb

input:

48000 200000
1 1 1 1 1 1 22 68 1 40 1 1 1 1 1 1 1 1 41 13 1 1 1 1 32 1 27 1 1 25 1 1 1 46 1 1 1 1 1 1 1 19 1 1 1 1 1 18 18 10 46 1 26 1 1 1 1 1 1 1 1 9 22 1 1 1 1 1 1 17 29 1 1 15 1 1 1 12 1 1 1 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 11 1 26 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 1 1 1 9 1 1 1 1 1 12 1...

output:

6475746645

result:

ok 1 number(s): "6475746645"

Test #140:

score: 0
Accepted
time: 85ms
memory: 32120kb

input:

56000 200000
1 1 9 1 1 1 1 1 1 1 1 1 9 12 8 1 1 1 1 1 1 8 1 1 13 1 12 1 1 1 1 1 1 1 1 1 1 1 1 8 1 8 1 1 1 1 1 1 1 1 8 1 1 9 1 1 1 9 14 11 10 1 1 9 1 1 1 8 1 9 9 8 1 1 1 1 1 1 1 1 1 1 1 1 1 9 1 1 1 1 1 1 1 1 1 9 12 1 1 1 1 1 1 8 1 22 1 1 1 8 8 1 10 12 1 1 8 8 9 1 11 1 1 1 1 1 11 1 1 12 1 1 1 1 9 9 8 ...

output:

6066581825

result:

ok 1 number(s): "6066581825"

Test #141:

score: 0
Accepted
time: 15ms
memory: 24760kb

input:

60000 200000
1 1 1 1 1 1 1 1 8 8 8 8 1 1 1 8 8 1 8 1 8 1 8 1 1 8 1 1 8 1 1 1 1 1 1 1 1 1 1 1 1 8 1 1 1 1 8 1 8 1 8 1 1 8 1 1 1 8 1 8 1 8 8 1 1 8 8 8 1 1 8 1 1 1 1 1 8 8 1 1 1 1 8 1 1 1 1 1 8 1 1 8 1 8 8 1 1 8 8 1 8 8 8 1 1 8 1 8 1 1 1 8 1 1 1 1 1 8 1 8 1 1 1 8 1 8 8 8 8 1 1 8 1 8 1 1 8 1 1 1 1 1 8 1...

output:

800060001

result:

ok 1 number(s): "800060001"

Test #142:

score: 0
Accepted
time: 3390ms
memory: 33972kb

input:

41000 200000
1 1 1 1 1 1 52 1 1 1 1 1 1 1 1 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 95 1 1 39 1 1 470 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 79 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6436102759

result:

ok 1 number(s): "6436102759"

Test #143:

score: 0
Accepted
time: 3220ms
memory: 33948kb

input:

42000 200000
1 1 1 1 1 125 1 1 1 1 1 1 1 1 1 1 1 1 1 1 219 1 1 1 1 1 1 1 1 1 1 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 35 1 1 1 1 1 1 1 1 1 1 1 1 1 25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6462518649

result:

ok 1 number(s): "6462518649"

Test #144:

score: 0
Accepted
time: 1512ms
memory: 33884kb

input:

44000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 76 1 1 11 1 1 34 1 1 1 42 1 1 1 1 1 1 1 54 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1 1 1 1 1 1 1 1 1 1 26 1 1 1 1 1 1 1 1 1 1 1 37 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 44 1 1 1 1 1 1 58 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6483860949

result:

ok 1 number(s): "6483860949"

Test #145:

score: 0
Accepted
time: 444ms
memory: 33792kb

input:

48000 200000
1 1 26 1 18 30 1 1 1 1 1 1 1 1 1 35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 24 1 1 13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 38 1 17 1 1 1 24 1 1 1 1 1 1 16 1 1 1 1 1 1 1 1 1 1 13 11 16 1 1 1 1 1 1 1 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 19 17 1 1 1 1 1 1 1 1 1 1 1 1 15 17 1 1 32 1 1 1 1 1 1...

output:

6413030053

result:

ok 1 number(s): "6413030053"

Test #146:

score: 0
Accepted
time: 11ms
memory: 24920kb

input:

56000 200000
1 1 10 1 1 1 1 1 10 1 1 10 10 10 10 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 10 1 1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 1 10 10 1 10 1 10 1 1 1 1 1 1 1 1 1 1 10 10 1 10 1 1 1 1 1 1 1 1 10 10 1 1 10 1 1 1 1 10 10 1 10 1 10 10 1 1 1 1 10 1 1 1 1 1 1 1 1 10 10 10 1 10 1 10 1...

output:

640056001

result:

ok 1 number(s): "640056001"

Test #147:

score: 0
Accepted
time: 2893ms
memory: 34348kb

input:

41000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 83 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 81 1 1 1 1 1 1 1 1 1 1 1 1 1 201 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6430840205

result:

ok 1 number(s): "6430840205"

Test #148:

score: 0
Accepted
time: 2400ms
memory: 34516kb

input:

42000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 145 1 1 1 1 29 62 1 1 49 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 104 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 101 1 1 1 1 31 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6439145653

result:

ok 1 number(s): "6439145653"

Test #149:

score: 0
Accepted
time: 842ms
memory: 33492kb

input:

44000 200000
1 1 1 1 31 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 36 39 1 1 1 1 1 1 1 1 69 1 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 99 1 1 1 30 1 1 1 1 1 1 1 1 1 1 34 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 47 1 1 1 1...

output:

6402250993

result:

ok 1 number(s): "6402250993"

Test #150:

score: 0
Accepted
time: 15ms
memory: 24808kb

input:

48000 200000
1 1 20 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 20 1 1 1 20 20 1 1 1 1 1 1 1 1 1 1 20 20 20 1 1 20 1 1 1 1 20 1 1 20 1 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 20 1 1 1 1 1 20 20 1 1 1 1 1 1 20 20 1 20 1 20 20 1 1 20 1 1 1 ...

output:

320048001

result:

ok 1 number(s): "320048001"

Test #151:

score: 0
Accepted
time: 2832ms
memory: 34140kb

input:

41000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 51 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 232 1 1 1 1 184 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6416444385

result:

ok 1 number(s): "6416444385"

Test #152:

score: 0
Accepted
time: 1627ms
memory: 33808kb

input:

42000 200000
80 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 110 1 1 1 1 1 1 1 1 1 1 1 1 104 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 86 1 1 57 57 1 1 1 1 1 1 1 1 49 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 42 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6396825195

result:

ok 1 number(s): "6396825195"

Test #153:

score: 0
Accepted
time: 16ms
memory: 24160kb

input:

44000 200000
1 40 1 1 1 1 1 1 1 1 1 40 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 40 1 1 1 1 1 1 40 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 40 40 1 1 1 40 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 40 1 40 1 1 1 1 1 1 1 40 1 1 40 1 1 1 1 1 1 1 1 40 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

160044001

result:

ok 1 number(s): "160044001"

Test #154:

score: 0
Accepted
time: 2596ms
memory: 33948kb

input:

41000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 231 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 173 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6392246101

result:

ok 1 number(s): "6392246101"

Test #155:

score: 0
Accepted
time: 22ms
memory: 24164kb

input:

42000 200000
1 1 1 1 1 1 1 1 1 1 1 80 1 1 1 1 1 1 1 1 1 1 1 1 1 80 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 80 80 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 80 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 80 1 80 80 1 1 1 1 1...

output:

80042001

result:

ok 1 number(s): "80042001"

Test #156:

score: 0
Accepted
time: 16ms
memory: 24160kb

input:

41000 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 160 1 1 1 1 1 1 1 160 160 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

40041001

result:

ok 1 number(s): "40041001"

Test #157:

score: 0
Accepted
time: 680ms
memory: 33988kb

input:

40140 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1036 1 ...

output:

6238834167

result:

ok 1 number(s): "6238834167"

Test #158:

score: 0
Accepted
time: 601ms
memory: 33484kb

input:

40120 200000
1 1 1 1 1 1 1 1611 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1083 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

6242533691

result:

ok 1 number(s): "6242533691"

Test #159:

score: 0
Accepted
time: 306ms
memory: 33776kb

input:

40070 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3933 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

6178767437

result:

ok 1 number(s): "6178767437"

Test #160:

score: 0
Accepted
time: 160ms
memory: 32960kb

input:

40040 200000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

5986029709

result:

ok 1 number(s): "5986029709"

Test #161:

score: 0
Accepted
time: 1ms
memory: 23760kb

input:

109 100
2 0 1 1 0 1 0 0 0 1 2 2 1 4 0 5 1 1 1 1 2 0 0 0 0 1 0 0 0 1 2 5 1 1 0 4 3 0 1 1 2 1 0 0 5 2 1 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 0 1 0 3 2 1 1 1 1 0 0 0 1 1 1 0 0 0 1 2 0 1 1 1 1 0 0 1 0 0 4 1 0 1 3 1 1

output:

6464

result:

ok 1 number(s): "6464"

Test #162:

score: 0
Accepted
time: 4ms
memory: 24324kb

input:

153 100
1 1 1 1 1 1 1 1 1 0 1 1 1 0 2 1 1 1 0 1 0 1 0 0 1 1 1 0 1 0 3 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 0 2 1 0 1 0 0 1 0 1 1 0 0 0 0 1 3 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 1 0 1 2 0 1 1 0 0 ...

output:

7128

result:

ok 1 number(s): "7128"

Test #163:

score: 0
Accepted
time: 654ms
memory: 35652kb

input:

94279 200000
0 1 1 1 1 0 1 0 0 0 1 1 1 1 1 0 1 1 1 1 0 1 3 1 1 0 0 1 1 1 1 0 1 0 1 28 1 1 1 0 5 50 2 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 1 7 1 6 0 0 1 0 1 0 0 0 1 3 1 1 1 0 0 1 0 0 1 0 1 0 1 1 9 1 1 0 0 0 0 1 1 4 1 1 1 0 1 1 1 0 17 0 1 0 0 0 1 0 0 0 1 0 23 0 0 1 6 1 0 1 0 0 0 26 1 1 1 0 0 1 36 0 1 24 2 0 ...

output:

15069119526

result:

ok 1 number(s): "15069119526"

Test #164:

score: 0
Accepted
time: 812ms
memory: 35452kb

input:

92230 200000
1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 89 0 6 0 19 1 1 1 1 1 0 1 1 5 1 1 1 0 2 0 1 0 0 0 0 0 1 1 4 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 0 0 1 65 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 0 0 1 1 27 1 1 0 1 0 0 28 1 1 33 1 1 0 1 0 1 0 5 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1...

output:

14696873705

result:

ok 1 number(s): "14696873705"