QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#150752#5434. Binary SubstringsTadijaSebezAC ✓16ms25432kbC++141.9kb2023-08-26 07:36:192023-08-26 07:36:20

Judging History

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

  • [2023-08-26 07:36:20]
  • 评测
  • 测评结果:AC
  • 用时:16ms
  • 内存:25432kb
  • [2023-08-26 07:36:19]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define pb push_back

const int N=400050;
vector<int> E[N];
int ptr[N];
vector<int> cyc;
void DFS(int u){
	while(true){
		if(ptr[u]==E[u].size()){
			cyc.pb(u);
			return;
		}
		DFS(E[u][ptr[u]++]);
	}
}

void Euler(int sz){
	for(int mask=0;mask<(1<<sz);mask++){
		E[mask].pb(mask>>1);
		E[mask].pb((mask>>1)|(1<<(sz-1)));
	}
	DFS(0);
}

string Solve(int sz,int n){
	vector<int> ord;
	vector<int> next(1<<sz,0);
	for(int i=0;i+1<cyc.size();i++){
		ord.pb((cyc[i]<<1)|(cyc[i+1]&1));
	}
	for(int i=0;i<ord.size();i++){
		next[ord[i]]=ord[(i+1)%ord.size()];
	}
	vector<int> p(1<<sz,0);
	for(int mask=0;mask<(1<<sz);mask++){
		p[mask]=next[mask]^1;
	}
	vector<bool> was(1<<sz,false);
	vector<int> sol;
	n-=1<<sz;
	n-=sz-1;
	int pos=-1;
	for(int i=0;i<(1<<sz);i++){
		int mask=ord[i];
		sol.pb(mask);
		if(!was[mask] && n>0){
			while(!was[mask]){
				was[mask]=true;
				sol.pb(p[mask]);
				mask=p[mask];
				n--;
				if(n==0){
					pos=i;
					break;
				}
			}
		}
		if(pos!=-1){
			break;
		}
	}
	if(pos!=-1){
		vector<int> tmp;
		for(int i=pos+1;i<(1<<sz);i++){
			tmp.pb(ord[i]);
		}
		for(int x:sol)tmp.pb(x);
		sol=tmp;
	}
	string ans="";
	for(int i=0;i<sz-1;i++){
		ans+='0'+(sol[0]>>(sz-1-i)&1);
	}
	for(int mask:sol){
		ans+='0'+(mask&1);
	}
	return ans;
}

void Brute(int n){
	int ans=0;
	string best="";
	for(int mask=0;mask<(1<<n);mask++){
		string now="";
		for(int i=0;i<n;i++){
			now+='0'+(mask>>i&1);
		}
		set<string> sub;
		for(int l=0;l<n;l++){
			for(int r=l;r<n;r++){
				sub.insert(now.substr(l,r-l+1));
			}
		}
		if(ans<sub.size()){
			ans=sub.size();
			best=now;
		}
	}
	printf("%s\n",best.c_str());
}

int main(){
	int n;
	scanf("%i",&n);
	if(n<=4){
		Brute(n);
		return 0;
	}
	int sz=1;
	while((1<<(sz+1))+sz<=n)sz++;

	Euler(sz-1);
	string ans=Solve(sz,n);
	printf("%s\n",ans.c_str());
	return 0;
}

詳細信息

Test #1:

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

input:

2

output:

10

result:

ok meet maximum 3

Test #2:

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

input:

5

output:

01100

result:

ok meet maximum 12

Test #3:

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

input:

1

output:

0

result:

ok meet maximum 1

Test #4:

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

input:

3

output:

100

result:

ok meet maximum 5

Test #5:

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

input:

4

output:

0100

result:

ok meet maximum 8

Test #6:

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

input:

6

output:

110010

result:

ok meet maximum 16

Test #7:

score: 0
Accepted
time: 3ms
memory: 13328kb

input:

7

output:

1100101

result:

ok meet maximum 21

Test #8:

score: 0
Accepted
time: 3ms
memory: 13100kb

input:

8

output:

10010111

result:

ok meet maximum 27

Test #9:

score: 0
Accepted
time: 3ms
memory: 13312kb

input:

9

output:

010111000

result:

ok meet maximum 34

Test #10:

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

input:

10

output:

0011101000

result:

ok meet maximum 42

Test #11:

score: 0
Accepted
time: 3ms
memory: 13068kb

input:

11

output:

01110100010

result:

ok meet maximum 50

Test #12:

score: 0
Accepted
time: 3ms
memory: 14544kb

input:

12

output:

011101000101

result:

ok meet maximum 59

Test #13:

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

input:

200000

output:

110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111101...

result:

ok meet maximum 19996962278

Test #14:

score: 0
Accepted
time: 3ms
memory: 13776kb

input:

24

output:

001111010110010000101001

result:

ok meet maximum 240

Test #15:

score: 0
Accepted
time: 0ms
memory: 14324kb

input:

35

output:

00010100110111000111110101100100000

result:

ok meet maximum 526

Test #16:

score: 0
Accepted
time: 0ms
memory: 14468kb

input:

30

output:

001111010110010000101001101110

result:

ok meet maximum 381

Test #17:

score: 0
Accepted
time: 3ms
memory: 14588kb

input:

45

output:

000111110110101110010100110001000001011001110

result:

ok meet maximum 882

Test #18:

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

input:

66

output:

001010011000100000101100111010001101111000011111101101010111001001

result:

ok meet maximum 1953

Test #19:

score: 0
Accepted
time: 3ms
memory: 13704kb

input:

50

output:

00011111011010111001010011000100000101100111010001

result:

ok meet maximum 1097

Test #20:

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

input:

80

output:

00001111110110111010101111001011001101001001110001010001100001000000101110011110

result:

ok meet maximum 2901

Test #21:

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

input:

107

output:

00001111110110111010101111001011001101001001110001010001100001000000101110011110100001101100011101111100000

result:

ok meet maximum 5277

Test #22:

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

input:

81

output:

000011111101101110101011110010110011010010011100010100011000010000001011100111101

result:

ok meet maximum 2976

Test #23:

score: 0
Accepted
time: 3ms
memory: 13564kb

input:

147

output:

000001111111011101101111010110101011111001011100110110011101001010100110010011110001011000110100010010001110000101000011000001000000010111100111110

result:

ok meet maximum 10124

Test #24:

score: 0
Accepted
time: 3ms
memory: 13232kb

input:

255

output:

011101101111010110101011111001011100110110011101001010100110010011110001011000110100010010001110000101000011000001000000010111100111110100000110111000111101100001110111111000000111111110111010100011001100010001010110010100100101101101001110010000100110101

result:

ok meet maximum 31130

Test #25:

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

input:

173

output:

00000111111101110110111101011010101111100101110011011001110100101010011001001111000101100011010001001000111000010100001100000100000001011110011111010000011011100011110110000

result:

ok meet maximum 14115

Test #26:

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

input:

288

output:

000000111111110111011110110111110101101101011101010101111110010111100110111001110110010101100110011110100101101001101010011100100101001001111100010111000110110001001100011101000101010001100100010001111000010110000110100001001000011100000101000001100000010000000010111110011111101000000110

result:

ok meet maximum 39850

Test #27:

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

input:

407

output:

101110111101101111101011011010111010101011111100101111001101110011101100101011001100111101001011010011010100111001001010010011111000101110001101100010011000111010001010100011001000100011110000101100001101000010010000111000001010000011000000100000000101111100111111010000001101111000111110110000011101...

result:

ok meet maximum 80310

Test #28:

score: 0
Accepted
time: 3ms
memory: 13100kb

input:

349

output:

101110111101101111101011011010111010101011111100101111001101110011101100101011001100111101001011010011010100111001001010010011111000101110001101100010011000111010001010100011001000100011110000101100001101000010010000111000001010000011000000100000000101111100111111010000001101111000111110110000011101...

result:

ok meet maximum 58821

Test #29:

score: 0
Accepted
time: 3ms
memory: 13384kb

input:

526

output:

000000011111111101111011101111101101101111110101101110101110110101111010101101010101111111001011111001101111001110111001010111001111011001011011001101011001110011001111101001011101001101101001110101001010101001100101001111001001011001001101001001001111110001011110001101110001001110001110110001010110...

result:

ok meet maximum 134925

Test #30:

score: 0
Accepted
time: 3ms
memory: 13208kb

input:

1018

output:

101011011101011101101011110101011010101011111110010111110011011110011101110010101110011110110010110110011010110011100110011111010010111010011011010011101010010101010011001010011110010010110010011010010010011111100010111100011011100010011100011101100010101100011001100011110100010110100011010100010010...

result:

ok meet maximum 510567

Test #31:

score: 0
Accepted
time: 3ms
memory: 13344kb

input:

1017

output:

101011011101011101101011110101011010101011111110010111110011011110011101110010101110011110110010110110011010110011100110011111010010111010011011010011101010010101010011001010011110010010110010011010010010011111100010111100011011100010011100011101100010101100011001100011110100010110100011010100010010...

result:

ok meet maximum 509558

Test #32:

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

input:

1209

output:

110111101111101110111111011011101101101111111010110111101011101110101111011010110101111101010110110101011101010101011111111001011111100110111110011101111001010111100111101110010110111001101011100111001111101100101110110011011011001110101100101010110011110011001011001100111111010010111101001101110100...

result:

ok meet maximum 721446

Test #33:

score: 0
Accepted
time: 3ms
memory: 13440kb

input:

1632

output:

101111101110111111011011101101101111111010110111101011101110101111011010110101111101010110110101011101010101011111111001011111100110111110011101111001010111100111101110010110111001101011100111001111101100101110110011011011001110101100101010110011110011001011001100111111010010111101001101110100111011...

result:

ok meet maximum 1318299

Test #34:

score: 0
Accepted
time: 0ms
memory: 13824kb

input:

1829

output:

101111101110111111011011101101101111111010110111101011101110101111011010110101111101010110110101011101010101011111111001011111100110111110011101111001010111100111101110010110111001101011100111001111101100101110110011011011001110101100101010110011110011001011001100111111010010111101001101110100111011...

result:

ok meet maximum 1657336

Test #35:

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

input:

3187

output:

101111101111011111101110111111101101110111011011110110110111111110101101111101011101111010111101110101111101101011011011010111010110101111110101011011101010111011010101111010101011010101010111111111001011111110011011111100111011111001010111110011110111100101101111001101011110011111011100101110111001...

result:

ok meet maximum 5049170

Test #36:

score: 0
Accepted
time: 3ms
memory: 13316kb

input:

2138

output:

000000000111111111110111110111101111110111011111110110111011101101111011011011111111010110111110101110111101011110111010111110110101101101101011101011010111111010101101110101011101101010111101010101101010101011111111100101111111001101111110011101111100101011111001111011110010110111100110101111001111...

result:

ok meet maximum 2267222

Test #37:

score: 0
Accepted
time: 3ms
memory: 14796kb

input:

4030

output:

110111011111110110111011101101111011011011111111010110111110101110111101011110111010111110110101101101101011101011010111111010101101110101011101101010111101010101101010101011111111100101111111001101111110011101111100101011111001111011110010110111100110101111001111101110010111011100110110111001110101...

result:

ok meet maximum 8082284

Test #38:

score: 0
Accepted
time: 3ms
memory: 14008kb

input:

6101

output:

111011111011111101111011111110111011101111111101101110111101101111011101101111101101101101111111110101101111110101110111110101111011110101111101110101101101110101110101111110110101101110110101110110110101111010110101111111010101101111010101110111010101111011010101101011010101111101010101101101010101...

result:

ok meet maximum 18549195

Test #39:

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

input:

5917

output:

111011111011111101111011111110111011101111111101101110111101101111011101101111101101101101111111110101101111110101110111110101111011110101111101110101101101110101110101111110110101101110110101110110110101111010110101111111010101101111010101110111010101111011010101101011010101111101010101101101010101...

result:

ok meet maximum 17445655

Test #40:

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

input:

6635

output:

111011111011111101111011111110111011101111111101101110111101101111011101101111101101101101111111110101101111110101110111110101111011110101111101110101101101110101110101111110110101101110110101110110110101111010110101111111010101101111010101110111010101111011010101101011010101111101010101101101010101...

result:

ok meet maximum 21943566

Test #41:

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

input:

9993

output:

111011111101111101111111011110111111110111011110111011101111111110110111011111011011110111101101111101110110111111011011011101101101101111111111010110111111101011101111110101111011111010111110111101011011011110101111110111010110111011101011101101110101111010111010111111101101011011110110101110111011...

result:

ok meet maximum 49821572

Test #42:

score: 0
Accepted
time: 3ms
memory: 13868kb

input:

14474

output:

110111111011111011111110111101111111101110111101110111011111111101101110111110110111101111011011111011101101111110110110111011011011011111111110101101111111010111011111101011110111110101111101111010110110111101011111101110101101110111010111011011101011110101110101111111011010110111101101011101110110...

result:

ok meet maximum 104583873

Test #43:

score: 0
Accepted
time: 3ms
memory: 13808kb

input:

11534

output:

111011111101111101111111011110111111110111011110111011101111111110110111011111011011110111101101111101110110111111011011011101101101101111111111010110111111101011101111110101111011111010111110111101011011011110101111110111010110111011101011101101110101111010111010111111101101011011110110101110111011...

result:

ok meet maximum 66388863

Test #44:

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

input:

19098

output:

111101111110111111101111101111111101111011111111101110111101111011101111101110111011111111110110111011111101101111011111011011111011110110111111011101101110110111111101101101110111011011011110110110110111111111110101101111111101011101111111010111101111110101111101111101011011011111010111111011110101...

result:

ok meet maximum 182141836

Test #45:

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

input:

31872

output:

101111111101111011111111101110111101111011101111101110111011111111110110111011111101101111011111011011111011110110111111011101101110110111111101101101110111011011011110110110110111111111110101101111111101011101111111010111101111110101111101111101011011011111010111111011110101101110111101011101101111...

result:

ok meet maximum 507514777

Test #46:

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

input:

27626

output:

110111111101111101111111101111011111111101110111101111011101111101110111011111111110110111011111101101111011111011011111011110110111111011101101110110111111101101101110111011011011110110110110111111111110101101111111101011101111111010111101111110101111101111101011011011111010111111011110101101110111...

result:

ok meet maximum 381257844

Test #47:

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

input:

43245

output:

111011111110111111011111111011111011111111101111011110111111111101110111101111101110111110111101110111111011101110111111111110110111011111110110111101111110110111110111110110111111011110110111111101110110111011101110110111101101110110111111110110110111011110110110111101110110110111110110110110110111...

result:

ok meet maximum 934503599

Test #48:

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

input:

34491

output:

111101111111011111101111111101111101111111110111101111011111111110111011110111110111011111011110111011111101110111011111111111011011101111111011011110111111011011111011111011011111101111011011111110111011011101110111011011110110111011011111111011011011101111011011011110111011011011111011011011011011...

result:

ok meet maximum 594380060

Test #49:

score: 0
Accepted
time: 5ms
memory: 15692kb

input:

64535

output:

011101110110111101101110110111111110110110111011110110110111101110110110111110110110110110111111111111010110111111111010111011111111010111101111111010111110111111010110110111111010111111011111010110111011111010111011011111010111111101111010110111101111010111011101111010111101101111010111110101111010...

result:

ok meet maximum 2081512994

Test #50:

score: 0
Accepted
time: 3ms
memory: 17608kb

input:

65746

output:

000000000000001111111111111111011111110111111110111111011111111101111101111111111011110111110111101111011111111111011101111011111101110111110111110111011111101111011101111111011101110111011111111111101101110111111110110111101111111011011111011111101101111110111110110111111101111011011101110111101101...

result:

ok meet maximum 2160380385

Test #51:

score: 0
Accepted
time: 6ms
memory: 17600kb

input:

65861

output:

000000000000001111111111111111011111110111111110111111011111111101111101111111111011110111110111101111011111111111011101111011111101110111110111110111011111101111011101111111011101110111011111111111101101110111111110110111101111111011011111011111101101111110111110110111111101111011011101110111101101...

result:

ok meet maximum 2167946005

Test #52:

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

input:

66725

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 2225209765

Test #53:

score: 0
Accepted
time: 6ms
memory: 17776kb

input:

86349

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 3726867681

Test #54:

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

input:

68454

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 2342045211

Test #55:

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

input:

112260

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 6299544960

Test #56:

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

input:

108023

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 5832941098

Test #57:

score: 0
Accepted
time: 8ms
memory: 18400kb

input:

103787

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 5384393176

Test #58:

score: 0
Accepted
time: 6ms
memory: 18628kb

input:

128710

output:

111010111101111111101011111011111110101101101111111010111111011111101011011101111110101110110111111010111111101111101011011110111110101110111011111010111101101111101011111010111111110111101011011111011110101110111101111010111101110111101011111011011110101101101101111010111111010111101011111111101110...

result:

ok meet maximum 8281268235

Test #59:

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

input:

129534

output:

110110110101101111011011010111011101101101011110110110110101111101011011010110110101111111101011010110111110101101011101111010110101111011101011010111110110101101011011011010110101110101101011010111111111110101011011111111010101110111111101010111101111110101011010111111010101111101111101010110110111...

result:

ok meet maximum 8387651991

Test #60:

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

input:

128670

output:

111010111101111111101011111011111110101101101111111010111111011111101011011101111110101110110111111010111111101111101011011110111110101110111011111010111101101111101011111010111111110111101011011111011110101110111101111010111101110111101011111011011110101101101101111010111111010111101011111111101110...

result:

ok meet maximum 8276121255

Test #61:

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

input:

154721

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 11967003302

Test #62:

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

input:

143149

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 10243718420

Test #63:

score: 0
Accepted
time: 7ms
memory: 23048kb

input:

134065

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 8984762318

Test #64:

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

input:

163454

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 13356170345

Test #65:

score: 0
Accepted
time: 6ms
memory: 24212kb

input:

139150

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 9679327553

Test #66:

score: 0
Accepted
time: 9ms
memory: 24228kb

input:

172380

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 14854850208

Test #67:

score: 0
Accepted
time: 8ms
memory: 23192kb

input:

178166

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 15868884317

Test #68:

score: 0
Accepted
time: 9ms
memory: 22832kb

input:

143651

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 10315696937

Test #69:

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

input:

198199

output:

110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111101...

result:

ok meet maximum 19638413795

Test #70:

score: 0
Accepted
time: 7ms
memory: 24380kb

input:

186272

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 17345817782

Test #71:

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

input:

198102

output:

110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111101...

result:

ok meet maximum 19619194797

Test #72:

score: 0
Accepted
time: 0ms
memory: 14644kb

input:

8201

output:

101001011011101001101011101001110011101001111101101001011101101001101101101001110101101001010101101001100101101001111001101001011001101001101001111110101001011110101001101110101001110110101001010110101001100110101001111010101001011010101001101010101001110010101001111100101001011100101001101100101001...

result:

ok meet maximum 33542145

Test #73:

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

input:

8202

output:

101001011011101001101011101001110011101001111101101001011101101001101101101001110101101001010101101001100101101001111001101001011001101001101001111110101001011110101001101110101001110110101001010110101001100110101001111010101001011010101001101010101001110010101001111100101001011100101001101100101001...

result:

ok meet maximum 33550335

Test #74:

score: 0
Accepted
time: 3ms
memory: 13688kb

input:

8203

output:

000000000001011111111100111111111101000000000011011111111000111111111011000000000111011111110000111111110111000000001111011111100000111111101111000000011111011111000000111111011111111111000000000001111111111111011111010000111111001110000000100001110111011100001111000010110000101101001101010010110010...

result:

ok meet maximum 33558526

Test #75:

score: 0
Accepted
time: 3ms
memory: 15240kb

input:

8204

output:

000000000000111111111111101111110111110111111101111011111111011101111011101110111111111011011101111101101111011110110111110111011011111101101101110110110110111111111101011011111110101110111111010111101111101011111011110101101101111010111111011101011011101110101110110111010111101011101011111110110101...

result:

ok meet maximum 33566718

Test #76:

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

input:

8205

output:

000000000001111111111111011111101111101111111011110111111110111011110111011101111111110110111011111011011110111101101111101110110111111011011011101101101101111111111010110111111101011101111110101111011111010111110111101011011011110101111110111010110111011101011101101110101111010111010111111101101011...

result:

ok meet maximum 33574910

Test #77:

score: 0
Accepted
time: 3ms
memory: 14624kb

input:

8206

output:

000000000001111111111111011111101111101111111011110111111110111011110111011101111111110110111011111011011110111101101111101110110111111011011011101101101101111111111010110111111101011101111110101111011111010111110111101011011011110101111110111010110111011101011101101110101111010111010111111101101011...

result:

ok meet maximum 33583103

Test #78:

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

input:

16394

output:

101001101101110100111010111010010101011101001100101110100111100111010010110011101001111110110100101111011010011011101101001110110110100101011011010011001101101001111010110100101101011010011010101101001110010110100111110011010010111001101001101100110100111010011010011111110101001011111010100110111101...

result:

ok meet maximum 134193153

Test #79:

score: 0
Accepted
time: 3ms
memory: 13972kb

input:

16395

output:

101001101101110100111010111010010101011101001100101110100111100111010010110011101001111110110100101111011010011011101101001110110110100101011011010011001101101001111010110100101101011010011010101101001110010110100111110011010010111001101001101100110100111010011010011111110101001011111010100110111101...

result:

ok meet maximum 134209535

Test #80:

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

input:

16396

output:

000000000000101111111111001111111111101000000000001101111111110001111111111011000000000011101111111100001111111110111000000000111101111111000001111111101111000000001111101111110000001111111011111000000011111101111111111110000000000001111111111111101111110100001111111001110000000010000111101110111110...

result:

ok meet maximum 134225918

Test #81:

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

input:

16397

output:

000000000000011111111111111011111101111111011111011111111011110111111111011101111011110111011111011101110111111111101101110111111011011110111110110111110111101101111110111011011101101111111011011011101110110110111101101101101111111111101011011111111010111011111110101111011111101011111011111010110110...

result:

ok meet maximum 134242302

Test #82:

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

input:

16398

output:

000000000000111111111111110111111011111110111110111111110111101111111110111011110111101110111110111011101111111111011011101111110110111101111101101111101111011011111101110110111011011111110110110111011101101101111011011011011111111111010110111111110101110111111101011110111111010111110111110101101101...

result:

ok meet maximum 134258686

Test #83:

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

input:

16399

output:

000000000000111111111111110111111011111110111110111111110111101111111110111011110111101110111110111011101111111111011011101111110110111101111101101111101111011011111101110110111011011111110110110111011101101101111011011011011111111111010110111111110101110111111101011110111111010111110111110101101101...

result:

ok meet maximum 134275071

Test #84:

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

input:

32779

output:

001001001001010010010010011111111111000101111111110001101111111100010011111111000111011111110001010111111100011001111111000111101111110001011011111100011010111111000100101111110001110011111100010100111111000111110111110001011101111100011011011111000100110111110001110101111100010101011111000110010111...

result:

ok meet maximum 536821761

Test #85:

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

input:

32780

output:

001001001001010010010010011111111111000101111111110001101111111100010011111111000111011111110001010111111100011001111111000111101111110001011011111100011010111111000100101111110001110011111100010100111111000111110111110001011101111100011011011111000100110111110001110101111100010101011111000110010111...

result:

ok meet maximum 536854527

Test #86:

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

input:

32781

output:

000000000000010111111111110011111111111101000000000000110111111111100011111111111011000000000001110111111111000011111111110111000000000011110111111110000011111111101111000000000111110111111100000011111111011111000000001111110111111000000011111110111111111111100000000000001111111111111110111111010000...

result:

ok meet maximum 536887294

Test #87:

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

input:

32782

output:

000000000000001111111111111110111111101111110111111110111110111111111011110111101111111111011101111011111011101111101111011101111110111011101111111111101101110111111101101111011111101101111101111101101111110111101101111111011101101110111011101101111011011101101111111101101101110111101101101111011101...

result:

ok meet maximum 536920062

Test #88:

score: 0
Accepted
time: 6ms
memory: 15144kb

input:

32783

output:

000000000000011111111111111101111111011111101111111101111101111111110111101111011111111110111011110111110111011111011110111011111101110111011111111111011011101111111011011110111111011011111011111011011111101111011011111110111011011101110111011011110110111011011111111011011011101111011011011110111011...

result:

ok meet maximum 536952830

Test #89:

score: 0
Accepted
time: 6ms
memory: 15424kb

input:

32784

output:

000000000000011111111111111101111111011111101111111101111101111111110111101111011111111110111011110111110111011111011110111011111101110111011111111111011011101111111011011110111111011011111011111011011111101111011011111110111011011101110111011011110110111011011111111011011011101111011011011110111011...

result:

ok meet maximum 536985599

Test #90:

score: 0
Accepted
time: 3ms
memory: 15568kb

input:

65548

output:

110100010111011110100011011011110100010011011110100011101011110100010101011110100011001011110100011110011110100010110011110100011010011110100010010011110100011100011110100011111101110100010111101110100011011101110100010011101110100011101101110100010101101110100011001101110100011110101110100010110101...

result:

ok meet maximum 2147385345

Test #91:

score: 0
Accepted
time: 0ms
memory: 15340kb

input:

65549

output:

110100010111011110100011011011110100010011011110100011101011110100010101011110100011001011110100011110011110100010110011110100011010011110100010010011110100011100011110100011111101110100010111101110100011011101110100010011101110100011101101110100010101101110100011001101110100011110101110100010110101...

result:

ok meet maximum 2147450879

Test #92:

score: 0
Accepted
time: 3ms
memory: 15340kb

input:

65550

output:

000000000000001011111111111100111111111111101000000000000011011111111111000111111111111011000000000000111011111111110000111111111110111000000000001111011111111100000111111111101111000000000011111011111111000000111111111011111000000000111111011111110000000111111110111111000000001111111011111111111111...

result:

ok meet maximum 2147516414

Test #93:

score: 0
Accepted
time: 9ms
memory: 17908kb

input:

65551

output:

000000000000000111111111111111101111111011111111011111101111111110111110111111111101111011111011110111101111111111101110111101111110111011111011111011101111110111101110111111101110111011101111111111110110111011111111011011110111111101101111101111110110111111011111011011111110111101101110111011110110...

result:

ok meet maximum 2147581950

Test #94:

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

input:

65552

output:

000000000000001111111111111111011111110111111110111111011111111101111101111111111011110111110111101111011111111111011101111011111101110111110111110111011111101111011101111111011101110111011111111111101101110111111110110111101111111011011111011111101101111110111110110111111101111011011101110111101101...

result:

ok meet maximum 2147647486

Test #95:

score: 0
Accepted
time: 9ms
memory: 17528kb

input:

65553

output:

000000000000001111111111111111011111110111111110111111011111111101111101111111111011110111110111101111011111111111011101111011111101110111110111110111011111101111011101111111011101110111011111111111101101110111111110110111101111111011011111011111101101111110111110110111111101111011011101110111101101...

result:

ok meet maximum 2147713023

Test #96:

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

input:

131085

output:

110100011011101111010001001110111101000111011011110100010101101111010001100110111101000111101011110100010110101111010001101010111101000100101011110100011100101111010001010010111101000110001011110100011111001111010001011100111101000110110011110100010011001111010001110100111101000101010011110100011001...

result:

ok meet maximum 8589737985

Test #97:

score: 0
Accepted
time: 3ms
memory: 18580kb

input:

131086

output:

110100011011101111010001001110111101000111011011110100010101101111010001100110111101000111101011110100010110101111010001101010111101000100101011110100011100101111010001010010111101000110001011110100011111001111010001011100111101000110110011110100010011001111010001110100111101000101010011110100011001...

result:

ok meet maximum 8589869055

Test #98:

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

input:

131087

output:

000000000000000101111111111111001111111111111101000000000000001101111111111110001111111111111011000000000000011101111111111100001111111111110111000000000000111101111111111000001111111111101111000000000001111101111111110000001111111111011111000000000011111101111111100000001111111110111111000000000111...

result:

ok meet maximum 8590000126

Test #99:

score: 0
Accepted
time: 7ms
memory: 23864kb

input:

131088

output:

000000000000000011111111111111111011111111011111110111111111011111101111111111011111011111111111011110111110111110111101111110111101111011111111111101110111101111111011101111101111110111011111101111101110111111101111011101111111101110111011110111011101110111111111111101101110111111111011011110111111...

result:

ok meet maximum 8590131198

Test #100:

score: 0
Accepted
time: 6ms
memory: 23848kb

input:

131089

output:

000000000000000111111111111111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111...

result:

ok meet maximum 8590262270

Test #101:

score: 0
Accepted
time: 0ms
memory: 24216kb

input:

131090

output:

000000000000000111111111111111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111...

result:

ok meet maximum 8590393343

Test #102:

score: 0
Accepted
time: 0ms
memory: 14128kb

input:

8197

output:

101001011011101001101011101001110011101001111101101001011101101001101101101001110101101001010101101001100101101001111001101001011001101001101001111110101001011110101001101110101001110110101001010110101001100110101001111010101001011010101001101010101001110010101001111100101001011100101001101100101001...

result:

ok meet maximum 33509395

Test #103:

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

input:

16328

output:

110100111011111010010101111101001100111110100111101111010010110111101001101011110100111001111010011111011101001011101110100110110111010011101011101001010101110100110010111010011110011101001011001110100111111011010010111101101001101110110100111011011010010101101101001100110110100111101011010010110101...

result:

ok meet maximum 133114152

Test #104:

score: 0
Accepted
time: 0ms
memory: 14416kb

input:

32608

output:

100101101101111001101011011110011111010111100101110101111001101101011110011101010111100101010101111001111110011110010111100111100111111110111001011111101110011011111011100111011110111001010111101110011110111011100101101110111001101011101110011111011011100101110110111001101101101110011101011011100101...

result:

ok meet maximum 531233481

Test #105:

score: 0
Accepted
time: 3ms
memory: 16108kb

input:

65141

output:

110100101110111110100110110111110100111010111110100101010111110100110010111110100111100111110100101100111110100111111011110100101111011110100110111011110100111011011110100101011011110100110011011110100111101011110100101101011110100110101011110100111001011110100111110011110100101110011110100110110011...

result:

ok meet maximum 2120796035

Test #106:

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

input:

130420

output:

110100101011101111010011001110111101001111011011110100101101101111010011010110111101001110011011110100111110101111010010111010111101001101101011110100111010101111010010101010111101001100101011110100111100101111010010110010111101001111110011110100101111001111010011011100111101001110110011110100101011...

result:

ok meet maximum 8502797880

Test #107:

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

input:

8265

output:

000000000001111111111111011111101111101111111011110111111110111011110111011101111111110110111011111011011110111101101111101110110111111011011011101101101101111111111010110111111101011101111110101111011111010111110111101011011011110101111110111010110111011101011101101110101111010111010111111101101011...

result:

ok meet maximum 34068260

Test #108:

score: 0
Accepted
time: 3ms
memory: 15492kb

input:

16508

output:

000000000000111111111111110111111011111110111110111111110111101111111110111011110111101110111110111011101111111111011011101111110110111101111101101111101111011011111101110110111011011111110110110111011101101101111011011011011111111111010110111111110101110111111101011110111111010111110111110101101101...

result:

ok meet maximum 136067031

Test #109:

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

input:

33008

output:

000000000000011111111111111101111111011111101111111101111101111111110111101111011111111110111011110111110111011111011110111011111101110111011111111111011011101111111011011110111111011011111011111011011111101111011011111110111011011101110111011011110110111011011111111011011011101111011011011110111011...

result:

ok meet maximum 544351055

Test #110:

score: 0
Accepted
time: 7ms
memory: 17560kb

input:

65964

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 2174733396

Test #111:

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

input:

131692

output:

111110111111110111111101111111110111111011111111110111110111111111110111101111101111101111011111101111011110111111111111011101111011111110111011111011111101110111111011111011101111111011110111011111111011101110111101110111011101111111111111011011101111111110110111101111111101101111101111111011011111...

result:

ok meet maximum 8669480792

Test #112:

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

input:

15843

output:

111101110111101110111011111111101101110111110110111101111011011111011101101111110110110111011011011011111111110101101111111010111011111101011110111110101111101111010110110111101011111101110101101110111010111011011101011110101110101111111011010110111101101011101110110101111011011010111110101101011011...

result:

ok meet maximum 125318747

Test #113:

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

input:

31560

output:

101111111101111011111111101110111101111011101111101110111011111111110110111011111101101111011111011011111011110110111111011101101110110111111101101101110111011011011110110110110111111111110101101111111101011101111111010111101111110101111101111101011011011111010111111011110101101110111101011101101111...

result:

ok meet maximum 497623597

Test #114:

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

input:

64241

output:

011110111101111111111011101111011111011101111101111011101111110111011101111111111101101110111111101101111011111101101111101111101101111110111101101111111011101101110111011101101111011011101101111111101101101110111101101101111011101101101111101101101101101111111111110101101111111110101110111111110101...

result:

ok meet maximum 2062587185

Test #115:

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

input:

73307

output:

111110111111101111111101111110111111111011111011111111110111101111101111011110111111111110111011110111111011101111101111101110111111011110111011111110111011101110111111111111011011101111111101101111011111110110111110111111011011111101111101101111111011110110111011101111011011110110111111110111011011...

result:

ok meet maximum 2685953056

Test #116:

score: 0
Accepted
time: 8ms
memory: 20024kb

input:

129593

output:

110110110101101111011011010111011101101101011110110110110101111101011011010110110101111111101011010110111110101101011101111010110101111011101011010111110110101101011011011010110101110101101011010111111111110101011011111111010101110111111101010111101111110101011010111111010101111101111101010110110111...

result:

ok meet maximum 8395295323