QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#211731 | #5434. Binary Substrings | lmeowdn | AC ✓ | 32ms | 30208kb | C++14 | 3.1kb | 2023-10-12 20:40:07 | 2023-10-12 20:40:08 |
Judging History
answer
//vanitas vanitatum et omnia
#include<bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define mp make_pair
using namespace std;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef __int128 i128;
template<typename T,typename U>
T ceil(T x, U y) {return (x>0?(x+y-1)/y:x/y);}
template<typename T,typename U>
T floor(T x, U y) {return (x>0?x/y:(x-y+1)/y);}
template<class T,class S>
bool chmax(T &a,const S b) {return (a<b?a=b,1:0);}
template<class T,class S>
bool chmin(T &a,const S b) {return (a>b?a=b,1:0);}
int popcnt(int x) {return __builtin_popcount(x);}
int popcnt(ll x) {return __builtin_popcountll(x);}
int topbit(int x) {return (x==0?-1:31-__builtin_clz(x));}
int topbit(ll x) {return (x==0?-1:63-__builtin_clzll(x));}
int lowbit(int x) {return (x==0?-1:__builtin_ctz(x));}
int lowbit(ll x) {return (x==0?-1:__builtin_ctzll(x));}
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pii> vp;
typedef tuple<int,int,int> tiii;
int read() {
int x=0,w=1; char c=getchar();
while(!isdigit(c)) {if(c=='-') w=-1; c=getchar();}
while(isdigit(c)) {x=x*10+(c-'0'); c=getchar();}
return x*w;
}
const int N=2e5+5;
int n,k,hd[N],s[N],nxt[N];
vi e[N],res,ans;
void dfs(int u) {
//cout<<"DD "<<u<<endl;
for(;hd[u]<s[u];) {
int v=e[u][hd[u]]; hd[u]++;
dfs(v); res.eb(u);
}
}
signed main() {
n=read();
if(n==1) return puts("0"), 0;
else if(n==2) return puts("01"), 0;
else if(n==3) return puts("001"), 0;
else if(n==4) return puts("0011"), 0;
while(k+(1<<k)-1<=n) k++; k--;
rep(i,0,(1<<k-1)-1) {
e[i].eb(i>>1), e[i].eb((i>>1)|(1<<k-2));
}
rep(i,0,(1<<k-1)-1) hd[i]=0, s[i]=e[i].size();
dfs(0);
reverse(res.begin(),res.end());
//for(int x:res) cout<<x<<" "; puts("");
rep(i,0,(1<<k)-1) {
int x=i, y=(x+1)%(1<<k), z=(y+1)%(1<<k);
int u=res[x]|(res[y]<<1), v=res[y]|(res[z]<<1);
//cout<<x<<" "<<y<<" "<<z<<" "<<u<<" "<<v<<endl;
nxt[u]=v;
}
rep(i,0,(1<<k)-1) hd[i]=0, e[i].clear();
rep(i,0,(1<<k)-1) {
if((i>>1)!=nxt[i]) e[i].eb(i>>1);
else e[i].eb((i>>1)|(1<<k-1));
}
rep(i,0,(1<<k)-1) s[i]=e[i].size();
int rest=n-k+1-(1<<k), st=0, i=0;
rep(t,0,(1<<k)-1) {
res.clear(); if(hd[i]<s[i]) dfs(e[i][hd[i]]);
reverse(res.begin(),res.end());
//cout<<res.size()<<endl;
if(res.size()>rest) {
if(rest==0) {
//cout<<"FK\n";
rep(j,t,(1<<k)-1) ans.eb(i>>(k-1)), i=nxt[i];
} else {
vi p=ans; ans.clear(); int sz=res.size();
st=res[sz-1-rest];
rep(i,sz-1-rest,sz-2) ans.eb(res[i]>>(k-1));
rep(j,t,(1<<k)-1) ans.eb(i>>(k-1)), i=nxt[i];
ans.insert(ans.end(),p.begin(),p.end());
}
break;
} else {
rest-=res.size(); ans.eb(i>>(k-1));
for(int x:res) ans.eb(x>>(k-1));
}
i=nxt[i];
}
rep(i,0,k-2) printf("%d",(st>>i)&1);
rep(i,k-1,n-1) printf("%d",ans[i-(k-1)]);
puts("");
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 9872kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 9796kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 0ms
memory: 8892kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 1ms
memory: 9600kb
input:
3
output:
001
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 0ms
memory: 9788kb
input:
4
output:
0011
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 1ms
memory: 9132kb
input:
6
output:
000110
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 1ms
memory: 9452kb
input:
7
output:
1011000
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 1ms
memory: 10408kb
input:
8
output:
00010110
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 0ms
memory: 10064kb
input:
9
output:
000101110
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 2ms
memory: 9196kb
input:
10
output:
0001011100
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 0ms
memory: 10752kb
input:
11
output:
00001011100
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 2ms
memory: 10616kb
input:
12
output:
100101110000
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 27ms
memory: 29860kb
input:
200000
output:
001110110010010001100010011011011010110011001001001010010001101101101010011100100100101010110100110110101010010110010010101011000011011010100101111001001010110000001101101001011111100100101100000000110110010111111110010011000000000011010101111111110001010011111111011101011000000001000100101111111001...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 2ms
memory: 9972kb
input:
24
output:
010100010011010111100000
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 2ms
memory: 10640kb
input:
35
output:
00000111011001010001001101011111000
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 0ms
memory: 9040kb
input:
30
output:
110110010100010011010111100000
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 1ms
memory: 10476kb
input:
45
output:
110011010000100011001010011101011011111000000
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 2ms
memory: 10192kb
input:
66
output:
101010011101011011111000000111101100010111001101000010010001100101
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 2ms
memory: 9532kb
input:
50
output:
00101110011010000100011001010011101011011111000000
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 1ms
memory: 10004kb
input:
80
output:
11100111010000010000110001010001110010010110011010011110101011101101111110000000
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 1ms
memory: 10292kb
input:
107
output:
00011111011100011011000010111100111010000010000110001010001110010010110011010011110101011101101111110000000
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 0ms
memory: 10696kb
input:
81
output:
111100111010000010000110001010001110010010110011010011110101011101101111110000000
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 1ms
memory: 8960kb
input:
147
output:
111100111101000000100000110000101000011100010010001011000110100011110010011001010100101110011011001110100111110101011010111101101110111111100000000
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 1ms
memory: 10832kb
input:
255
output:
100111001011011010010010100110101000100011001100010101110101100100001000001100001010000111000100100010110001101000111100100110010101001011100110110011101001111101010110101111011011101111111000000001111110111000011011110001110110000010111110011110100000010
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 1ms
memory: 10780kb
input:
173
output:
00110111100011101100000101111100111101000000100000110000101000011100010010001011000110100011110010011001010100101110011011001110100111110101011010111101101110111111100000000
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 0ms
memory: 10712kb
input:
288
output:
100000010111111001111101000000010000001100000101000001110000100100001011000011010000111100010001001100010101000101110001100100011011000111010001111100100101001001110010101100101101001011110011001101010011011100111011001111010011111101010101110101101101011111011011110111011111111000000000
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 1ms
memory: 10344kb
input:
407
output:
010011010011001010001100011010110001001011001100001010111101011100100000100000011000001010000011100001001000010110000110100001111000100010011000101010001011100011001000110110001110100011111001001010010011100101011001011010010111100110011010100110111001110110011110100111111010101011101011011010111110...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 1ms
memory: 10532kb
input:
349
output:
010111001000001000000110000010100000111000010010000101100001101000011110001000100110001010100010111000110010001101100011101000111110010010100100111001010110010110100101111001100110101001101110011101100111101001111110101010111010110110101111101101111011101111111100000000011111110111100001110111000001...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 2ms
memory: 9712kb
input:
526
output:
111010000000010000000110000001010000001110000010010000010110000011010000011110000100010000100110000101010000101110000110010000110110000111010000111110001000110001001010001001110001010010001010110001011010001011110001100110001101010001101110001110010001110110001111010001111110010010010110010011010010...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 2ms
memory: 9992kb
input:
1018
output:
110101101001010001001110001010010001010110001011010001011110001100110001101010001101110001110010001110110001111010001111110010010010110010011010010011110010100110010101010010101110010110110010111010010111110011001110011010110011011010011011110011101010011101110011110110011111010011111110101010110101...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 1ms
memory: 9396kb
input:
1017
output:
101011010010100010011100010100100010101100010110100010111100011001100011010100011011100011100100011101100011110100011111100100100101100100110100100111100101001100101010100101011100101101100101110100101111100110011100110101100110110100110111100111010100111011100111101100111110100111111101010101101010...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 2ms
memory: 10668kb
input:
1209
output:
010110000010010111100110000001010111111010111110010000000100000000110000000101000000011100000010010000001011000000110100000011110000010001000001001100000101010000010111000001100100000110110000011101000001111100001000010001100001001010000100111000010100100001010110000101101000010111100001100010000110...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 1ms
memory: 9032kb
input:
1632
output:
000100011011001110010010110100110100101100101100001100101110001100110110001100000110101111000100111011001100010010101100110101101000101001011101011011001010011011010110010010000110100111100101011101101010001001000111010011100010101101110101001000101010011101010100001010001111000110111011100100010001...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 1ms
memory: 9168kb
input:
1829
output:
110000111010111000010011011100110010001100100110001101010110001010000111000111011011000010001011100111000001011011111010010000010100111110101000000100000000110000000101000000011100000010010000001011000000110100000011110000010001000001001100000101010000010111000001100100000110110000011101000001111100...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 2ms
memory: 9456kb
input:
3187
output:
000010011001110011001111010001100001011010111101001010000101100011110000110111011110010001000011011001111001001011101001101000101100101110000110011011100011000000110101111100010011110110011000010010101110011010000011000011110101110000010011011110011001000011001001110001101011011000101000001110001111...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 0ms
memory: 11068kb
input:
2138
output:
100001111110111000000001101111111100011111110110000000001011111111100111111110100000000001000000000110000000010100000000111000000010010000000101100000001101000000011110000001000100000010011000000101010000001011100000011001000000110110000001110100000011111000001000010000010001100000100101000001001110...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 2ms
memory: 9980kb
input:
4030
output:
001110111001100010001010110011101011010000101000011110001110111011100010001110110011100010010110110011010010011001011010001101001011100101100000110010111100011001110110001100010011010110011001010010001101010011100101010110110101010010010101010011010101010001010100011101000111000101101101110100100100...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 0ms
memory: 11356kb
input:
6101
output:
011101011010100010100100011101010011100010101011011101010100100010101010011101010101000010101000111101000111000010110110111101001001000010110100111101001011000010110010111100001100111011100011000100011010110011100101001000011010100111100101010111011010101000100101000111011000111000100110110110011001...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 2ms
memory: 9752kb
input:
5917
output:
111000110001000110101100111001010010000110101001111001010101110110101010001001010001110110001110001001101101100110010010010101001101101010110010010100001101100011110011011011101100100100010011010011001100101100100011010010011100101101011011010010100100101101010011010010101100101101000011010000111100...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 0ms
memory: 11328kb
input:
6635
output:
101001011101010110110010101001001101010100110010101010001101010001110010001110001101101101100010010000011101001111100010101111011101010000100010001110011001101101000110010010110001101100001110000011101101111000010001110111001110001000101101100111010010011000101101010111010010101000101101000111010010...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 3ms
memory: 11388kb
input:
9993
output:
111000110001111011010111000010010011011100110110010001100100100110001101101010111001001010000011011000111110011011011110110010010000100110100111001100101100011001100001110010101110110110101000100100100011101101001110001001010110110011010100100110010101101000110101001011100101011000001101001011111001...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 1ms
memory: 12124kb
input:
14474
output:
100000101111001111101111011000001000000000001100000000001010000000000111000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 0ms
memory: 11148kb
input:
11534
output:
100100011110101001110000101010110111101010100100001010101001111010101010000010101000111110100011100000101101101111101001001000001011010011111010010110000010110010111110000110011110111000110000100011010111001110010100011000110001101011010110001010010000111010100111100010101011101110101010001000101000...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 4ms
memory: 11500kb
input:
19098
output:
000110000001111101011111000000100111101111100110000100000110011100111100011000111110110101110000010010011011110011011001000011001001001110001101101011011100100101001110100110101100010110010000111010010011110001011010111011101001010001000101100011001110000111001011011101101101001000100100101001100110...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 5ms
memory: 11700kb
input:
31872
output:
111110111011010000010001000011111011001111000001001011101111001101000100001100101100111000110100101101110010110100100011010010100111001011010101101101001010100100101101010100110100101010110010110101000011010010001111001010011011101101011001000100101001001110110101001100010010101010110011010101011010...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 5ms
memory: 12296kb
input:
27626
output:
100010000100100110011100110110011110110010011000010011010101110011001010100011001101000111001100101110001100110000011100101011110110110101000010010010001111011010011100001001010110111001101010010001100101010011000110101010101100010101010000111010100011110001010110111011101010010001000101010011001110...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 3ms
memory: 13900kb
input:
43245
output:
101010000110100010001111001011001101110110110110010001001001001001100100110110100011011001001011100110100110111011001011001000100110100100111011001011011000100110100000111011000011111000110111011110111001000100001000110110011100111001001100011000110101011010110001010100100001110101010011110001010101...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 4ms
memory: 14840kb
input:
34491
output:
110010100100111001101011010000110010100001111001100011110000110011011101110001100100010001110010011001101101001100110010010110010001101101001001110010010110101101001101001010010110010110101100001101001001011110010110110000001101000101111110010111000000001100110111111100011000000000011010111111111000...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 0ms
memory: 14704kb
input:
64535
output:
110000100100111101110011011000010001100000000010010100000000010011100000000010100100000000010101100000000010110100000000010111100000000011000100000000011001100000000011010100000000011011100000000011100100000000011101100000000011110100000000011111100000000100000100000000100001100000000100010100000000...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 11ms
memory: 19200kb
input:
65746
output:
011111000000000001111011111111111000001111111111011110000000000001110111111111111000011111111111011100000000000001101111111111111000111111111111011000000000000001011111111111111001111111111111010000000000000001000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 4ms
memory: 19648kb
input:
65861
output:
111100000000111111101111111000000000111111011111111100000001111111101111110000000000111110111111111100000011111111101111100000000000111101111111111100000111111111101111000000000000111011111111111100001111111111101110000000000000110111111111111100011111111111101100000000000000101111111111111100111111...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 8ms
memory: 19712kb
input:
66725
output:
100001101100011101111001101110001000011001000110011110010011100101110110101101101000100101001001011101101010011010001001010110010110011010000110100110000111100101010111011101101010100010001001010001100111011000111001100010011100010001110101101100111000101001001011011101010011010010001010110010100111...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 14ms
memory: 19140kb
input:
86349
output:
100011011101010101110010001010101000110111010100011100100010101110001101110100000111001000001111100010011110111101100110000100001001010111001110011010100011000110010001101011100100111001000001101100010011111000001110101111011110000101000011110111100011110000100001101110111001111001000100011000011011...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 12ms
memory: 19260kb
input:
68454
output:
010010011011010010110110010010110100110100110100101100101100101100001101001100101111001011001100000011010010101111110010110100000000110100001111111100001110111111101111000100000001000011001111110011110011000000110000101011111010111101010000010100001000111110001111011011110110000010010000000111110100...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 18ms
memory: 19532kb
input:
112260
output:
000101101101101111101001001001000001011011010011111010010010110000010110110010111110100100110100000101101100001111101000001111000001011110111011111010000100010000010111101100111110100001001100000101111010101111101110010101000001000110100011110011100101110000110001100110111010110001100100010100111001...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 14ms
memory: 19236kb
input:
108023
output:
101000110110110001011100100000111010001001111100010111010111101110100010100001000101110001110011100000111000101101111011011101001000010010001010011110100111010110000101100010010111100001110110011101111000100110001111011101010111000010001010011011100111010110010001100010100110110101110101100100101000...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 8ms
memory: 19176kb
input:
103787
output:
101101010010000001001010100111110011010101011110100010101010000101110101000111101000101011100001011101001101111010001011001000010111010010011110100010110110000101110100000111101000001111100001011110111101111010000100001000010111001110011110111010000110000100010111010111001110100010100011000101110101...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 14ms
memory: 19432kb
input:
128710
output:
111011101011011100010001010000001110111000111111000100011011111011001110010000010011000100111110101011001100000101010010101111101010110101111001010100101111011010101101000010010101000011110110100011110000100101101110111001101001000100011001010011001100011010110010101110010100110100000110101100001111...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 18ms
memory: 19736kb
input:
129534
output:
010010100011000110110001100011100110110101100001100100100101110001101101100000000110111010000000011011111000000001110000100000000111000110000000011100101000000001110011100000000111010010000000011101011000000001110110100000000111011110000000011110001000000001111001100000000111101010000000011110111000...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 17ms
memory: 19768kb
input:
128670
output:
001111110001000110111110110011100100000100110001001111101010110011000001010100101011111010101101011110010101001011110110101011010000100101010000111101101000111100001001011011101110011010010001000110010100110011000110101100101011100101001101000001101011000011111001001011101111010011010001000010110010...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 28ms
memory: 29772kb
input:
154721
output:
010011010111010001011001010001011101001100011101000101100111000101110100101101110100010110100100010111010010100111010001011010110001011101001000011101000101001111000101110101011101110110010101000100010011010001100111011001011100110001001101000100011101100101100111000100110100101101110110010110100100...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 29ms
memory: 29504kb
input:
143149
output:
111001101000001010001100001111101011010111000000101001001101111110101001100100000010101100100111111010000110110000001011110001011111100111011100000000110000110111111101011110010000000101000010011111110001111010111111011000001010000001001111100011111101011110110000000101000001011111110001111100111111...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 27ms
memory: 29868kb
input:
134065
output:
010010100110110001011010110000011101001001011111000101101100111101110100100110000100010110101011100111010010101000110001011010101101011101001010100101000101101010110001110100101000011100010110001110110111000011100010000001111000110011111011101100011000001000100110101111001110110010100001100010011000...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 30ms
memory: 29396kb
input:
163454
output:
100001100111100010111100101110111000000110100001101111110000111100011111011101110111100001000100000000111101100111111110000100101111111011100110100000001000110000111111101101011110000000100100111011111100110110001000000110010011001111100011011001011110111001001101000010001101100001111011100000111100...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 28ms
memory: 30012kb
input:
139150
output:
011100001101111100110111100100000110010000100111110010011110101111010011000010100001010101111000111101010000001110000100011111011011100111000001001000101101111101001110100100000101100010100111110000111010101111011100001010100001110111101000111100010000101110000110011110011011110011000011001000011101...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 31ms
memory: 29552kb
input:
172380
output:
100001011101101100111101000100100110000101110110101011110100010010101000010111011010001111010001001011100001011101100110111101000100110010000101110110010011110100010011011000010111011000001111010000001111100000011111011110111110000001000001111011111001111100001000001100000111001111010111100001100001...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 27ms
memory: 29804kb
input:
178166
output:
111001101000011000001100101110101111000110100010100001110010111000111100011010001100000111001011010111101101101001010000100100101100011110110110000111000010010011101101110011011000100100011000001110110110101111100010010010011110110010011011000010011011000001111011000101111100001001110011110111001100...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 24ms
memory: 29660kb
input:
143651
output:
011011001010000111001001100011110001101100110111011100100110010001000110110010011001110011010011001100011001011001010111001100001101010001010111100100011101010000110111000100011110000001110110111011111000010010000000001111010011111111100001010111111110111101010000000010000100011111110011100111111111...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 32ms
memory: 30208kb
input:
198199
output:
001001000110110101101001110010010100101011010011010110101001011001010010101100001101011010010111100101001011000000110101100101111110010100110000000011010101011111110001010100111111011101010110000001000101001011111001110101100000001100010010111111010110011010000001010011000011111101010101110000000101...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 25ms
memory: 29720kb
input:
186272
output:
111111101110010000000000100010011111111100111010111111110111001010000000010001100011111110011010110111111011001010010000001001101010011111001100101011000001100110100101111100110010110100000110011010000111110011000011110000011001110111011110001100010001000011100111011001110000110001001011011101011001...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 25ms
memory: 29772kb
input:
198102
output:
001010010110000001101011001011111100101001100000000110101010111111100010101001111110111010101100000010001010010111110011101011000000011000100101111110101100110100000010100110000111111010101011100000001010100110111111101010110010000000101010010011111110101010011000000010101010101111111010101010111111...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 2ms
memory: 10880kb
input:
8201
output:
101010101101010101011001010101101001010101111001010110011001010110101001010110111001010111011001010111101001010111111001011001011001101001011001111001011010011001011010101001011010111001011011011001011011101001011011111001011100111001011101011001011101101001011101111001011110011001011110101001011110...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 2ms
memory: 10144kb
input:
8202
output:
000000000000011111111111011111100000011111011111000000011110111111100000111111011110000000011101111111100001111111011100000000011011111111100011111111011000000000010111111111100111111111010000000000010011111111001011111110110100000001000011111100111011111011000100000100110011110011001111101000110000...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 2ms
memory: 10504kb
input:
8203
output:
000000000000011111111111011111100000011111011111000000011110111111100000111111011110000000011101111111100001111111011100000000011011111111100011111111011000000000010111111111100111111111010000000000010011111111001011111110110100000001000011111100111011111011000100000100110011110011001111101000110000...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 0ms
memory: 10700kb
input:
8204
output:
000000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 0ms
memory: 11852kb
input:
8205
output:
000000000000001000000000001100000000001010000000000111000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 0ms
memory: 10524kb
input:
8206
output:
100000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 3ms
memory: 10236kb
input:
16394
output:
101010101010100101010101110010101011011001010101110100101010111110010101100111001010110101100101011011010010101101111001010111001100101011101010010101110111001010111101100101011111010010101111111001011001011100101100110110010110011101001011001111100101101001110010110101011001011010110100101101011110...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 3ms
memory: 11632kb
input:
16395
output:
000000000000001111111111110111111000000011111011111110000001111110111110000000011110111111110000011111110111100000000011101111111110000111111110111000000000011011111111110001111111110110000000000010111111111110011111111110100000000000010011111111100101111111101101000000001000011111110011101111110110...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 3ms
memory: 11348kb
input:
16396
output:
000000000000001111111111110111111000000011111011111110000001111110111110000000011110111111110000011111110111100000000011101111111110000111111110111000000000011011111111110001111111110110000000000010111111111110011111111110100000000000010011111111100101111111101101000000001000011111110011101111110110...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 0ms
memory: 13348kb
input:
16397
output:
000000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 4ms
memory: 11496kb
input:
16398
output:
000000000000000100000000000011000000000001010000000000011100000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000011011000000000111010000000001111100000000100001000000001000110000000010010100000000100111000000001010010000...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 2ms
memory: 12528kb
input:
16399
output:
100000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 0ms
memory: 11888kb
input:
32779
output:
101010101011010101010101100101010101101001010101011110010101011001100101010110101001010101101110010101011101100101010111101001010101111110010101100101100101011001101001010110011110010101101001100101011010101001010110101110010101101101100101011011101001010110111110010101110011100101011101011001010111...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 5ms
memory: 12996kb
input:
32780
output:
000000000000000111111111111101111111000000011111101111110000000011111011111111000000111111101111100000000011110111111111000001111111101111000000000011101111111111000011111111101110000000000011011111111111000111111111101100000000000010111111111111001111111111101000000000000010011111111110010111111111...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 5ms
memory: 13136kb
input:
32781
output:
000000000000000111111111111101111111000000011111101111110000000011111011111111000000111111101111100000000011110111111111000001111111101111000000000011101111111111000011111111101110000000000011011111111111000111111111101100000000000010111111111111001111111111101000000000000010011111111110010111111111...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 0ms
memory: 13920kb
input:
32782
output:
000000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 3ms
memory: 15484kb
input:
32783
output:
000000000000000010000000000000110000000000001010000000000001110000000000010010000000000010110000000000011010000000000011110000000000100010000000000100110000000000101010000000000101110000000000110010000000000110110000000000111010000000000111110000000001000010000000001000110000000001001010000000001001...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 7ms
memory: 14368kb
input:
32784
output:
100000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 5ms
memory: 15636kb
input:
65548
output:
101010101010101001010101010111001010101011011001010101011101001010101011111001010101100111001010101101011001010101101101001010101101111001010101110011001010101110101001010101110111001010101111011001010101111101001010101111111001010110010111001010110011011001010110011101001010110011111001010110100111...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 3ms
memory: 15328kb
input:
65549
output:
000000000000000011111111111111011111110000000011111101111111100000001111111011111100000000011111011111111100000011111111011111000000000011110111111111100000111111111011110000000000011101111111111100001111111111011100000000000011011111111111100011111111111011000000000000010111111111111100111111111111...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 6ms
memory: 15552kb
input:
65550
output:
000000000000000011111111111111011111110000000011111101111111100000001111111011111100000000011111011111111100000011111111011111000000000011110111111111100000111111111011110000000000011101111111111100001111111111011100000000000011011111111111100011111111111011000000000000010111111111111100111111111111...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 8ms
memory: 19816kb
input:
65551
output:
000000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 8ms
memory: 20252kb
input:
65552
output:
000000000000000001000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 10ms
memory: 19408kb
input:
65553
output:
100000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 19ms
memory: 19476kb
input:
131085
output:
101010101010110101010101010110010101010101101001010101010111100101010101100110010101010110101001010101011011100101010101110110010101010111101001010101011111100101010110010110010101011001101001010101100111100101010110100110010101011010101001010101101011100101010110110110010101011011101001010101101111...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 14ms
memory: 19492kb
input:
131086
output:
000000000000000001111111111111110111111110000000011111110111111100000000011111101111111110000000111111110111111000000000011111011111111110000001111111110111110000000000011110111111111110000011111111110111100000000000011101111111111110000111111111110111000000000000011011111111111110001111111111110110...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 16ms
memory: 20008kb
input:
131087
output:
000000000000000001111111111111110111111110000000011111110111111100000000011111101111111110000000111111110111111000000000011111011111111110000001111111110111110000000000011110111111111110000011111111110111100000000000011101111111111110000111111111110111000000000000011011111111111110001111111111110110...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 24ms
memory: 29744kb
input:
131088
output:
000000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 20ms
memory: 29580kb
input:
131089
output:
000000000000000000100000000000000011000000000000001010000000000000011100000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 20ms
memory: 29940kb
input:
131090
output:
100000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 0ms
memory: 9824kb
input:
8197
output:
101011010101010110010101011010010101011110010101100110010101101010010101101110010101110110010101111010010101111110010110010110011010010110011110010110100110010110101010010110101110010110110110010110111010010110111110010111001110010111010110010111011010010111011110010111100110010111101010010111101110...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 4ms
memory: 11672kb
input:
16328
output:
101101010101101001010101000100101011100010010110010001001011011000100101110100010010111110001001100011000100110010100010011001110001001101001000100110101100010011011010001001101111000100111001100010011101010001001110111000100111100100010011110110001001111101000100111111100010100010110001010001101000...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 3ms
memory: 11500kb
input:
32608
output:
011001101100011001100110110000011001110100000110011111000001101000010000011010001100000110100101000001101001110000011010100100000110101011000001101011010000011010111100000110110001000001101100110000011011010100000110110111000001101110010000011011101100000110111101000001101111110000011100001100000111...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 11ms
memory: 14372kb
input:
65141
output:
101001000110100010110111001011101001000001011101011000001011101101000001011101111000001011110001000001011110011000001011110101000001011110111000001011111001000001011111011000001011111101000001011111111000001100000111000001100001001000001100001011000001100001101000001100001111000001100010001000001100...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 16ms
memory: 19496kb
input:
130420
output:
010111010010100110100001001010011110000100101010001000010010101001100001001010101010000100101010111000010010101100100001001010110110000100101011101000010010101111100001001011000110000100101100101000010010110011100001001011010010000100101101011000010010110110100001001011011110000100101110001000010010...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 2ms
memory: 11720kb
input:
8265
output:
111111100011111111101100000000000101111111111100111111111101000000000000100000000000110000000000101000000000011100000000010010000000001011000000000110100000000011110000000010001000000001001100000000101010000000010111000000001100100000000110110000000011101000000001111100000001000010000000100011000000...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 4ms
memory: 13312kb
input:
16508
output:
011111111110000111111111011100000000000110111111111110001111111111011000000000000101111111111110011111111111010000000000000100000000000011000000000001010000000000011100000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 4ms
memory: 15748kb
input:
33008
output:
111110000000001111101111111110000001111111101111100000000001111011111111110000011111111101111000000000001110111111111110000111111111101110000000000001101111111111110001111111111101100000000000001011111111111110011111111111101000000000000001000000000000011000000000000101000000000000111000000000001001...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 13ms
memory: 19124kb
input:
65964
output:
000010010111111111100110000000000001010111111111111010111111111110010000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 31ms
memory: 29636kb
input:
131692
output:
100000000000110110111111111110010011111111111010011000000000001010101111111111101010111111111100101000000000000110001111111111101011000000000000100101111111111100110000000000000101011111111111110101111111111110010000000000000010000000000000001100000000000000101000000000000001110000000000000100100000...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 0ms
memory: 11876kb
input:
15843
output:
001110100011111000101101111011101001000010001010011100111010100001100010001110101100111000101001011011101011010010001010010100111010110101110010100101110110101101000100101001011001101011011011001010010010011010100110110010101100100110100001101100001111000000001000100000000100110000000010101000000001...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 3ms
memory: 12548kb
input:
31560
output:
011101010101101100101010100100110101010100110010101010100011010101000111001010001110001101011011011000101001000001110101001111100010101011110111010101000010001010001110011100011100011000110110110101110010010010000011011010011111001001010111101001101010000101100100011110100100111000010110101101111010...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 7ms
memory: 14832kb
input:
64241
output:
110111101001011001000010110100100111101001011011000010110100000111101000011111000010111011110111101000100001000010110011100111101101000011000010010111010111001101000101000110010111000111001100000111000101011110110111010100001001000100011110100110011100001011001011011110000110100011101111001011100010...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 14ms
memory: 19204kb
input:
73307
output:
101001010111000001011010011011111010010110010000010110100100111110100101101100000101101000101111101001011101000001011010000011111010000111110000010111011110111110100010000100000101110111001111101000100011000001011101101011111010001001010000010111011000111110100010011100000101110101101111101000101001...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 11ms
memory: 20160kb
input:
129593
output:
101111100011011100111101110010001100001000110110101110011100100101000110001101100011000111001101101011000011001001001011100011011011000000001101110100000000110111110000000011100001000000001110001100000000111001010000000011100111000000001110100100000000111010110000000011101101000000001110111100000000...
result:
ok meet maximum 8395295323