QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#546378#6355. 5OthersAC ✓3973ms35960kbC++142.1kb2024-09-04 00:13:022024-09-04 00:13:03

Judging History

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

  • [2024-09-04 00:13:03]
  • 评测
  • 测评结果:AC
  • 用时:3973ms
  • 内存:35960kb
  • [2024-09-04 00:13:02]
  • 提交

answer

// 
#include <bits/stdc++.h>
#define ll long long
#define int long long
#define db long double
#define x first
#define y second
#define wdnmd const int mod=::mod;
#define eps 1e-12
#define lb(i) ((i)&(-(i)))
#define wr(x,ch) write(x),putchar(ch)
using namespace std;
typedef pair<int,char> paic;
typedef pair<int,int> pai;
typedef pair<pai,int> paii;
typedef pair<pai,pai> ppai;
typedef pair<ppai,int> ppaii;
pai operator+(const pai &x,const pai &y) {return pai(x.x+y.x,x.y+y.y);}
pai operator-(const pai &x,const pai &y) {return pai(x.x-y.x,x.y-y.y);}
#define gh() getchar()
inline long long read() {
	char ch=gh();
	long long x=0;
	char t=0;
	while(ch<'0'||ch>'9')   t|=ch=='-',ch=gh();
	while(ch>='0'&&ch<='9') x=x*10+(ch^48),ch=gh();
	return t?-x:x;
}
void write(ll x) {
    if(x<0) putchar('-'),x=-x;
    if(x>=10) write(x/10);
    putchar(x%10^48);
    return ;
}
typedef vector<pai> vec;
const int N=1e6+5,inf=0x3f3f3f3f;
vec dp[N];
int now,ans,cnt[N],n,S;
void ins(vec &x,pai t) {
	if(now+1<t.x) 
		x.push_back(t),now=t.y;
	else 
		x[x.size()-1].y=now=max(now,t.y);
	return ;
}
vec merge(vec &xx,int del,vec &y) {
	vec z,x;
	for(auto &lxl:xx) x.push_back(pai(lxl.x+del,lxl.y+del));
	int p=0,q=0;now=-inf;
	while(p<x.size()||q<y.size()) {
		if(q==y.size()||(p<x.size()&&x[p].x<y[q].x)) ins(z,x[p++]);
		else ins(z,y[q++]);
	}
	return z;
}
void add(int v,int w) {
	int del=-1,st=cnt[0]+S,ed=0;
	if(w<0) 
		swap(st,ed),del*=-1;
	for(int i=st;;i+=del) {
		if(dp[i].empty()) {
			if(i==ed) break;
			continue;
		}
		if(i+w<0||i+w>cnt[0]+S) continue;
		dp[i+w]=merge(dp[i],v,dp[i+w]);
		if(i==ed) break;
	}
	return ;
}
signed main() {
	n=read(),S=read();
	for(int i=1;i<=n;i++) 
		cnt[read()]++;
	dp[cnt[0]].push_back(pai(0,cnt[1]));
	for(int i=0;i<=S;i++) {
		if(i==1) continue;
		for(int j=0;j<=20;j++) 
			if((1<<j)<=cnt[i]) {
				cnt[i]-=(1<<j);
				add(1<<j,(i-1)*(1<<j));
			}
		if(cnt[i]) add(cnt[i],(i-1)*cnt[i]);
	}
	for(int i=0;i<=S+cnt[0];i++) 
		for(const auto &lxl:dp[i]) 
			ans+=lxl.y-lxl.x+1;
	wr(ans,'\n');
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

7 9
0 0 0 1 1 2 5

output:

42

result:

ok 1 number(s): "42"

Test #2:

score: 0
Accepted
time: 2ms
memory: 27212kb

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: 3ms
memory: 28280kb

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: 0ms
memory: 27212kb

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: 8ms
memory: 28404kb

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: 6ms
memory: 27652kb

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: 26ms
memory: 28860kb

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: 65ms
memory: 28716kb

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: 658ms
memory: 32612kb

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: 685ms
memory: 31604kb

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: 879ms
memory: 31948kb

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: 982ms
memory: 33208kb

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: 1159ms
memory: 31600kb

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: 1366ms
memory: 32060kb

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: 1810ms
memory: 32740kb

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: 2204ms
memory: 32552kb

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: 2178ms
memory: 32320kb

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: 2174ms
memory: 32876kb

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: 2027ms
memory: 32792kb

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: 1437ms
memory: 34088kb

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: 1234ms
memory: 32264kb

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: 861ms
memory: 32564kb

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: 476ms
memory: 33176kb

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: 667ms
memory: 33560kb

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: 178ms
memory: 32860kb

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: 157ms
memory: 33624kb

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: 114ms
memory: 33368kb

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: 45ms
memory: 32220kb

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: 25ms
memory: 32984kb

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: 9ms
memory: 30944kb

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: 8ms
memory: 29168kb

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: 8ms
memory: 27172kb

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: 7ms
memory: 30260kb

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: 3ms
memory: 29656kb

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: 651ms
memory: 31804kb

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: 636ms
memory: 32056kb

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: 633ms
memory: 32008kb

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: 631ms
memory: 33512kb

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: 647ms
memory: 32480kb

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: 642ms
memory: 32732kb

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: 674ms
memory: 33996kb

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: 688ms
memory: 33800kb

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: 659ms
memory: 33272kb

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: 645ms
memory: 33280kb

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: 678ms
memory: 33120kb

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: 714ms
memory: 31864kb

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: 745ms
memory: 33140kb

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: 783ms
memory: 32684kb

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: 8ms
memory: 30308kb

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: 4ms
memory: 30064kb

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: 8ms
memory: 28388kb

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: 6ms
memory: 27004kb

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: 23ms
memory: 31216kb

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: 70ms
memory: 35632kb

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: 113ms
memory: 32372kb

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: 142ms
memory: 33904kb

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: 177ms
memory: 32620kb

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: 360ms
memory: 33212kb

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: 687ms
memory: 33776kb

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: 974ms
memory: 33280kb

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: 1240ms
memory: 32632kb

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: 1477ms
memory: 32380kb

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: 2017ms
memory: 32980kb

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: 2156ms
memory: 32536kb

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: 1896ms
memory: 31900kb

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: 1338ms
memory: 32628kb

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: 787ms
memory: 32548kb

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: 245ms
memory: 31756kb

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: 211ms
memory: 30260kb

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: 332ms
memory: 31388kb

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: 667ms
memory: 31820kb

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: 923ms
memory: 32956kb

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: 1310ms
memory: 32280kb

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: 1889ms
memory: 32736kb

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: 2428ms
memory: 32524kb

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: 2464ms
memory: 34052kb

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: 2456ms
memory: 33996kb

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: 2318ms
memory: 33324kb

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: 249ms
memory: 31492kb

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: 365ms
memory: 30964kb

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: 748ms
memory: 32856kb

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: 1034ms
memory: 33584kb

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: 1416ms
memory: 32828kb

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: 2159ms
memory: 34048kb

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: 2708ms
memory: 34548kb

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: 2709ms
memory: 33124kb

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: 2724ms
memory: 33620kb

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: 2694ms
memory: 34404kb

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: 1991ms
memory: 33604kb

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: 262ms
memory: 31772kb

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: 398ms
memory: 33232kb

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: 800ms
memory: 32668kb

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: 1078ms
memory: 32872kb

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: 1561ms
memory: 33676kb

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: 2352ms
memory: 33152kb

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: 2949ms
memory: 34368kb

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: 3062ms
memory: 33000kb

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: 3097ms
memory: 33596kb

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: 2942ms
memory: 33980kb

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: 2290ms
memory: 34144kb

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: 348ms
memory: 32912kb

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: 527ms
memory: 32404kb

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: 1019ms
memory: 33168kb

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: 1402ms
memory: 34356kb

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: 1924ms
memory: 33816kb

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: 2927ms
memory: 34176kb

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: 3816ms
memory: 35960kb

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: 3874ms
memory: 35396kb

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: 3973ms
memory: 34480kb

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: 3959ms
memory: 34368kb

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: 3169ms
memory: 34668kb

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: 247ms
memory: 32776kb

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: 462ms
memory: 33284kb

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: 928ms
memory: 34184kb

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: 1220ms
memory: 33712kb

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: 1779ms
memory: 34444kb

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: 2666ms
memory: 34776kb

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: 3433ms
memory: 34840kb

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: 3584ms
memory: 35716kb

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: 3703ms
memory: 35532kb

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: 3689ms
memory: 35364kb

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: 3088ms
memory: 35296kb

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: 1458ms
memory: 33748kb

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: 2054ms
memory: 32956kb

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: 2132ms
memory: 33124kb

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: 1876ms
memory: 32616kb

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: 1270ms
memory: 32532kb

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: 638ms
memory: 32216kb

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: 177ms
memory: 32612kb

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: 1460ms
memory: 34060kb

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: 2030ms
memory: 32816kb

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: 2133ms
memory: 33572kb

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: 1775ms
memory: 31828kb

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: 1078ms
memory: 31844kb

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: 12ms
memory: 29728kb

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: 1480ms
memory: 33348kb

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: 2084ms
memory: 33224kb

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: 2105ms
memory: 31904kb

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: 1606ms
memory: 31800kb

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: 637ms
memory: 33720kb

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: 4ms
memory: 28376kb

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: 1495ms
memory: 33140kb

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: 2030ms
memory: 32944kb

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: 2129ms
memory: 31912kb

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: 1469ms
memory: 33380kb

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: 10ms
memory: 28240kb

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: 1541ms
memory: 33512kb

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: 2095ms
memory: 32824kb

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: 1829ms
memory: 32828kb

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: 11ms
memory: 29244kb

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: 1665ms
memory: 32312kb

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: 1975ms
memory: 33868kb

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: 7ms
memory: 29196kb

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: 1676ms
memory: 32664kb

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: 7ms
memory: 28752kb

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: 9ms
memory: 27308kb

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: 360ms
memory: 33708kb

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: 312ms
memory: 32652kb

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: 164ms
memory: 33072kb

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: 74ms
memory: 33400kb

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: 8ms
memory: 27840kb

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: 8ms
memory: 27476kb

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: 2378ms
memory: 33884kb

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: 2491ms
memory: 33684kb

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"