QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#155218#5434. Binary SubstringsqzezAC ✓9ms9652kbC++141.4kb2023-09-01 14:12:542023-09-01 14:12:54

Judging History

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

  • [2023-09-01 14:12:54]
  • 评测
  • 测评结果:AC
  • 用时:9ms
  • 内存:9652kb
  • [2023-09-01 14:12:54]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
const int N=2e5+10,V=1<<18;
int T,n,m,k;
int p[V],q[V],t[V],id[V];
int top,s[V],vis[V];
void get(){
	cin>>n;
	for(m=1;m-1+(1<<m)<=n;m++);
	k=1<<--m;
	for(int i=0;i<k;i++){
		p[i]=(i<<1)&k-1;
		q[i]=(i<<1|1)&k-1;
	}
	fill(id,id+k,-1);
	for(int i=0;i<k;i++)if(!~id[i]){
		for(int x=i;;){
			id[x]=i;
			if(p[x]==i);
			else if(q[x]==i)swap(p[x],q[x]);
			else{
				if(~id[p[x]])swap(p[x],q[x]);
			}
			t[p[x]]=x;
			x=p[x];
			if(x==i)break;
		}
	}
	vector<int>stk;
	for(int i=0;i<k;i++){
		if(id[q[i]]!=id[i])stk.push_back(i);
	}
	for(int u;!stk.empty();){
		u=stk.back(),stk.pop_back();
		if(id[q[u]]==id[u])continue;
		int v=q[u],x=t[v],y=p[u];
		swap(p[u],q[u]),swap(p[x],q[x]);
		t[p[u]]=u,t[p[x]]=x;
		int a=v,b=y;
		for(;a!=x&&b!=u;a=p[a],b=p[b]);
		if(a==x){
			for(int i=v;i!=x;i=p[i])id[i]=id[u];
			id[x]=id[u];
		}else{
			for(int i=y;i!=u;i=p[i])id[i]=id[v];
			id[u]=id[v];
		}
	}
	int cnt=n-m+1-k;
	top=0;
	string ans="";
	int st=1;
	fill(vis,vis+k,0);
	for(int i=0,x=0;i<k;i++,x=p[x]){
		if(cnt){
			for(int u=x;!vis[u]&&cnt;cnt--,u=q[u])vis[u]=1,s[++top]=u;
			if(!cnt)st=top+1;
		}
		s[++top]=x;
	}
	int u=s[st];
	for(int i=m-1;~i;i--)ans+=(u>>i&1)+48;
	for(;st=st%top+1,u=s[st],ans.length()<n;)ans+=(u&1)+48;
	cout<<ans<<endl;
}
int main(){
	get();
	return 0;
}

详细

Test #1:

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

input:

2

output:

01

result:

ok meet maximum 3

Test #2:

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

input:

5

output:

00110

result:

ok meet maximum 12

Test #3:

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

input:

1

output:

0

result:

ok meet maximum 1

Test #4:

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

input:

3

output:

010

result:

ok meet maximum 5

Test #5:

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

input:

4

output:

1001

result:

ok meet maximum 8

Test #6:

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

input:

6

output:

001100

result:

ok meet maximum 16

Test #7:

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

input:

7

output:

0110001

result:

ok meet maximum 21

Test #8:

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

input:

8

output:

01100010

result:

ok meet maximum 27

Test #9:

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

input:

9

output:

110001011

result:

ok meet maximum 34

Test #10:

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

input:

10

output:

0001011100

result:

ok meet maximum 42

Test #11:

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

input:

11

output:

00010111000

result:

ok meet maximum 50

Test #12:

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

input:

12

output:

001011100001

result:

ok meet maximum 59

Test #13:

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

input:

200000

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 19996962278

Test #14:

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

input:

24

output:

000100110101111000001110

result:

ok meet maximum 240

Test #15:

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

input:

35

output:

11110000011101100101000100110101111

result:

ok meet maximum 526

Test #16:

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

input:

30

output:

000100110101111000001110110010

result:

ok meet maximum 381

Test #17:

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

input:

45

output:

000010001100111010010101101111100000011110110

result:

ok meet maximum 882

Test #18:

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

input:

66

output:

000010001100111010010101101111100000011110110001011100100110101000

result:

ok meet maximum 1953

Test #19:

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

input:

50

output:

00001000110011101001010110111110000001111011000101

result:

ok meet maximum 1097

Test #20:

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

input:

80

output:

00000100001100011100100101100111101000101001101010111011011111100000001111101110

result:

ok meet maximum 2901

Test #21:

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

input:

107

output:

00000100001100011100100101100111101000101001101010111011011111100000001111101110001001110101101001000110110

result:

ok meet maximum 5277

Test #22:

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

input:

81

output:

000001000011000111001001011001111010001010011010101110110111111000000011111011100

result:

ok meet maximum 2976

Test #23:

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

input:

147

output:

000000100000110000111000101100011110010001001001100101110011111010000101000110100111010100101010110101111011001101101110111111100000000111111011100

result:

ok meet maximum 10124

Test #24:

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

input:

255

output:

000000100000110000111000101100011110010001001001100101110011111010000101000110100111010100101010110101111011001101101110111111100000000111111011100001001111010110010010110110000010111110011000100011101101000101011101001000011011110001100111001010011010101

result:

ok meet maximum 31130

Test #25:

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

input:

173

output:

00000010000011000011100010110001111001000100100110010111001111101000010100011010011101010010101011010111101100110110111011111110000000011111101110000100111101011001001011011

result:

ok meet maximum 14115

Test #26:

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

input:

288

output:

000000010000001100000111000010110000111100010001001100010111000111110010000100100011001001110010101100101111001100110111001111110100000101000011010001110100100101001011010011110101000101010011010101011101011111011000110110011101101011011011110111011111111000000000111111101111000011001111

result:

ok meet maximum 39850

Test #27:

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

input:

407

output:

000001000000110000011100001011000011110001000100110001011100011111001000010010001100100111001010110010111100110011011100111111010000010100001101000111010010010100101101001111010100010101001101010101110101111101100011011001110110101101101111011101111111100000000011111110111100001100111100101100110000...

result:

ok meet maximum 80310

Test #28:

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

input:

349

output:

000000010000001100000111000010110000111100010001001100010111000111110010000100100011001001110010101100101111001100110111001111110100000101000011010001110100100101001011010011110101000101010011010101011101011111011000110110011101101011011011110111011111111000000000111111101111000011001111001011001100...

result:

ok meet maximum 58821

Test #29:

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

input:

526

output:

000000001000000011000000111000001011000001111000010011000010111000011111000100001000100011000100111000101011000101111000110111000111111001000001001000011001000111001001001011001001111001010011001010111001011111001100011001100111001101111001111111010000001010000011010000111010001001010001011010001111...

result:

ok meet maximum 134925

Test #30:

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

input:

1018

output:

000000100000001100000011100000101100000111100001001100001011100001111100010000100010001100010011100010101100010111100011011100011111100100000100100001100100011100100100101100100111100101001100101011100101111100110001100110011100110111100111111101000000101000001101000011101000100101000101101000111101...

result:

ok meet maximum 510567

Test #31:

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

input:

1017

output:

000000100000001100000011100000101100000111100001001100001011100001111100010000100010001100010011100010101100010111100011011100011111100100000100100001100100011100100100101100100111100101001100101011100101111100110001100110011100110111100111111101000000101000001101000011101000100101000101101000111101...

result:

ok meet maximum 509558

Test #32:

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

input:

1209

output:

000000000100000000110000000111000000101100000011110000010011000001011100000111110000100001000110000100111000010101100001011110000110111000011111100010000010001000011000100011100010010110001001111000101001100010101110001011111000110001100111000110111100011111110010000001001000001100100001110010001011...

result:

ok meet maximum 721446

Test #33:

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

input:

1632

output:

000000001000000001100000001110000001011000000111100000100110000010111000001111100001000010001100001001110000101011000010111100001101110000111111000100000100010000110001000111000100101100010011110001010011000101011100010111110001100011001110001101111000111111100100000010010000011001000011100100010110...

result:

ok meet maximum 1318299

Test #34:

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

input:

1829

output:

000000001000000001100000001110000001011000000111100000100110000010111000001111100001000010001100001001110000101011000010111100001101110000111111000100000100010000110001000111000100101100010011110001010011000101011100010111110001100011001110001101111000111111100100000010010000011001000011100100010110...

result:

ok meet maximum 1657336

Test #35:

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

input:

3187

output:

000000000010000000001100000000111000000010110000000111100000010011000000101110000001111100000100011000001001110000010101100000101111000001101110000011111100001000001000010000110000100011100001001011000010011110000101001100001010111000010111110000110011100001101111000011111110001000000100010000011000...

result:

ok meet maximum 5049170

Test #36:

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

input:

2138

output:

000000000010000000001100000000111000000010110000000111100000010011000000101110000001111100000100011000001001110000010101100000101111000001101110000011111100001000001000010000110000100011100001001011000010011110000101001100001010111000010111110000110011100001101111000011111110001000000100010000011000...

result:

ok meet maximum 2267222

Test #37:

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

input:

4030

output:

000011011100000111111000010000010000100001100001000111000010010110000100111100001010011000010101110000101111100001100111000011011110000111111100010000001000100000110001000011100010001011000100011110001001001100010010111000100111110001010001100010100111000101010110001010111100010110111000101111110001...

result:

ok meet maximum 8082284

Test #38:

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

input:

6101

output:

000000000100000000001100000000011100000000101100000000111100000001001100000001011100000001111100000010001100000010011100000010101100000010111100000011011100000011111100000100000100001100000100011100000100101100000100111100000101001100000101011100000101111100000110011100000110111100000111111100001000...

result:

ok meet maximum 18549195

Test #39:

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

input:

5917

output:

000000000100000000001100000000011100000000101100000000111100000001001100000001011100000001111100000010001100000010011100000010101100000010111100000011011100000011111100000100000100001100000100011100000100101100000100111100000101001100000101011100000101111100000110011100000110111100000111111100001000...

result:

ok meet maximum 17445655

Test #40:

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

input:

6635

output:

000000000100000000001100000000011100000000101100000000111100000001001100000001011100000001111100000010001100000010011100000010101100000010111100000011011100000011111100000100000100001100000100011100000100101100000100111100000101001100000101011100000101111100000110011100000110111100000111111100001000...

result:

ok meet maximum 21943566

Test #41:

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

input:

9993

output:

000000000000100000000000110000000000111000000000101100000000011110000000010011000000001011100000000111110000000100011000000010011100000001010110000000101111000000011011100000001111110000001000011000000100011100000010010110000001001111000000101001100000010101110000001011111000000110011100000011011110...

result:

ok meet maximum 49821572

Test #42:

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

input:

14474

output:

000000000000100000000000110000000000111000000000101100000000011110000000010011000000001011100000000111110000000100011000000010011100000001010110000000101111000000011011100000001111110000001000011000000100011100000010010110000001001111000000101001100000010101110000001011111000000110011100000011011110...

result:

ok meet maximum 104583873

Test #43:

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

input:

11534

output:

000000000000100000000000110000000000111000000000101100000000011110000000010011000000001011100000000111110000000100011000000010011100000001010110000000101111000000011011100000001111110000001000011000000100011100000010010110000001001111000000101001100000010101110000001011111000000110011100000011011110...

result:

ok meet maximum 66388863

Test #44:

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

input:

19098

output:

000000000000100000000000011000000000001110000000000101100000000001111000000000100110000000001011100000000011111000000001000110000000010011100000000101011000000001011110000000011011100000000111111000000010000110000000100011100000001001011000000010011110000000101001100000001010111000000010111110000000...

result:

ok meet maximum 182141836

Test #45:

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

input:

31872

output:

001110000000000101100000000001111000000000100110000000001011100000000011111000000001000110000000010011100000000101011000000001011110000000011011100000000111111000000010000110000000100011100000001001011000000010011110000000101001100000001010111000000010111110000000110011100000001101111000000011111110...

result:

ok meet maximum 507514777

Test #46:

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

input:

27626

output:

000000000100000000000011000000000001110000000000101100000000001111000000000100110000000001011100000000011111000000001000110000000010011100000000101011000000001011110000000011011100000000111111000000010000110000000100011100000001001011000000010011110000000101001100000001010111000000010111110000000110...

result:

ok meet maximum 381257844

Test #47:

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

input:

43245

output:

000000000000001000000000000011000000000000111000000000001011000000000001111000000000010011000000000010111000000000011111000000000100011000000000100111000000000101011000000000101111000000000110111000000000111111000000001000011000000001000111000000001001011000000001001111000000001010011000000001010111...

result:

ok meet maximum 934503599

Test #48:

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

input:

34491

output:

000000000000001000000000000011000000000000111000000000001011000000000001111000000000010011000000000010111000000000011111000000000100011000000000100111000000000101011000000000101111000000000110111000000000111111000000001000011000000001000111000000001001011000000001001111000000001010011000000001010111...

result:

ok meet maximum 594380060

Test #49:

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

input:

64535

output:

000000000000100000000000001100000000000011100000000000101100000000000111100000000001001100000000001011100000000001111100000000010001100000000010011100000000010101100000000010111100000000011011100000000011111100000000100001100000000100011100000000100101100000000100111100000000101001100000000101011100...

result:

ok meet maximum 2081512994

Test #50:

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

input:

65746

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 2160380385

Test #51:

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

input:

65861

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 2167946005

Test #52:

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

input:

66725

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 2225209765

Test #53:

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

input:

86349

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 3726867681

Test #54:

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

input:

68454

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 2342045211

Test #55:

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

input:

112260

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 6299544960

Test #56:

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

input:

108023

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 5832941098

Test #57:

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

input:

103787

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 5384393176

Test #58:

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

input:

128710

output:

000000000001000000000000001100000000000001110000000000001011000000000000111100000000000100110000000000010111000000000001111100000000001000110000000000100111000000000010101100000000001011110000000000110111000000000011111100000000010000110000000001000111000000000100101100000000010011110000000001010011...

result:

ok meet maximum 8281268235

Test #59:

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

input:

129534

output:

000000001100000000000001110000000000001011000000000000111100000000000100110000000000010111000000000001111100000000001000110000000000100111000000000010101100000000001011110000000000110111000000000011111100000000010000110000000001000111000000000100101100000000010011110000000001010011000000000101011100...

result:

ok meet maximum 8387651991

Test #60:

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

input:

128670

output:

000000000001000000000000001100000000000001110000000000001011000000000000111100000000000100110000000000010111000000000001111100000000001000110000000000100111000000000010101100000000001011110000000000110111000000000011111100000000010000110000000001000111000000000100101100000000010011110000000001010011...

result:

ok meet maximum 8276121255

Test #61:

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

input:

154721

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 11967003302

Test #62:

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

input:

143149

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 10243718420

Test #63:

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

input:

134065

output:

000000000000000010000000000000001100000000000000111000000000000010110000000000000111100000000000010011000000000000101110000000000001111100000000000100011000000000001001110000000000010101100000000000101111000000000001101110000000000011111100000000001000011000000000010001110000000000100101100000000001...

result:

ok meet maximum 8984762318

Test #64:

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

input:

163454

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 13356170345

Test #65:

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

input:

139150

output:

000000000000000010000000000000001100000000000000111000000000000010110000000000000111100000000000010011000000000000101110000000000001111100000000000100011000000000001001110000000000010101100000000000101111000000000001101110000000000011111100000000001000011000000000010001110000000000100101100000000001...

result:

ok meet maximum 9679327553

Test #66:

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

input:

172380

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 14854850208

Test #67:

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

input:

178166

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 15868884317

Test #68:

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

input:

143651

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 10315696937

Test #69:

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

input:

198199

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 19638413795

Test #70:

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

input:

186272

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 17345817782

Test #71:

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

input:

198102

output:

000000000000000100000000000000011000000000000001110000000000000101100000000000001111000000000000100110000000000001011100000000000011111000000000001000110000000000010011100000000000101011000000000001011110000000000011011100000000000111111000000000010000110000000000100011100000000001001011000000000010...

result:

ok meet maximum 19619194797

Test #72:

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

input:

8201

output:

000001011110000001101110000001111110000010000010000110000010001110000010010110000010011110000010100110000010101110000010111110000011001110000011011110000011111110000100000010000100000110000100001110000100010110000100011110000100100110000100101110000100111110000101000110000101001110000101010110000101...

result:

ok meet maximum 33542145

Test #73:

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

input:

8202

output:

000001011110000001101110000001111110000010000010000110000010001110000010010110000010011110000010100110000010101110000010111110000011001110000011011110000011111110000100000010000100000110000100001110000100010110000100011110000100100110000100101110000100111110000101000110000101001110000101010110000101...

result:

ok meet maximum 33550335

Test #74:

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

input:

8203

output:

111111111111000000000000011111111111011111100000011100011111100011011100011100000011000011111100111011000010100000111101011111000010011000111101100110110010010000101101101111010010001100101101110011010000001010101111110101001110001010101001110101010101101010101001000000000110111111111000111100000110...

result:

ok meet maximum 33558526

Test #75:

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

input:

8204

output:

000000000000010000000000011000000000011100000000010110000000001111000000001001100000000101110000000011111000000010001100000001001110000000101011000000010111100000001101110000000111111000000100001100000010001110000001001011000000100111100000010100110000001010111000000101111100000011001110000001101111...

result:

ok meet maximum 33566718

Test #76:

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

input:

8205

output:

000000000000010000000000011000000000011100000000010110000000001111000000001001100000000101110000000011111000000010001100000001001110000000101011000000010111100000001101110000000111111000000100001100000010001110000001001011000000100111100000010100110000001010111000000101111100000011001110000001101111...

result:

ok meet maximum 33574910

Test #77:

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

input:

8206

output:

000000000000100000000000110000000000111000000000101100000000011110000000010011000000001011100000000111110000000100011000000010011100000001010110000000101111000000011011100000001111110000001000011000000100011100000010010110000001001111000000101001100000010101110000001011111000000110011100000011011110...

result:

ok meet maximum 33583103

Test #78:

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

input:

16394

output:

100000000010110000000001111000000001001100000000101110000000011111000000010001100000001001110000000101011000000010111100000001101110000000111111000000100001100000010001110000001001011000000100111100000010100110000001010111000000101111100000011001110000001101111000000111111100000100000010000010000011...

result:

ok meet maximum 134193153

Test #79:

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

input:

16395

output:

100000000010110000000001111000000001001100000000101110000000011111000000010001100000001001110000000101011000000010111100000001101110000000111111000000100001100000010001110000001001011000000100111100000010100110000001010111000000101111100000011001110000001101111000000111111100000100000010000010000011...

result:

ok meet maximum 134209535

Test #80:

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

input:

16396

output:

111111111111100000000000000111111111111011111100000001110001111111000110111000011100100011110001101101000111001001011000011011010011110010010101100110110101001000010000011011110111110010000011000110111110011100011000101001110011101011000101001000011101011011110001010001100111010111001000010010011011...

result:

ok meet maximum 134225918

Test #81:

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

input:

16397

output:

000000000000001000000000000110000000000011100000000001011000000000011110000000001001100000000010111000000000111110000000010001100000000100111000000001010110000000010111100000000110111000000001111110000000100001100000001000111000000010010110000000100111100000001010011000000010101110000000101111100000...

result:

ok meet maximum 134242302

Test #82:

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

input:

16398

output:

000000000000001000000000000110000000000011100000000001011000000000011110000000001001100000000010111000000000111110000000010001100000000100111000000001010110000000010111100000000110111000000001111110000000100001100000001000111000000010010110000000100111100000001010011000000010101110000000101111100000...

result:

ok meet maximum 134258686

Test #83:

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

input:

16399

output:

000000000000010000000000001100000000000111000000000010110000000000111100000000010011000000000101110000000001111100000000100011000000001001110000000010101100000000101111000000001101110000000011111100000001000011000000010001110000000100101100000001001111000000010100110000000101011100000001011111000000...

result:

ok meet maximum 134275071

Test #84:

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

input:

32779

output:

001011110000000011011100000000111111000000010000110000000100011100000001001011000000010011110000000101001100000001010111000000010111110000000110011100000001101111000000011111110000001000000100000110000001000011100000010001011000000100011110000001001001100000010010111000000100111110000001010001100000...

result:

ok meet maximum 536821761

Test #85:

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

input:

32780

output:

001011110000000011011100000000111111000000010000110000000100011100000001001011000000010011110000000101001100000001010111000000010111110000000110011100000001101111000000011111110000001000000100000110000001000011100000010001011000000100011110000001001001100000010010111000000100111110000001010001100000...

result:

ok meet maximum 536854527

Test #86:

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

input:

32781

output:

111111111111110000000000000001111111111111011111110000000111000011111110001110111000011000001001111001111101100001011000100111101001110101000101010010101110101011010010010100101011011010110100000001001010111111101101001110000100101010011110110101010110000010101000011111010101110100001010010010111101...

result:

ok meet maximum 536887294

Test #87:

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

input:

32782

output:

000000000000000100000000000001100000000000011100000000000101100000000000111100000000001001100000000001011100000000001111100000000010001100000000010011100000000010101100000000010111100000000011011100000000011111100000000100001100000000100011100000000100101100000000100111100000000101001100000000101011...

result:

ok meet maximum 536920062

Test #88:

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

input:

32783

output:

000000000000000100000000000001100000000000011100000000000101100000000000111100000000001001100000000001011100000000001111100000000010001100000000010011100000000010101100000000010111100000000011011100000000011111100000000100001100000000100011100000000100101100000000100111100000000101001100000000101011...

result:

ok meet maximum 536952830

Test #89:

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

input:

32784

output:

000000000000001000000000000011000000000000111000000000001011000000000001111000000000010011000000000010111000000000011111000000000100011000000000100111000000000101011000000000101111000000000110111000000000111111000000001000011000000001000111000000001001011000000001001111000000001010011000000001010111...

result:

ok meet maximum 536985599

Test #90:

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

input:

65548

output:

000001000011100000001000101100000001000111100000001001001100000001001011100000001001111100000001010001100000001010011100000001010101100000001010111100000001011011100000001011111100000001100011100000001100111100000001101011100000001101111100000001110111100000001111111100000010000000100000010000001100...

result:

ok meet maximum 2147385345

Test #91:

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

input:

65549

output:

000001000011100000001000101100000001000111100000001001001100000001001011100000001001111100000001010001100000001010011100000001010101100000001010111100000001011011100000001011111100000001100011100000001100111100000001101011100000001101111100000001110111100000001111111100000010000000100000010000001100...

result:

ok meet maximum 2147450879

Test #92:

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

input:

65550

output:

111111111111111000000000000000011111111111111011111110000000011100001111111100011101111000011100001000111100011110111000011010000000111100101111111000011001110000111100110001110000011001100001111100110011101000011001010010111100110101100100010001001011011101110110100000001000101011111110111010011100...

result:

ok meet maximum 2147516414

Test #93:

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

input:

65551

output:

000000000000000010000000000000011000000000000011100000000000010110000000000001111000000000001001100000000000101110000000000011111000000000010001100000000001001110000000000101011000000000010111100000000001101110000000000111111000000000100001100000000010001110000000001001011000000000100111100000000010...

result:

ok meet maximum 2147581950

Test #94:

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

input:

65552

output:

000000000000000010000000000000011000000000000011100000000000010110000000000001111000000000001001100000000000101110000000000011111000000000010001100000000001001110000000000101011000000000010111100000000001101110000000000111111000000000100001100000000010001110000000001001011000000000100111100000000010...

result:

ok meet maximum 2147647486

Test #95:

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

input:

65553

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 2147713023

Test #96:

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

input:

131085

output:

001001001111000000100101001100000010010101110000001001011111000000100110011100000010011011110000001001111111000000101000001100000010100001110000001010001011000000101000111100000010100100110000001010010111000000101001111100000010101000110000001010100111000000101010101100000010101011110000001010110111...

result:

ok meet maximum 8589737985

Test #97:

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

input:

131086

output:

001001001111000000100101001100000010010101110000001001011111000000100110011100000010011011110000001001111111000000101000001100000010100001110000001010001011000000101000111100000010100100110000001010010111000000101001111100000010101000110000001010100111000000101010101100000010101011110000001010110111...

result:

ok meet maximum 8589869055

Test #98:

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

input:

131087

output:

111111111111111100000000000000000111111111111111011111111000000001111000011111111000011101111000011110000000011100000111111110001111011100000110100000001111100101111111000001100111000011111001100011101000011001101001011110011001011001100110011000010001000100011110111011101101000000001000101011111111...

result:

ok meet maximum 8590000126

Test #99:

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

input:

131088

output:

000000000000000001000000000000000110000000000000011100000000000001011000000000000011110000000000001001100000000000010111000000000000111110000000000010001100000000000100111000000000001010110000000000010111100000000000110111000000000001111110000000000100001100000000001000111000000000010010110000000000...

result:

ok meet maximum 8590131198

Test #100:

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

input:

131089

output:

000000000000000001000000000000000110000000000000011100000000000001011000000000000011110000000000001001100000000000010111000000000000111110000000000010001100000000000100111000000000001010110000000000010111100000000000110111000000000001111110000000000100001100000000001000111000000000010010110000000000...

result:

ok meet maximum 8590262270

Test #101:

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

input:

131090

output:

000000000000000010000000000000001100000000000000111000000000000010110000000000000111100000000000010011000000000000101110000000000001111100000000000100011000000000001001110000000000010101100000000000101111000000000001101110000000000011111100000000001000011000000000010001110000000000100101100000000001...

result:

ok meet maximum 8590393343

Test #102:

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

input:

8197

output:

000001011110000001101110000001111110000010000010000110000010001110000010010110000010011110000010100110000010101110000010111110000011001110000011011110000011111110000100000010000100000110000100001110000100010110000100011110000100100110000100101110000100111110000101000110000101001110000101010110000101...

result:

ok meet maximum 33509395

Test #103:

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

input:

16328

output:

100000000010110000000001111000000001001100000000101110000000011111000000010001100000001001110000000101011000000010111100000001101110000000111111000000100001100000010001110000001001011000000100111100000010100110000001010111000000101111100000011001110000001101111000000111111100000100000010000010000011...

result:

ok meet maximum 133114152

Test #104:

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

input:

32608

output:

001011110000000011011100000000111111000000010000110000000100011100000001001011000000010011110000000101001100000001010111000000010111110000000110011100000001101111000000011111110000001000000100000110000001000011100000010001011000000100011110000001001001100000010010111000000100111110000001010001100000...

result:

ok meet maximum 531233481

Test #105:

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

input:

65141

output:

000000000000100000000000001100000000000011100000000000101100000000000111100000000001001100000000001011100000000001111100000000010001100000000010011100000000010101100000000010111100000000011011100000000011111100000000100001100000000100011100000000100101100000000100111100000000101001100000000101011100...

result:

ok meet maximum 2120796035

Test #106:

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

input:

130420

output:

000000010101100000000001011110000000000110111000000000011111100000000010000110000000001000111000000000100101100000000010011110000000001010011000000000101011100000000010111110000000001100111000000000110111100000000011111110000000010000011000000001000011100000000100010110000000010001111000000001001001...

result:

ok meet maximum 8502797880

Test #107:

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

input:

8265

output:

000000000000100000000000110000000000111000000000101100000000011110000000010011000000001011100000000111110000000100011000000010011100000001010110000000101111000000011011100000001111110000001000011000000100011100000010010110000001001111000000101001100000010101110000001011111000000110011100000011011110...

result:

ok meet maximum 34068260

Test #108:

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

input:

16508

output:

000000000000010000000000001100000000000111000000000010110000000000111100000000010011000000000101110000000001111100000000100011000000001001110000000010101100000000101111000000001101110000000011111100000001000011000000010001110000000100101100000001001111000000010100110000000101011100000001011111000000...

result:

ok meet maximum 136067031

Test #109:

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

input:

33008

output:

000000000000001000000000000011000000000000111000000000001011000000000001111000000000010011000000000010111000000000011111000000000100011000000000100111000000000101011000000000101111000000000110111000000000111111000000001000011000000001000111000000001001011000000001001111000000001010011000000001010111...

result:

ok meet maximum 544351055

Test #110:

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

input:

65964

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 2174733396

Test #111:

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

input:

131692

output:

000000000000000010000000000000001100000000000000111000000000000010110000000000000111100000000000010011000000000000101110000000000001111100000000000100011000000000001001110000000000010101100000000000101111000000000001101110000000000011111100000000001000011000000000010001110000000000100101100000000001...

result:

ok meet maximum 8669480792

Test #112:

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

input:

15843

output:

000011000000000011100000000010110000000001111000000001001100000000101110000000011111000000010001100000001001110000000101011000000010111100000001101110000000111111000000100001100000010001110000001001011000000100111100000010100110000001010111000000101111100000011001110000001101111000000111111100000100...

result:

ok meet maximum 125318747

Test #113:

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

input:

31560

output:

000000001000000000000110000000000011100000000001011000000000011110000000001001100000000010111000000000111110000000010001100000000100111000000001010110000000010111100000000110111000000001111110000000100001100000001000111000000010010110000000100111100000001010011000000010101110000000101111100000001100...

result:

ok meet maximum 497623597

Test #114:

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

input:

64241

output:

000000000000100000000000001100000000000011100000000000101100000000000111100000000001001100000000001011100000000001111100000000010001100000000010011100000000010101100000000010111100000000011011100000000011111100000000100001100000000100011100000000100101100000000100111100000000101001100000000101011100...

result:

ok meet maximum 2062587185

Test #115:

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

input:

73307

output:

000000000000000100000000000000110000000000000111000000000000101100000000000011110000000000010011000000000001011100000000000111110000000000100011000000000010011100000000001010110000000000101111000000000011011100000000001111110000000001000011000000000100011100000000010010110000000001001111000000000101...

result:

ok meet maximum 2685953056

Test #116:

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

input:

129593

output:

000000001100000000000001110000000000001011000000000000111100000000000100110000000000010111000000000001111100000000001000110000000000100111000000000010101100000000001011110000000000110111000000000011111100000000010000110000000001000111000000000100101100000000010011110000000001010011000000000101011100...

result:

ok meet maximum 8395295323