QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#227572 | #5434. Binary Substrings | SoyTony | AC ✓ | 15ms | 16640kb | C++14 | 1.9kb | 2023-10-27 18:52:14 | 2023-10-27 18:52:15 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int maxn=(1<<21)+10;
inline int read(){
int x=0,w=1;char c=getchar();
while(c<'0'||c>'9'){if(c=='-')w=-1;c=getchar();}
while(c<='9'&&c>='0'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}
return x*w;
}
int n,m,k;
int bel[maxn],siz[maxn];
int find(int x){
if(x==bel[x]) return x;
return bel[x]=find(bel[x]);
}
int p[maxn];
inline void output(int x,int len){
for(int i=k;i>=1;--i) printf("%d",(x>>i)&1);
for(int i=1;i<=len;++i){
printf("%d",x&1);
x=p[x];
}
printf("\n");
}
int main(){
n=read();
if(n==1) return printf("0\n"),0;
k=1;
while((1<<k)+k-1<=n) ++k;
--k;
m=(1<<k-1);
for(int i=0;i<(m<<1);++i) bel[i]=i;
for(int i=0;i<m;++i){
p[i]=i<<1,p[i|m]=i<<1|1;
bel[find(i)]=find(i<<1),bel[find(i|m)]=find(i<<1|1);
}
for(int i=0;i<m;++i){
int fu=find(i),fv=find(i|m);
if(fu==fv) continue;
swap(p[i],p[i|m]);
bel[fu]=fv;
}
if(n==(1<<k)+k-1){
for(int i=0;i<k;++i) printf("0");
for(int i=p[0];i;i=p[i]) printf("%d",i&1);
printf("\n");
return 0;
}
m<<=1;
for(int i=0;i<(m<<1);++i) bel[i]=i;
for(int i=0,now=0;i<m;++i,now=p[now]){
if(now<m) p[now]=(now<<1)|(p[now]&1);
else p[now]=((now^m)<<1)|(p[now^m]&1);
p[now^m]=(p[now]^1);
bel[find(now)]=find(p[now]),bel[find(now^m)]=find(p[now^m]);
}
for(int i=0;i<(m<<1);++i) ++siz[find(i)];
for(int i=0;i<m;++i){
int fu=find(i),fv=find(i|m);
if(fu==fv) continue;
swap(p[i],p[i|m]);
if(siz[fu]+siz[fv]<n-k){
bel[fv]=fu,siz[fu]+=siz[fv];
continue;
}
if(siz[fu]>=m) output(p[i|m],n-k);
else output(p[i],n-k);
break;
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 5812kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 5856kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 1ms
memory: 7852kb
input:
3
output:
100
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 1ms
memory: 7896kb
input:
4
output:
1001
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 1ms
memory: 8044kb
input:
6
output:
011000
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 1ms
memory: 7860kb
input:
7
output:
0110001
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 1ms
memory: 7892kb
input:
8
output:
01100010
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 1ms
memory: 7980kb
input:
9
output:
011000101
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 1ms
memory: 5804kb
input:
10
output:
0001110100
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 1ms
memory: 7980kb
input:
11
output:
00111010000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 1ms
memory: 7920kb
input:
12
output:
001110100001
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 15ms
memory: 16156kb
input:
200000
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 1ms
memory: 7980kb
input:
24
output:
000111101100101000001001
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 1ms
memory: 7916kb
input:
35
output:
00011110110010100000100110101110001
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 0ms
memory: 7980kb
input:
30
output:
000111101100101000001001101011
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 0ms
memory: 7840kb
input:
45
output:
000011111011100110001011010100100000010011101
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 1ms
memory: 8052kb
input:
66
output:
000011111011100110001011010100100000010011101000110110010101111000
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 1ms
memory: 7828kb
input:
50
output:
00001111101110011000101101010010000001001110100011
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 1ms
memory: 7920kb
input:
80
output:
00000111111011110011100011011010011000010111010110010101000100100000001000111011
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 0ms
memory: 7904kb
input:
107
output:
00000111111011110011100011011010011000010111010110010101000100100000001000111011000101001011011100100111101
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 1ms
memory: 7980kb
input:
81
output:
000001111110111100111000110110100110000101110101100101010001001000000010001110110
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 1ms
memory: 7836kb
input:
147
output:
000000111111101111100111100011101001110000110111011011001101000110000010111101011100101100010101101010100101000010011001001000100000000100011110110
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 1ms
memory: 7860kb
input:
255
output:
000000111111101111100111100011101001110000110111011011001101000110000010111101011100101100010101101010100101000010011001001000100000000100011110110000101001101101001001111101000001100111011100010010111010100010110111100100001110011000110101100101010111111
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 1ms
memory: 7832kb
input:
173
output:
00000011111110111110011110001110100111000011011101101100110100011000001011110101110010110001010110101010010100001001100100100010000000010001111011000010100110110100100111110
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 1ms
memory: 7856kb
input:
288
output:
000000011111111011111100111110001111010011110000111011101100111010001110000011011110110111001101100011010100110100001100110010001100000010111110101111001011100010110110101101001011000010101110101011001010101000101000001001110010011000100101001001000010001000000000100001111001100001101001
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 0ms
memory: 7832kb
input:
407
output:
000000011111111011111100111110001111010011110000111011101100111010001110000011011110110111001101100011010100110100001100110010001100000010111110101111001011100010110110101101001011000010101110101011001010101000101000001001110010011000100101001001000010001000000000100001111001100001101001100111101110...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 0ms
memory: 7856kb
input:
349
output:
000000011111111011111100111110001111010011110000111011101100111010001110000011011110110111001101100011010100110100001100110010001100000010111110101111001011100010110110101101001011000010101110101011001010101000101000001001110010011000100101001001000010001000000000100001111001100001101001100111101110...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 1ms
memory: 7988kb
input:
526
output:
000000001111111110111111100111111000111110100111110000111101100111101000111100000111011110111011100111011000111010100111010000111001000111000000110111110110111100110111000110110110100110110000110101100110101000110100000110011100110011000110010000110000000101111110101111100101111000101110110101110100...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 1ms
memory: 8056kb
input:
1018
output:
000000101111110101111100101111000101110110101110100101110000101101110101101100101101000101100000101011110101011100101011000101010110101010100101010000101001100101001000101000000100111100100111000100110100100110000100101100100101000100100100000100011000100010000100000000001000011111001100000110100111...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 1ms
memory: 7960kb
input:
1017
output:
000000101111110101111100101111000101110110101110100101110000101101110101101100101101000101100000101011110101011100101011000101010110101010100101010000101001100101001000101000000100111100100111000100110100100110000100101100100101000100100100000100011000100010000100000000001000011111001100000110100111...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 0ms
memory: 7908kb
input:
1209
output:
000000000111111111101111111100111111100011111101001111110000111110110011111010001111100000111101111011100111101100011110101001111010000111100100011110000001110111110111011110011101110001110110100111011000011101011001110101000111010000011100111001100011100100001110000000110111111011011111001101111000...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 1ms
memory: 7920kb
input:
1632
output:
000000001111111111011111111001111111000111111010011111100001111101100111110100011111000001111011110111001111011000111101010011110100001111001000111100000011101111101110111100111011100011101101001110110000111010110011101010001110100000111001110011000111001000011100000001101111110110111110011011110001...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 1ms
memory: 7996kb
input:
1829
output:
000000001111111111011111111001111111000111111010011111100001111101100111110100011111000001111011110111001111011000111101010011110100001111001000111100000011101111101110111100111011100011101101001110110000111010110011101010001110100000111001110011000111001000011100000001101111110110111110011011110001...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 1ms
memory: 7880kb
input:
3187
output:
000000000011111111111011111111100111111110001111111010011111110000111111011001111110100011111100000111110111001111101100011111010100111110100001111100100011111000000111101111101111011110011110111000111101101001111011000011110101100111101010001111010000011110011000111100100001111000000011101111110111...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 1ms
memory: 7932kb
input:
2138
output:
000000000011111111111011111111100111111110001111111010011111110000111111011001111110100011111100000111110111001111101100011111010100111110100001111100100011111000000111101111101111011110011110111000111101101001111011000011110101100111101010001111010000011110011000111100100001111000000011101111110111...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 0ms
memory: 7944kb
input:
4030
output:
000011001111100110011110001100111010011001110000110011011001100110100011001100000110010110001100101000011001001000110010000001100011100011000110000110001000001100000000010111111110101111111001011111100010111110110101111101001011111000010111101110101111011001011110100010111100000101110111101011101110...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 1ms
memory: 7924kb
input:
6101
output:
000000000101111111110101111111100101111111000101111110110101111110100101111110000101111101110101111101100101111101000101111100000101111011110101111011100101111011000101111010100101111010000101111001100101111001000101111000000101110111110101110111100101110111000101110110110101110110100101110110000101...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 1ms
memory: 7864kb
input:
5917
output:
000000000101111111110101111111100101111111000101111110110101111110100101111110000101111101110101111101100101111101000101111100000101111011110101111011100101111011000101111010100101111010000101111001100101111001000101111000000101110111110101110111100101110111000101110110110101110110100101110110000101...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 1ms
memory: 8124kb
input:
6635
output:
000000000101111111110101111111100101111111000101111110110101111110100101111110000101111101110101111101100101111101000101111100000101111011110101111011100101111011000101111010100101111010000101111001100101111001000101111000000101110111110101110111100101110111000101110110110101110110100101110110000101...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 0ms
memory: 8060kb
input:
9993
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 2ms
memory: 8212kb
input:
14474
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 2ms
memory: 8080kb
input:
11534
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 3ms
memory: 14260kb
input:
19098
output:
000000000000111111111111110111111111111001111111111100011111111110100111111111100001111111110110011111111101000111111111000001111111101110011111111011000111111110101001111111101000011111111001000111111110000001111111011110011111110111000111111101101001111111011000011111110101100111111101010001111111...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 3ms
memory: 8260kb
input:
31872
output:
000000000101011111111101010111111110010101111111000101011111101101010111111010010101111110000101011111011101010111110110010101111101000101011111000001010111101111010101111011100101011110110001010111101011010101111010100101011110100001010111100110010101111001000101011110000001010111011111010101110111...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 2ms
memory: 8180kb
input:
27626
output:
000000000011011111111110110111111111001101111111100011011111110100110111111100001101111110111011011111101100110111111010001101111110000011011111011110110111110111001101111101100011011111010100110111110100001101111100100011011111000000110111101111101101111011110011011110111000110111101101001101111011...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 2ms
memory: 8660kb
input:
43245
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 3ms
memory: 8568kb
input:
34491
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 5ms
memory: 8564kb
input:
64535
output:
000000000000101111111111110101111111111100101111111111000101111111110110101111111110100101111111110000101111111101110101111111101100101111111101000101111111100000101111111011110101111111011100101111111011000101111111010100101111111010000101111111001100101111111001000101111111000000101111110111110101...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 3ms
memory: 15340kb
input:
65746
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 3ms
memory: 9268kb
input:
65861
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 6ms
memory: 9256kb
input:
66725
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 7ms
memory: 12848kb
input:
86349
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 3ms
memory: 15032kb
input:
68454
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 4ms
memory: 9268kb
input:
112260
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 7ms
memory: 9280kb
input:
108023
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 7ms
memory: 9204kb
input:
103787
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 9ms
memory: 15192kb
input:
128710
output:
000000000001000111111111000100011111111000010001111111010001000111111100000100011111101100010001111110100001000111111001000100011111100000010001111101110001000111110110000100011111010100010001111101000001000111110011000100011111001000010001111100000001000111101111000100011110111000010001111011010001...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 8ms
memory: 9408kb
input:
129534
output:
000000001100000111100000110000011100000011000001101000001100000110000000110000010100000011000001000000001100000011000000100000001100000000000000101111111111111010111111111111001011111111111000101111111111011010111111111101001011111111110000101111111110111010111111111011001011111111101000101111111110...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 9ms
memory: 9220kb
input:
128670
output:
000000000001000111111111000100011111111000010001111111010001000111111100000100011111101100010001111110100001000111111001000100011111100000010001111101110001000111110110000100011111010100010001111101000001000111110011000100011111001000010001111100000001000111101111000100011110111000010001111011010001...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 13ms
memory: 10616kb
input:
154721
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 14ms
memory: 16328kb
input:
143149
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 14ms
memory: 16416kb
input:
134065
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 10ms
memory: 10624kb
input:
163454
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 10ms
memory: 10708kb
input:
139150
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 14ms
memory: 10768kb
input:
172380
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 11ms
memory: 16512kb
input:
178166
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 13ms
memory: 10560kb
input:
143651
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 7ms
memory: 13728kb
input:
198199
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 11ms
memory: 10616kb
input:
186272
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 15ms
memory: 10560kb
input:
198102
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 1ms
memory: 8092kb
input:
8201
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 0ms
memory: 7984kb
input:
8202
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 1ms
memory: 8000kb
input:
8203
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 0ms
memory: 5972kb
input:
8204
output:
000000000000011111111111110111111111110011111111110001111111110100111111111000011111111011001111111101000111111110000011111110111001111111011000111111101010011111110100001111111001000111111100000011111101111001111110111000111111011010011111101100001111110101100111111010100011111101000001111110011000...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 2ms
memory: 8012kb
input:
8205
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 1ms
memory: 8008kb
input:
8206
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 2ms
memory: 8060kb
input:
16394
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 2ms
memory: 8060kb
input:
16395
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 2ms
memory: 8020kb
input:
16396
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 1ms
memory: 5912kb
input:
16397
output:
000000000000001111111111111101111111111110011111111111000111111111101001111111111000011111111101100111111111010001111111110000011111111011100111111110110001111111101010011111111010000111111110010001111111100000011111110111100111111101110001111111011010011111110110000111111101011001111111010100011111...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 0ms
memory: 8388kb
input:
16398
output:
000000000000011111111111111011111111111100111111111110001111111111010011111111110000111111111011001111111110100011111111100000111111110111001111111101100011111111010100111111110100001111111100100011111111000000111111101111001111111011100011111110110100111111101100001111111010110011111110101000111111...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 2ms
memory: 8188kb
input:
16399
output:
000000000000011111111111111011111111111100111111111110001111111111010011111111110000111111111011001111111110100011111111100000111111110111001111111101100011111111010100111111110100001111111100100011111111000000111111101111001111111011100011111110110100111111101100001111111010110011111110101000111111...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 3ms
memory: 8192kb
input:
32779
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 3ms
memory: 8324kb
input:
32780
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 0ms
memory: 8324kb
input:
32781
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 2ms
memory: 5940kb
input:
32782
output:
000000000000000111111111111111011111111111110011111111111100011111111111010011111111111000011111111110110011111111110100011111111110000011111111101110011111111101100011111111101010011111111101000011111111100100011111111100000011111111011110011111111011100011111111011010011111111011000011111111010110...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 3ms
memory: 8576kb
input:
32783
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 3ms
memory: 8508kb
input:
32784
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 0ms
memory: 14572kb
input:
65548
output:
000001000011101100001000011101000001000011100100001000011100000001000011011100001000011011000001000011010100001000011010000001000011001100001000011001000001000011000100001000011000000001000010111100001000010111000001000010110100001000010110000001000010101100001000010101000001000010100100001000010100...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 5ms
memory: 8584kb
input:
65549
output:
000001000011101100001000011101000001000011100100001000011100000001000011011100001000011011000001000011010100001000011010000001000011001100001000011001000001000011000100001000011000000001000010111100001000010111000001000010110100001000010110000001000010101100001000010101000001000010100100001000010100...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 0ms
memory: 8520kb
input:
65550
output:
000001000011101100001000011101000001000011100100001000011100000001000011011100001000011011000001000011010100001000011010000001000011001100001000011001000001000011000100001000011000000001000010111100001000010111000001000010110100001000010110000001000010101100001000010101000001000010100100001000010100...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 4ms
memory: 6100kb
input:
65551
output:
000000000000000011111111111111110111111111111110011111111111110001111111111110100111111111111000011111111111011001111111111101000111111111110000011111111110111001111111111011000111111111101010011111111110100001111111111001000111111111100000011111111101111001111111110111000111111111011010011111111101...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 6ms
memory: 9252kb
input:
65552
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 6ms
memory: 9264kb
input:
65553
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 8ms
memory: 9376kb
input:
131085
output:
000000001101101111111110110110111111110011011011111110001101101111110100110110111111000011011011111011101101101111101100110110111110100011011011111000001101101111011110110110111101110011011011110110001101101111010100110110111101000011011011110010001101101111000000110110111011111011011011101111001101...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 8ms
memory: 9252kb
input:
131086
output:
000000001101101111111110110110111111110011011011111110001101101111110100110110111111000011011011111011101101101111101100110110111110100011011011111000001101101111011110110110111101110011011011110110001101101111010100110110111101000011011011110010001101101111000000110110111011111011011011101111001101...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 8ms
memory: 9264kb
input:
131087
output:
000000001101101111111110110110111111110011011011111110001101101111110100110110111111000011011011111011101101101111101100110110111110100011011011111000001101101111011110110110111101110011011011110110001101101111010100110110111101000011011011110010001101101111000000110110111011111011011011101111001101...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 7ms
memory: 6372kb
input:
131088
output:
000000000000000001111111111111111101111111111111110011111111111111000111111111111101001111111111111000011111111111101100111111111111010001111111111110000011111111111011100111111111110110001111111111101010011111111111010000111111111110010001111111111100000011111111110111100111111111101110001111111111...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 12ms
memory: 10636kb
input:
131089
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 13ms
memory: 16000kb
input:
131090
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 1ms
memory: 7944kb
input:
8197
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 0ms
memory: 8012kb
input:
16328
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 0ms
memory: 8260kb
input:
32608
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 5ms
memory: 14576kb
input:
65141
output:
000000000000101111111111110101111111111100101111111111000101111111110110101111111110100101111111110000101111111101110101111111101100101111111101000101111111100000101111111011110101111111011100101111111011000101111111010100101111111010000101111111001100101111111001000101111111000000101111110111110101...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 6ms
memory: 15000kb
input:
130420
output:
000000001100010111110000110001011110000011000101110100001100010111000000110001011011000011000101101000001100010110010000110001011000000011000101011100001100010101100000110001010101000011000101010000001100010100110000110001010010000011000101000100001100010100000000110001001111000011000100111000001100...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 2ms
memory: 8064kb
input:
8265
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 2ms
memory: 8240kb
input:
16508
output:
000000000000011111111111111011111111111100111111111110001111111111010011111111110000111111111011001111111110100011111111100000111111110111001111111101100011111111010100111111110100001111111100100011111111000000111111101111001111111011100011111110110100111111101100001111111010110011111110101000111111...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 4ms
memory: 8632kb
input:
33008
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 3ms
memory: 15412kb
input:
65964
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 13ms
memory: 16640kb
input:
131692
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 2ms
memory: 7992kb
input:
15843
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 3ms
memory: 8176kb
input:
31560
output:
000000000011111111111111011111111111100111111111110001111111111010011111111110000111111111011001111111110100011111111100000111111110111001111111101100011111111010100111111110100001111111100100011111111000000111111101111001111111011100011111110110100111111101100001111111010110011111110101000111111101...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 5ms
memory: 8660kb
input:
64241
output:
000000000000101111111111110101111111111100101111111111000101111111110110101111111110100101111111110000101111111101110101111111101100101111111101000101111111100000101111111011110101111111011100101111111011000101111111010100101111111010000101111111001100101111111001000101111111000000101111110111110101...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 0ms
memory: 15024kb
input:
73307
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 4ms
memory: 9264kb
input:
129593
output:
000000001100000111100000110000011100000011000001101000001100000110000000110000010100000011000001000000001100000011000000100000001100000000000000101111111111111010111111111111001011111111111000101111111111011010111111111101001011111111110000101111111110111010111111111011001011111111101000101111111110...
result:
ok meet maximum 8395295323