QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#79906 | #5434. Binary Substrings | Crysfly | AC ✓ | 22ms | 9000kb | C++11 | 2.1kb | 2023-02-21 10:30:42 | 2023-02-21 10:30:45 |
Judging History
answer
// what is matter? never mind.
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
if(f)x=-x;return x;
}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 2000005
#define inf 0x3f3f3f3f
int n,k;
int vis[maxn],nxt[maxn];
int q[maxn],len;
void dfs(int u){
if(vis[u])return;
vis[u]=1;
q[++len]=u;
dfs((u*2+1)%(1<<k));
dfs((u*2)%(1<<k));
}
int st[maxn],tp;
int cnt[maxn],cc;
void add(int x){
x%=(1<<k);
cc+=(!cnt[x]),++cnt[x];
}
void sub(int x){
x%=(1<<k);
--cnt[x],cc-=(!cnt[x]);
}
void print(int l,int r){
// For(i,l,r) cout<<st[i]<<" ";puts("");
Rep(i,k,0) cout<<(st[l]>>i&1);
For(i,l+1,r) cout<<(st[i]&1);
exit(0);
}
void print(){
tp=0;
For(i,0,(1<<(k+1))-1)vis[i]=0;
for(int u=q[1];!vis[u];u=nxt[u]) st[++tp]=u,vis[u]=1;
For(i,1,tp) st[i+tp]=st[i];
// For(i,1,tp) cout<<st[i]<<" "; puts("");
For(i,1,n-k) add(st[i]);
if(cc==(1<<k)) print(1,n-k);
For(i,n-k+1,tp*2){
sub(st[i-(n-k)]);
add(st[i]);
if(cc==(1<<k)) print(i-(n-k)+1,i);
}
exit(233);
}
signed main()
{
n=read();
if(n==1)puts("0"),exit(0);
while((1<<k)+k-1<=n)++k; --k;
dfs(0);
if(n==(1<<k)+k-1){
For(i,1,k-1)cout<<0;
For(i,1,len)cout<<q[i]%2;
exit(0);
}
int mxs=(1<<(k+1));
For(i,0,mxs-1)vis[i]=0,nxt[i]=-1;
// For(i,1,len)cout<<q[i]<<" \n"[i==len];
For(i,1,len){
q[i]=q[i]*2+q[i+1]%2;
vis[q[i]]=1;
}
For(i,1,len)nxt[q[i]]=q[i%len+1];
For(i,0,mxs-1)if(nxt[i]==-1)nxt[i]=nxt[i^(1<<k)]^1;
// For(i,1,len)cout<<q[i]<<" \n"[i==len];
// For(i,0,mxs-1)cout<<nxt[i]<<" \n"[i==mxs-1];
int sum=len;
For(i,0,mxs-1){
if(vis[i])continue;
for(int u=i;!vis[u];u=nxt[u]) vis[u]=1,++sum;
swap(nxt[i],nxt[i^(1<<k)]);
// cout<<"sum "<<sum<<" "<<n-k<<"\n";
if(sum>=n-k)print();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3376kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 1ms
memory: 3532kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 2ms
memory: 3500kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 1ms
memory: 3472kb
input:
3
output:
010
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 2ms
memory: 3364kb
input:
4
output:
0100
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 2ms
memory: 3376kb
input:
6
output:
001100
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 2ms
memory: 3388kb
input:
7
output:
0011000
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
8
output:
00110100
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 2ms
memory: 3376kb
input:
9
output:
001101000
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 2ms
memory: 3368kb
input:
10
output:
0001110100
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 2ms
memory: 3504kb
input:
11
output:
00011101000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 1ms
memory: 3360kb
input:
12
output:
000111010000
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 18ms
memory: 8980kb
input:
200000
output:
011001111011101011010100011000101001010001011110101101011101000010100111000101111010110001110100001010100100010001101010110111011100101010110011000110101010011011110010101011011000011010101001010001001010101101011101101010100111000100101011110001110110111000100100010110001110110111010100100010110001...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 0ms
memory: 3380kb
input:
24
output:
111000101000001111011001
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 2ms
memory: 3420kb
input:
35
output:
00001111011001001101011100010100000
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
30
output:
110010011010111000101000001111
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
45
output:
010111100001010010000001111101110011010110001
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 2ms
memory: 3272kb
input:
66
output:
000011111011011100110101011000100111010001100101111000010100100000
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
50
output:
01000110010111100001010010000001111101110011010110
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 2ms
memory: 3324kb
input:
80
output:
00101111100000101010001001000000011111101111001110101110001101101001100101100001
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 2ms
memory: 3384kb
input:
107
output:
00001111110111100111010111000110110100110010110000100011100100111101000011000101111100000101010001001000000
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 2ms
memory: 3364kb
input:
81
output:
000101111100000101010001001000000011111101111001110101110001101101001100101100001
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
147
output:
000101111110000001010100101000010010001000000001111111011111001111010111100011101101110100111001011100001101100110101011010001100100110001011000001
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 2ms
memory: 3268kb
input:
255
output:
000111111101111100111101011110001110110111010011100101110000110110011010101101000110010011000101100000100011110010000111000100111110100000110000101111110000001010100101001101111011000110100100101101101011001010111011100110011101010001010000100100010000000
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 2ms
memory: 3384kb
input:
173
output:
10000111000100111110100000110000101111110000001010100101000010010001000000001111111011111001111010111100011101101110100111001011100001101100110101011010001100100110001011000
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 1ms
memory: 3544kb
input:
288
output:
110100000011000001011111110000000101010100010100100101000001001000010001000000000111111110111111001111101011111000111101101111010011110010111100001110111011001110101011101000111001101110010011100010111000001101101011011000110101001101001011010000110011001010110010001100010011000010110000
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 1ms
memory: 3392kb
input:
407
output:
011001001001101100101100110101110011100101001110110100110011110101000010100100101000001001000010001000000000111111110111111001111101011111000111101101111010011110010111100001110111011001110101011101000111001101110010011100010111000001101101011011000110101001101001011010000110011001010110010001100010...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 1ms
memory: 3396kb
input:
349
output:
111101010000101001001010000010010000100010000000001111111101111110011111010111110001111011011110100111100101111000011101110110011101010111010001110011011100100111000101110000011011010110110001101010011010010110100001100110010101100100011000100110000101100000010000111100010001111100100000111000010011...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 2ms
memory: 3388kb
input:
526
output:
111100000000101010100101010000101001000101000100101000000100100100000100010000100000000001111111110111111100111111010111111000111110110111110100111110010111110000111101110111101100111101010111101000111100110111100100111100010111100000111011100111011010111011000111010110111010100111010010111010000111...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 2ms
memory: 3404kb
input:
1018
output:
111110011111101011111100011111011011111010011111001011111000011110111011110110011110101011110100011110011011110010011110001011110000011101110011101101011101100011101011011101010011101001011101000011100110011100101011100100011100011011100010011100001011100000011011011010011011001011011000011010110011...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 2ms
memory: 3444kb
input:
1017
output:
111100111111010111111000111110110111110100111110010111110000111101110111101100111101010111101000111100110111100100111100010111100000111011100111011010111011000111010110111010100111010010111010000111001100111001010111001000111000110111000100111000010111000000110110110100110110010110110000110101100110...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
1209
output:
101111100111000010100111110110100001100111111010100000010100101001000010100010001010000100101000000010010010001001000000100010000010000100000000000111111111101111111100111111101011111110001111110110111111010011111100101111110000111110111011111011001111101010111110100011111001101111100100111110001011...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 2ms
memory: 3420kb
input:
1632
output:
010001111111001000000011100000010011111111010000000011000000010111111111000000000101010101000101010010010101000001010000011011111110110000001101000001001011111011110000110001000100111011100100110001101101001011001011010011010011110011010001110011001001110011111001010000111011000100110011101101010011...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 0ms
memory: 3304kb
input:
1829
output:
011001011110011110001010001111011001000110011011100110110011100101010011101011110001110001001001111011101000110001111101001000001011011111010110000010101100001000110000010011000000101100000000100000111110000100001111110001000000111100000100011111110010000000111000000100111111110100000000110000000101...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
3187
output:
111000100000001111000000100011111111001000000001110000000100111111111010000000001100000000101111111111000000000010101010100101010100001010100100010101000100101010000001010000001101111111101100000001101000000100101111110111100000110001000010011101111011001100011001100001011100111101001010000101101011...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 2ms
memory: 3420kb
input:
2138
output:
000100011111111001000000001110000000100111111111010000000001100000000101111111111000000000010101010100101010100001010100100010101000100101010000001010010100010100100100101001000001010001000010100001000101000001001010000000010010010000100100010001001000000010001000000100001000001000000000000111111111...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 2ms
memory: 3468kb
input:
4030
output:
111101011111111000111111101101111111010011111110010111111100001111110111011111101100111111010101111110100011111100110111111001001111110001011111100000111110111101111101110011111011010111110110001111101011011111010100111110100101111101000011111001110111110011001111100101011111001000111110001101111100...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
6101
output:
101001100111010110101000101001010111010110111000101011000111010101001000101010110111010101011000101010101111010101110000101110001111010010010000101101101111010010110000101101001111010011010000111100110001000111001110111001010011000110101101111001010110000110101010001001010101110110101110001001110001...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
5917
output:
110100001111001100010001110011101110010100110001101011011110010101100001101010100010010101011101101011100010011100011101100100100110011011011010101100100101010011011010111100100111000011001001000100110110111011001011001100110100110111001011011000110100101001001011010110110100101011001011010100110100...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 2ms
memory: 3556kb
input:
6635
output:
001100101010010111010101101000101010010011010101101100101010110011010101011100101011100011011100011100100100100111011011111000101100000111010100001000101011110111011100011001100100101110011011010011100100111100011111000100100001111011100010001100011101110100100110001011011001110100101010001011010101...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
9993
output:
001110111101111001100011000111001110000100101000111101101100100011001001101110011011011001110010010101000110110101111100100111000001100100100001001101101111011001011000110011010011100110011110001101010001001001010111011011011100010010110001110110101001001100101011011001101010010111001010110100011010...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 3ms
memory: 3732kb
input:
14474
output:
010010100000110110111111100101100000001101010110100110101011001011010101100001101010101100110101010101011010101010001101010100100110101010001011010101000001101010011000110101001010011010100100101101010010000110101000110011010100010101101010001000110101000010011010100000101101010000000110100110100011...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
11534
output:
101010000101001010111101011011100001010110001111010101001000010101011011110101010110000101010101111101010111000001011100011111010010010000010110110111110100101100000101101001111101001101000001111001100001000111001111011100101000110001101011100111001110010100101001110101101111000101011000011101010100...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 6ms
memory: 4152kb
input:
19098
output:
000000110000000000010111111111111100000000000001010101010101000101010101001001010101010000010101010010100101010100100001010101000100010101010000100101010100000001010100101010010100001010100100100010101001000100101010010000001010100010100010101000100100101010001000001010100001010010101000010000101010...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 4ms
memory: 4092kb
input:
31872
output:
001001110000001100100100000100110110111110110010110000110011010011110011001101000011000100111111001111010000010100001000011010111101111001110001100010100111100111011010001010011001011101011001101000101011100101110101000110100010111110010111110000011110000100001000011110111100001000110000111101110100...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 2ms
memory: 4084kb
input:
27626
output:
011100011110011001001000111001101111110001101100000100101100111110110101010000110010101111110011011100000011011001000001011001101111101001101100000111100101000010001110101111011100011100011001001001111001101111100001101100001000101100111101110101010001100010101000101111010101110100001011100010111101...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 1ms
memory: 4760kb
input:
43245
output:
010110010111010101001101000101011110010111011100001101001100100010010010011011101101101101100110110010010111001001101101000110010110010001001101001101110110010110110001001101001001110110010111110001001111000001110010001000010001101110111101110010011000110001101100111001110010101001010011101010110111...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 2ms
memory: 4720kb
input:
34491
output:
010110010001100101001101110011010110110001100101001011110011010111100001100111000011110011001000100011100110111011100011011001100100101100110011011010011011100100101101100011011010010100101100101101011010011010010100111100101101101000011010010011111100101110100000011010001111111100110010000000111001...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 3ms
memory: 4816kb
input:
64535
output:
001111111111110101111111111110001111111111101101111111111101001111111111100101111111111100001111111111011101111111111011001111111111010101111111111010001111111111001101111111111001001111111111000101111111111000001111111110111101111111110111001111111110110101111111110110001111111110101101111111110101...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 9ms
memory: 5740kb
input:
65746
output:
111100001000000000001111100000000001000011111111111100010000000000001111000000000001000111111111111100100000000000001110000000000001001111111111111101000000000000001100000000000001011111111111111100000000000000010101010101010100010101010101001001010101010100000101010101001010010101010100100001010101...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 3ms
memory: 5744kb
input:
65861
output:
000000100000001111111110000001000000000111111100000000100000011111111110000010000000000111111000000000100000111111111110000100000000000111110000000000100001111111111110001000000000000111100000000000100011111111111110010000000000000111000000000000100111111111111110100000000000000110000000000000101111...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 10ms
memory: 6276kb
input:
66725
output:
100101000111101001101100100001111001001110001000011001000111011110011011100110000110110001101000100101001001011101101011011010001001010110010111011010100110100110010111100101100111100001101010100010001001010101110111011010111001100010011100011001110110001110111000101001001100011101011011010010001010...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 3ms
memory: 6160kb
input:
86349
output:
001000101001100011011101011001110010001010101000110111010101011100100010101110001101110101000111001000101111100011011111000001110110000100001001100111101111011010100011000110010101110011100110111001010001101100011011111001001110110000011111000101000010000111101011110000100001110000111101111001000100...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 2ms
memory: 6188kb
input:
68454
output:
001001001100011011011011010010110110010010110100100110110100101100101100101101001101001101001111001011001101000011010011001111110010110101000000110100101111111100101111000000001111000100000001000011101111111011110011000000110000110011111100111101010000010100001010111110101111011100000111000010010000...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 7ms
memory: 6184kb
input:
112260
output:
101001010111000001011011100011111010010010010000010110110110111110100100101100000101101101001111101001001101000001011011001011111010010011110000010111110000111110100001000100000101111011101111101000010011000001011110110011111010000101010000010001101010111110111001011100001100011010001111001110011001...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 12ms
memory: 6336kb
input:
108023
output:
001100100110111011001101101100010111001001001110100011011111000101110110000011101000101000010001011101011110111010001110001100011111000111010010000100100010110111101101110101100001011000101001111010011101101000011110001001100010000111011001110000100010101000111101110101100100011000101001101110011101...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 7ms
memory: 6160kb
input:
103787
output:
110011100000001101010010000001001010110111111011010101100000110010101010000101110101010111101000101011100001011101010001111010001011001000010111010011011110100010110110000101110100100111101000101111100001011111000001111010000100001000010111101111011110100011000110000100010111100111101110100010100011...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 9ms
memory: 6352kb
input:
128710
output:
111111111010101111111111101000111111111110011011111111111001001111111111100010111111111110000011111111110111101111111111011100111111111101101011111111110110001111111111010110111111111101010011111111110100101111111111010000111111111100111011111111110011001111111111001010111111111100100011111111110001...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 14ms
memory: 6248kb
input:
129534
output:
111111110100111111111111001011111111111100001111111111101110111111111110110011111111111010101111111111101000111111111110011011111111111001001111111111100010111111111110000011111111110111101111111111011100111111111101101011111111110110001111111111010110111111111101010011111111110100101111111111010000...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 4ms
memory: 6296kb
input:
128670
output:
100110111111111110010011111111111000101111111111100000111111111101111011111111110111001111111111011010111111111101100011111111110101101111111111010100111111111101001011111111110100001111111111001110111111111100110011111111110010101111111111001000111111111100011011111111110001001111111111000010111111...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 8ms
memory: 8644kb
input:
154721
output:
110001100010111010011100111010001011001010001011101001101011101000101100111000101110100110001110100010110100100010111010010110111010001011010110001011101001010011101000101101111000101110101100001110100010101000100010011010101110111011001011100110001001101000110011101100101110111000100110100110001110...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 16ms
memory: 8640kb
input:
143149
output:
101001111110011110110100000101000110010111110101110011110000010100101000111111010110110010000001010110011011111101010011011000000101111001001111110100001110100000011000100011111111001111001000000010100001101111111010111101100000001110000101000000100111110101111110110000011100000010100001001111111010...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 15ms
memory: 8800kb
input:
134065
output:
010010011011101001011011011000101101011001001110100101001111100010110110100000111010010011000010001011011001111011101001010100011000101101010111001110100101010010100010110101011010111010010101001110001011010111100011101001110001001000111100011101111110000111001100000100010011100111110111011001010000...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 18ms
memory: 8652kb
input:
163454
output:
111001101001110100001100111100010111100110000111010000110100010001111110010111100100000011110000111000001000100010000111101110111111110000100110000000011110110100000001000110010111111101110011110000000100101000011111110110110001000000110010011101111110011011001100000111001001101000010001101100101111...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 17ms
memory: 8656kb
input:
139150
output:
111011100000101110001000111110100011110010000011001000011011111001101111011000001101100001010000101100111101011110101010000111000010101111110001111011100000100100011000111110110111010010000010110001011011111010011101011000001111000101010000100011110101011110001000010111000011101111010001111001100001...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 16ms
memory: 8640kb
input:
172380
output:
111010001001000100001011101101110111101000100100110000101110110110011110100010010101000010111011010101111010001001011100001011101101000111101000100110010000101110110011011110100010011011000010111011001001111010001001111100001011111100000111111000001000010000011111101111100001000001100000111101111100...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 22ms
memory: 8736kb
input:
178166
output:
001001011111011111101101000011000001100101111001111100110100010100001110010111010111100011010001110000111001011100111110001101001010000100100101101011110110110100111000010010011110001111011011000100100011001001110110111001111100010010010100000111011011011000010011011001001111011001001111100001001110...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 9ms
memory: 8688kb
input:
143651
output:
001101100111001101100101010011100100110101111000110110011100001110010011001000100011011001101110111001001101100110001100101100110011100110100110101000110011110010101110101000011011100010101111001000111011100001111110001001000100000111101101111111110000101100000000011110101000000001000010101111111101...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 17ms
memory: 8936kb
input:
198199
output:
011100001001100011000111101100111010010000101010001011011110101011101011000010111000101001111010001110110100001100100110010111100110110011110000110010101000100010111010101110111010001011100110001011101000110011101000101110001000101110100011101110100011001001100011111001101101001000011100100101111111...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 19ms
memory: 8740kb
input:
186272
output:
111111010111000000000001110010000000000100011011111111110111011000000000110001010000000010001101011111111011100111000000011001010010000001001101011011111101100101011000001100110101001111100110010110100000110011010010111110011001011110000011001111000011111001100010001000011100111011101111000110001001...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 15ms
memory: 9000kb
input:
198102
output:
011101101000011001001100101111001101100111100001100101010001000101110101011101110100010111001100010111010001100111010001011100010001011101000111011101000110010011000111110011011010010000111001001011111110001101111000000011101100010000001001100111011111101100110011000001100010011001111100111011010100...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 2ms
memory: 3716kb
input:
8201
output:
000000000001111111111110111111111100111111111010111111111000111111110110111111110100111111110010111111110000111111101110111111101100111111101010111111101000111111100110111111100100111111100010111111100000111111011110111111011100111111011010111111011000111111010110111111010100111111010010111111010000...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 1ms
memory: 3444kb
input:
8202
output:
000000000000111111111111011111111110011111111101011111111100011111111011011111111010011111111001011111111000011111110111011111110110011111110101011111110100011111110011011111110010011111110001011111110000011111101111011111101110011111101101011111101100011111101011011111101010011111101001011111101000...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
8203
output:
000000000000111111111111011111111110011111111101011111111100011111111011011111111010011111111001011111111000011111110111011111110110011111110101011111110100011111110011011111110010011111110001011111110000011111101111011111101110011111101101011111101100011111101011011111101010011111101001011111101000...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 2ms
memory: 3600kb
input:
8204
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 1ms
memory: 3768kb
input:
8205
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 2ms
memory: 3828kb
input:
8206
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 3ms
memory: 3744kb
input:
16394
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 3ms
memory: 3624kb
input:
16395
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
16396
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
16397
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 4ms
memory: 3980kb
input:
16398
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 3ms
memory: 4096kb
input:
16399
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 1ms
memory: 4104kb
input:
32779
output:
000000000000011111111111111011111111111100111111111110101111111111100011111111110110111111111101001111111111001011111111110000111111111011101111111110110011111111101010111111111010001111111110011011111111100100111111111000101111111110000011111111011110111111110111001111111101101011111111011000111111...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 5ms
memory: 4228kb
input:
32780
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
32781
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 1ms
memory: 3792kb
input:
32782
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 1ms
memory: 4576kb
input:
32783
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 1ms
memory: 4616kb
input:
32784
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 0ms
memory: 4772kb
input:
65548
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 2ms
memory: 4920kb
input:
65549
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 3ms
memory: 4808kb
input:
65550
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 1ms
memory: 4220kb
input:
65551
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 4ms
memory: 5856kb
input:
65552
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 8ms
memory: 5920kb
input:
65553
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 6ms
memory: 6372kb
input:
131085
output:
000000000000000111111111111111101111111111111100111111111111101011111111111110001111111111110110111111111111010011111111111100101111111111110000111111111110111011111111111011001111111111101010111111111110100011111111111001101111111111100100111111111110001011111111111000001111111111011110111111111101...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 4ms
memory: 6284kb
input:
131086
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 13ms
memory: 6280kb
input:
131087
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 9ms
memory: 5016kb
input:
131088
output:
000000000000000001111111111111111101111111111111110011111111111111010111111111111110001111111111111011011111111111110100111111111111100101111111111111000011111111111101110111111111111011001111111111110101011111111111101000111111111111001101111111111110010011111111111100010111111111111000001111111111...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 2ms
memory: 8132kb
input:
131089
output:
000000000000000001111111111111111101111111111111110011111111111111010111111111111110001111111111111011011111111111110100111111111111100101111111111111000011111111111101110111111111111011001111111111110101011111111111101000111111111111001101111111111110010011111111111100010111111111111000001111111111...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 16ms
memory: 8248kb
input:
131090
output:
000000000000000001111111111111111101111111111111110011111111111111010111111111111110001111111111111011011111111111110100111111111111100101111111111111000011111111111101110111111111111011001111111111110101011111111111101000111111111111001101111111111110010011111111111100010111111111111000001111111111...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 3ms
memory: 3556kb
input:
8197
output:
000000011111111111101111111111001111111110101111111110001111111101101111111101001111111100101111111100001111111011101111111011001111111010101111111010001111111001101111111001001111111000101111111000001111110111101111110111001111110110101111110110001111110101101111110101001111110100101111110100001111...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
16328
output:
111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100111111101001011111110100001...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 2ms
memory: 4140kb
input:
32608
output:
111100111111111110101111111111100011111111110110111111111101001111111111001011111111110000111111111011101111111110110011111111101010111111111010001111111110011011111111100100111111111000101111111110000011111111011110111111110111001111111101101011111111011000111111110101101111111101010011111111010010...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 7ms
memory: 4824kb
input:
65141
output:
000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101011111...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 12ms
memory: 6248kb
input:
130420
output:
111100111111111111101011111111111110001111111111110110111111111111010011111111111100101111111111110000111111111110111011111111111011001111111111101010111111111110100011111111111001101111111111100100111111111110001011111111111000001111111111011110111111111101110011111111110110101111111111011000111111...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 3ms
memory: 3684kb
input:
8265
output:
000000000100111111111110100000000000110000000000101111111111110000000000001010101010100101010101000010101010010001010101000100101010100000010101001010001010100100100101010010000010101000101001010100010000101010000100010101000001001010100000000101001010010010100101000001010010010000101001000100010100...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 1ms
memory: 4132kb
input:
16508
output:
111100000000010001111111111100100000000000111000000000010011111111111101000000000000110000000000010111111111111100000000000001010101010101000101010101001001010101010000010101010010100101010100100001010101000100010101010000100101010100000001010100101010010100001010100100100010101001000100101010010000...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 5ms
memory: 4720kb
input:
33008
output:
110000010000000001111110000000010000011111111110000100000000001111100000000010000111111111110001000000000001111000000000010001111111111110010000000000001110000000000010011111111111110100000000000001100000000000010111111111111110000000000000010101010101010010101010101000010101010100100010101010100010...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 1ms
memory: 6168kb
input:
65964
output:
100111000000000010100111111111110110100000000001100111111111111010100000000000010100101001010001010010100100100101001010010000010100101000100001010010100001000101001010000010010100101000000001010010010100100101000001010010010010000101001001000100010100100100001001010010010000000101001000101000010100...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 14ms
memory: 8640kb
input:
131692
output:
111111110101110010000000011100011111111111001001000000000001101100000000000101100111111111110101010000000000010101000000000011010111111111111001110000000000010100111111111111011010000000000011001111111111111010100000000000001010010100101000010100101001001000101001010010001001010010100100000010100101...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 4ms
memory: 3780kb
input:
15843
output:
110111111110110011111111010101111111101000111111110011011111111001001111111100010111111110000011111110111101111111011100111111101101011111110110001111111010110111111101010011111110100101111111010000111111100111011111110011001111111001010111111100100011111110001101111111000100111111100001011111110000...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 4ms
memory: 4100kb
input:
31560
output:
111011100111010001001010001011101101011101000100111000101110110001110100010100100010111010110111010001010110001011101010011101000101111000101110100001110100011000100010001001110111011100100110011000110110011010010010111001011011010001101001001111100101110100000110100011111110011001000000111001111111...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 7ms
memory: 4944kb
input:
64241
output:
111110111000111111110110110111111110110100111111110110010111111110110000111111110101110111111110101100111111110101010111111110101000111111110100110111111110100100111111110100010111111110100000111111110011110111111110011100111111110011010111111110011000111111110010110111111110010100111111110010010111...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 5ms
memory: 6168kb
input:
73307
output:
100110101111101001100111000001011010100011111010010110010000010110100110111110100101101100000101101001001111101001011101000001011010001011111010010111110000010111100000111110100010000100000101110111101111101000100011000001011101110011111010001001010000010111011010111110100010011100000101110110001111...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 13ms
memory: 6244kb
input:
129593
output:
111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110111001111111111011010111111111101100011111...
result:
ok meet maximum 8395295323