QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#563745 | #5434. Binary Substrings | Wuyanru | AC ✓ | 28ms | 21880kb | C++14 | 4.0kb | 2024-09-14 15:38:44 | 2024-09-14 15:38:45 |
Judging History
answer
#include<bits/stdc++.h>
#define inf 0x3f3f3f3f3f3f3f3fll
#define debug(x) cerr<<#x<<"="<<x<<endl
using namespace std;
using ll=long long;
using ld=long double;
using pli=pair<ll,int>;
using pi=pair<int,int>;
template<typename A>
using vc=vector<A>;
inline int read()
{
int s=0,w=1;char ch;
while((ch=getchar())>'9'||ch<'0') if(ch=='-') w=-1;
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s*w;
}
inline ll lread()
{
ll s=0,w=1;char ch;
while((ch=getchar())>'9'||ch<'0') if(ch=='-') w=-1;
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s*w;
}
// mt19937 _rand(116);
// mt19937 _rand(114);
mt19937 _rand(time(0)^clock());
int fa[300001],siz[300001];
bool go[300001];
int to[300001][2];
char s[300001];
int n,k,c,cnt;
void dfs(int num,int k)
{
int lim=(1<<k)-1;
int fir=_rand()%2;
if(!to[num][fir])
{
to[num][fir]=1;
dfs((num<<1|fir)&lim,k);
s[c--]=fir+'0';
}
fir^=1;
if(!to[num][fir])
{
to[num][fir]=1;
dfs((num<<1|fir)&lim,k);
s[c--]=fir+'0';
}
}
inline int run(int p)
{
c=(2<<p)+p;
memset(s,'0',sizeof(s));s[c+1]=0;
memset(to,0,sizeof(to));
dfs(0,p);
// printf("%s\n",s+1);
memset(to,0,sizeof(to));
int lim=(1<<(p+1))-1,lst=0,now=0;
for(int i=1;i<=(2<<p)+p;i++)
{
now=((now<<1)+s[i]-'0')&lim;
if(i>k) to[lst][s[i]-'0']=1;
lst=now;
// printf("i=%d now=%d\n",i,now);
}
// for(int i=0;i<=lim;i++) printf("%d : %d %d (%d,%d)\n",i,to[i][0],to[i][1],(i<<1)&lim,(i<<1|1)&lim);
return lst;
}
inline void run(int &num,int now)
{
// printf("run %d %d\n",num,now);
// for(int i=0;i<(1<<k);i++) printf("%d : %d %d (%d,%d)\n",i,to[i][0],to[i][1],(i<<1)&((1<<k)-1),(i<<1|1)&((1<<k)-1));
int mem=now;
do
{
// printf("now=%d\n",now);read();
for(int i=0;i<2;i++) if(!to[now][i])
{
s[num++]=i+'0';
now=(now<<1|i)&((1<<k)-1);
break;
}
}while(now!=mem);
}
void output(int num,int now)
{
// printf("output %d %d\n",num,now);
if(num==n+1)
{
s[n+1]=0;printf("%s\n",s+1);
exit(0);
}
if(go[now]) run(num,now);
if(num>n) return ;
for(int i=0;i<2;i++) if(to[now][i]==1)
{
to[now][i]=2;s[num]=i+'0';
output(num+1,(now<<1|i)&((1<<k)-1));
to[now][i]=1;
}
for(int i=0;i<2;i++) if(to[now][i]==0)
{
to[now][i]=2;s[num]=i+'0';
output(num+1,(now<<1|i)&((1<<k)-1));
to[now][i]=0;
}
}
inline int find(int num)
{
if(fa[num]==num) return num;
return fa[num]=find(fa[num]);
}
inline void merge(int u,int v)
{
u=find(u),v=find(v);
if(u==v) return ;
fa[u]=v,siz[v]+=siz[u];
}
int main()
{
n=read();
if(n==1){ printf("0\n");return 0;}
while(n>=(1<<(k+1))+k) k++;
// printf("k=%d\n",k);
while(true)
{
cnt++;
int ma=(1<<k)-1,o=run(k-1);
for(int i=0;i<=ma;i++) siz[i]=0,fa[i]=i;
for(int i=0;i<=ma;i++) for(int j=0;j<2;j++) if(!to[i][j])
{
int t=(i<<1|j)&ma;
merge(i,t),siz[find(i)]++;
}
int S=0;
for(int i=0;i<ma;i++) if(find(i)==i) S=max(S,siz[i]);
if(S!=siz[find(o)]) continue;
// printf("finish cnt=%d %d %d\n",cnt,S,siz[find(o)]);
int now=(1<<k)+k-1,need=n-now;
vc<int>id;for(int i=0;i<=ma;i++) if(find(i)==i&&i!=find(o)) id.push_back(i);
sort(id.begin(),id.end(),[](int x,int y){ return siz[x]<siz[y];});
for(int i:id) if(need>=siz[i]) need-=siz[i],go[i]=1;
// printf("need=%d\n",need);
int St=0;
for(int i=1;i<=k;i++) St=(St<<1)|(s[i]-'0');
// for(int i=0;i<=ma;i++) printf("%d : %d %d\n",i,to[i][0],to[i][1]);
// for(int i=0;i<=ma;i++) if(find(i)==i) printf("%d : siz=%d\n",i,siz[i]);
output(k+1,St);
assert(0);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 8556kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 7072kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 1ms
memory: 7908kb
input:
3
output:
010
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 0ms
memory: 8416kb
input:
4
output:
0100
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 1ms
memory: 7532kb
input:
6
output:
011100
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 1ms
memory: 7172kb
input:
7
output:
0011100
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 0ms
memory: 7684kb
input:
8
output:
00111000
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 1ms
memory: 7964kb
input:
9
output:
001110100
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 0ms
memory: 7648kb
input:
10
output:
0001011100
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 1ms
memory: 7220kb
input:
11
output:
00111101000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 1ms
memory: 7680kb
input:
12
output:
000111101000
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 10ms
memory: 21340kb
input:
200000
output:
000000000000000010111111001101010001100111011111011100000111110111011010011110101000000000010000001011110011001111001010101100101100000100011110111101110101101100011010000110001111011110011110100111111101011111100101110011111110101001100010100000011111110100100111110100001010110110001110100110001111...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 1ms
memory: 8212kb
input:
24
output:
000011111001011010100000
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 0ms
memory: 8600kb
input:
35
output:
00001001101011111000111011001010000
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 1ms
memory: 7388kb
input:
30
output:
000010111110110101001100011100
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 1ms
memory: 7868kb
input:
45
output:
000001100111010100110100010010101101111110000
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 0ms
memory: 7908kb
input:
66
output:
000001111110110001011100100110101000010001100111010010101101111000
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 1ms
memory: 9040kb
input:
50
output:
00000110011101010011010001001010110111111000010111
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 1ms
memory: 8556kb
input:
80
output:
00000101111001001011001010000110011011000111111101010110100100010011101110000000
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 2ms
memory: 7380kb
input:
107
output:
00000010011011110111011011001001000101011010101000011101001011100110011111110101111100011000001101000111100
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 1ms
memory: 8036kb
input:
81
output:
000000110011010101100011101101111111001110010010100111101000010001011100000101010
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 1ms
memory: 7280kb
input:
147
output:
000000011111111011101111100110011101100010000010101001111000010010011010110100101000011011011100011100100010110010111101010101110100011000000100011
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 1ms
memory: 9016kb
input:
255
output:
000000011110101001101110101100110101010111100010111011100111010001010001101101001111100110011110010010000011010000100111001010010011000001000011001000100101101111111101111011000111000010101000000101100001110110110010111110100101011010111000110001000111111
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 1ms
memory: 7980kb
input:
173
output:
00000001111101000010111011110000010001101110001110101000100101100111101100001100010101011111111011101001111110010100110010010011100110101101101001000000101000001101000111100
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 1ms
memory: 7884kb
input:
288
output:
000000011001100010010110010000111011110010111001001010011000001000110010011001010000100000010011111001110011011001111000101001001000111000110000110111000010101010001000101111110000011110101100011111111101000110100000101101101001010111011011111011101010110101001110100110101111011000000000
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 0ms
memory: 7224kb
input:
407
output:
000000001010011000010011111010111001011011011101001000111010110101100010101000011111111101000101000001011111110001100011100100100101100101111010011101000000110111001100111101110000101011001110111011110010101110101001001101011111001110000011000001000110100011110000110010001011100010010000101101001010...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 1ms
memory: 7856kb
input:
349
output:
000000001011111011101011100010000101000101101111110100011101001100001100111001100100000011011000001001010111100111101101101011010000011110001111111110110001001000011010111111100001000100111110010010011010101010010111011001101110010110001101001000110001010101100101001110111101010000111000000011101101...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 1ms
memory: 8488kb
input:
526
output:
000000000111101101111000111010001001011111100111011000010111101110010110011000110101111001101001001100101110100101101101001100000011011001110010000010000000100111100000110001001101111101001110101010000001010101011111001001110001100001111100010001111001010100111111111101111010110000010110001011100110...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 1ms
memory: 7756kb
input:
1018
output:
000000000110011000101000111001101101111010010001100100010011000001101000010011110001011110111001111011001000010001000011100100011101011101100110100110010111000111110110110110000101110111110001101010011111001100111001010011011111110001000110100100100111111000011111000000010110010011100010010100001111...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 2ms
memory: 7088kb
input:
1017
output:
000000000100111001001101101101010001010101110010101100000001101010110110010100011111011110101111011011100110111100101110001001011110000011111110010001101001101000001100100001011001100101100010100001111000101110111111111100010001000001110000101110011110101011110011010010100000101101101111011111001010...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 1ms
memory: 7900kb
input:
1209
output:
000000000011110110111100011101000100101111110011101100001011111011001011001100011010111101011100100110010111010010111000100100001001101100111001010001000001000100111000001101010011101110010111101110100000010000000010110010001000111011110110001100111110111000011110011111111010110000111010100011110100...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 2ms
memory: 8908kb
input:
1632
output:
000000000101100110010111101011000010000100110000011011000001010010110001111111001101100111100001010110011101001000101000110001000100010111111011000011010001000111110100010101000111001000111011101000000100000000110000000100111000011111101001111001011010000110111111001000010111001101011001001011011000...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 1ms
memory: 8052kb
input:
1829
output:
000000000010001110101010011101100110110011000101111100100101100000110111100010011110110001010011010111111010101110100011011100010101001001010000010010101000010101011000010110010001111001110000101000111111001101101100111001110100100001000000101110010110110000000011101000001100000100001011110101110101...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 0ms
memory: 7988kb
input:
3187
output:
000000000001100000111111100010011000101110110000100101111001011100110011100101010101011001101110011100000001110001000111000111000010011100011010110000001100101001111101100011000100111010011011101110010001110100010001010010111111001101011010010110010001101101111000011000010111001001101000100101011111...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 2ms
memory: 8628kb
input:
2138
output:
000000000001110010010110110110101010011111100001010110000110111011011101111011011011110101010001011001000000111011100110011001101011111101100010010100110011000001100111001111001000011100011111110111010011011100111111100110100110001110110000001111111101101111110001010011101101001011001110000000010000...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 1ms
memory: 8624kb
input:
4030
output:
000000000001110011011110010011100001010111000111001001000010010000011101111110001100000000110001110101111101000010100100010001001101111100011101110001011010001111011111111001011100000100110001110011001110001001111110001000010100010111111010011001011001000001100010111101101110111011110101000101000110...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 1ms
memory: 8592kb
input:
6101
output:
000000000000111101101111000111010001001011111100111011000010111111110010110011000110101111010111001001100101110100101111101001000010011011001110010100010000010001001110000011010100111011100100100011101001000100010100111100110010011110101001100011001111101110010111101111011111101100000101011000010110...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 2ms
memory: 9204kb
input:
5917
output:
000000000000101100101010111101101110101110000100001111110010000000000110001110100001011111110110010001001101011110011001010000010111000000010100010000001001110100111000100010101001011010010101100000111010010101010000010011110010100111110101100001111111001001100101101101100011111010100001101110100010...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 2ms
memory: 7996kb
input:
6635
output:
000000000001001101111111101100000010010011100000101101101100001001100110101110010011000001110011010001111101010101101101000111001011011101101100111100011001101100010011110001010000010010101110110011111010110101011100010000010110001100011101111001010100011101010010001110100011000101111111111111000110...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 2ms
memory: 8036kb
input:
9993
output:
000000000000011111000011001110110011001011100111100101010101110100110101101100101100100100111110001001110100111111010011011101111001010010001011111100001001011001000010100011010100111111101010000111111110111101000000010000010001100000111101100011001101000011111011010011010101011000010101010001000101...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 2ms
memory: 9764kb
input:
14474
output:
000000000000101011110100110000000010001001110011110001101110001001010001011111111111011101010101100000000010110001110000100111001011100001001011011010010110000110100101110100011011110111001001110111010010110010100100100101100100010100001101010011111111101101000001011001001001101000110101110100100101...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 2ms
memory: 9164kb
input:
11534
output:
000000000000100101101000000100110100000011110100111011100101010010011110110100100000111011100010110011101111001111010101111100101000111000111110000110010110110110001011100011000000110011011101111001010000010010001110011111011001000000001111000000011111000000000100001010110110110110100111000001110001...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 0ms
memory: 9948kb
input:
19098
output:
000000000000001010110011010010010100011111011011100001110011111110101110001000110010110100101011101001000010001010111111010100111010110111101110100000011101100010110011110001100101100011001010010100010000000000110000011001001100010110100101100011010010001101110000000100000100100000000100001000011001...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 3ms
memory: 9972kb
input:
31872
output:
000000000000001011111011100010010011010010100010011000011110010000100101100101000100000101101101001101100001110100001010101101011101010111001000101100001101100111000101111010111001000010000001110001100001100110011001011011100111100100011110101001010010001101100000110111110001111111011010001110110101...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 4ms
memory: 10536kb
input:
27626
output:
000000000000011001110110000101011010010101100000000111110001110110110100010101100000101101011011010100011111011100011010110100101110001100110101101010011110000001011001100001010111111001001111001000100111110001101110100011110010111110011100100011010011111100100100101011101101011101011010101101110000...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 5ms
memory: 11160kb
input:
43245
output:
000000000000000111001011100111111000110000100011000000111101001010101111010111001110010000000100011111100001110000110011100110000111111101100100110101010001011001101001011001101111110011011111111101000000010110011001111100100011000110111101100010100110111010111111010110110100001111001010101110110100...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 2ms
memory: 11412kb
input:
34491
output:
000000000000000101011011111100000011101001011100101010000010001111101001100111010001000100011010011110111100111011110101001011111100010101010000011100100000111011001001100111100110111100101100001110000111000111000001110010011101110110011011110111101001000101101101010010101000011010010010100110111010...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 6ms
memory: 10636kb
input:
64535
output:
000000000000001111101101001110111111110010101100001100010000100101101010110100001001100010011111010001011011010101101010001101111110010010000001100101001011111001110100110110011111001000111101001110100111001010110001111010001011000011100000011011001000111011100011110101010110101001110101010010011000...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 7ms
memory: 13340kb
input:
65746
output:
000000000000000101110110011101001000111010100100100001111000001010000001100100000000001010010101010001011100010001111111110011100000010101011000110010110111100010101011110011110001111110010011010111010000101101111111111101100010000001000001111110111001001111011010110011001110001011111011000101101011...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 3ms
memory: 12872kb
input:
65861
output:
000000000000000010000111000011011000110110111001000011000110100101101100001111101111001110110000101000100101100111111111000110111100101001001011111011100110001111111001001100000101011101111001110001110100011000111001110000011001101100011010100101000100111001110010010001100111001000000101010110111111...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 3ms
memory: 13828kb
input:
66725
output:
000000000000000100000110010000111100010000011010101100011000110101110001011000111111111000001101101111101110110001111010110111011101110001001100000100110110000101011110101111101110011001001000110010011101101010001011010100000100100001011010100001001011010010011000000100101010110100001101000100000101...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 3ms
memory: 14248kb
input:
86349
output:
000000000000000101111010010010100111100100110010110010100101000001000101100001001100100111011010110011001111001111100010001011100011110111111111100101001101011110101101011110011110110111001001001101011000000100001001100011011001011110010110111010111110010100001101111011010111011001010011110110001001...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 0ms
memory: 12548kb
input:
68454
output:
000000000000000011111011000000010111101011111110101010101110000100111101001100110010110010000110100101011110010000010000110000101100101111100010000100000100011100111011111110000100110101010101101001111100001011111001101000011010011000111010111001101001010010101101101000001100011111001100011100101111...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 3ms
memory: 14252kb
input:
112260
output:
000000000000000111100101000010000111110011110000010011011010101100000000110101001111010001100010001001110010000001010101001010111001111011111100111001010000011101100000100011110011001110101010001000100110100001100100111101100101101100011000000010100000000001000011000001100001110100001111101111001111...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 6ms
memory: 14000kb
input:
108023
output:
000000000000000010111100001101100110111111000011001101001000000010100111110110010100111000110000110110000001000010011101010101100111111010000011111001010110111000001101110111011011010010111100111000100010001000101111100010011100011100011110011010010011011010001010101000101100000001111110110011100001...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 4ms
memory: 16436kb
input:
103787
output:
000000000000000101110110011100001100010011001011011100110001111100111000100110011010010010110011000101101101110010110101000001000001011001100101101111011111100011011000000111111001011100011110111011100101101001000110101001100111001111111001100111111110100111101111000110000101000110100001111000010011...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 11ms
memory: 16928kb
input:
128710
output:
000000000000000110000011101001111111001010101101011110110011010001101010111000000001011000111011101001011111000101111100101101101111111111100100011001010001100101000000100101111010111001111101001101000001011001111000100011001101101110000111110011111011000101011101000100011001010100011000000001011011...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 4ms
memory: 18232kb
input:
129534
output:
000000000000000101110110011100001100010011001011011100110001111100111000100110011010010010110011000101101101110010110101000001000001011001100101101111011111100011011000000111111001011100011110111011100101101001000110101001100111001111111001100111111110100111101111000110000101000110100001111000010011...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 2ms
memory: 16800kb
input:
128670
output:
000000000000000110111010110100101101111110010001100110100000100011010000110110110101010011110001111000001011011000000011100000000000110100001001000010001101001000111011100011100101010101111110101111001011001111110000000101100001001001101100001100101110011010000010110101110100100110110001110100001101...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 9ms
memory: 20452kb
input:
154721
output:
000000000000000010111111101111111100010110001110100010010011010100111110001111111010110100100011101110111101110101010110111111110111011001100110101111000111011100011001100100101011011110011101001001000011011000011110100110000110111110011101011100100000010010010011000001001100100001100010101100110110...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 8ms
memory: 19244kb
input:
143149
output:
000000000000000001011001101100111011101110001111100000001001101111010011101001101011111101100011001011011111010101110001010100110110000100111101011111101000110101010000010111100111011000101010111000001100100011111000001011111110100110011101010011110001001111011111111010111100001000100101101011010110...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 28ms
memory: 19228kb
input:
134065
output:
000000000000000001011001000100101110000010011010100010010101001011111101001001010110100001101010011111000011011101010001001001110101100001101100011101111110011111101100010110100110100110010111100001000110000100101111001010000001111101101100110010001001100010010110001101011010110000010011101101000100...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 8ms
memory: 20628kb
input:
163454
output:
000000000000000001011011101100110011101010111100000100001111101000001110101001100010111011100100110101111010010011011101101001100000011001000000011110101011100000111100111100100100100000011100011010100011000111100101000010111001110111000111100011010110110100110011011110010010010110110111110110110101...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 6ms
memory: 19656kb
input:
139150
output:
000000000000000001011111110100100001011011110111001110001011100001000011110110100001111111110110000000011011111011010011101001110010100111011001001010000111001110001000000011000000110101010010011110101001010001111011000000001001011011000010011100010101011111101001101101100001101011001000110001010101...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 0ms
memory: 21720kb
input:
172380
output:
000000000000000001011100111010110100010010000001110010111000110101111010100000111011111110001110100111100001110111111000101111001110000001011100001010000100101111100110000101001110111100101010010000001111010110011001101000001111011110000111011100101010001101001101000111111111000100001011000000010010...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 11ms
memory: 21880kb
input:
178166
output:
000000000000000011011110101011101011001111011011100100011011110010001010111010101011110110100100101101100011011101000001100100011011010001111010011000111000010110111001101010000111010111110101011111011011010000110110001011110111111011010111111100001110110000001111010001101001010101101011001100100111...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 4ms
memory: 19048kb
input:
143651
output:
000000000000000010111101000001100000100010010000100101011011011100111010010101101010001010000100011000100101000011101010111111111111001010111111111110101101101111111001100001110110010010111111110110110110100001100101100110100101011000101100101100100010100100100100011101001100111101000111100000000000...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 9ms
memory: 21704kb
input:
198199
output:
000000000000000010100000100100110010010010111100010110011101110100101101011001011110110000111001101111110100001111000000101001111000001000110110001000011111111001110111001001000001100000000011001110000111100110111101001111111110100010011001011111100100001111010111101010111111110111101011110111111110...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 9ms
memory: 21476kb
input:
186272
output:
000000000000000001001011010100111011001010010111001110110100101100110100010000001101000001010010101111101100000101111101010001001001111001101100010101111110011010010111100100011101101011101110001101011000000100111001100111011100110011010011111110001000011100110101111000010010000000110100010010111010...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 15ms
memory: 19476kb
input:
198102
output:
000000000000000001011001100011001100011000001101001001111011101000100000001011011001111000001000100100111010110001011101110101100010110110010000111110101011000101111010001101010101110101011111000010011000111001010100101110101000000110100100110010010010011100101101000011010100000100011011101010110001...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 2ms
memory: 8688kb
input:
8201
output:
000000000001101100000111011110010111111001101100010010101100111001010010111010000100000001110110011110011111000101011101011001111011000110111101001110001110001001100010011101101101100011001011000001000101100110010001001000101010010101000101111100101000110010001111100001110100000110000001011000100000...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 2ms
memory: 9364kb
input:
8202
output:
000000000000100111100001011000101001111111010011100101000001000000111100000111100101100110001000000101010001010111111010010011001000100110111101001100001101101000101001010011110001010100111101001000001110110010011000010111111100110100100101111011011000111001101111100100011111110111011111111111110101...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 0ms
memory: 8156kb
input:
8203
output:
000000000001011011110010011010111111111111101111000000011100000000011110100110100101100101110001010010010011010100110001101011000110100110011101010011010111011000010010001011010111111011000100001101001110011011100110101000100001000101001010100011101010101101001000101011101110111010001001010010011111...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 0ms
memory: 9072kb
input:
8204
output:
000000000000100111011000010101101001010110000000011111000111011011010001010110000110110101101101010001111101110001101011010010001000110011010110101001111000000101100110000101010011100100111100100010011111000110111010001111001011111001110010001101001111110010010010101110110101110101101010110111000010...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 0ms
memory: 7944kb
input:
8205
output:
000000000000111111001010011011010100011011000111011010011001000101000100111010001111111101110101101000000011010001010001101110001101101001111110001100110010000111110010111101100111100110111010011001101111110111111000111100011100011110110011011110001011000010100000111000100001000100110001010000111010...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 2ms
memory: 8468kb
input:
8206
output:
000000000000111010010110010000000101001010101110111101111000100101010110000110100110010100000010100001010000110110100011110111101000011101101000110110010000010001101001011111111011101000100011100011010101010011000010001110010000110011100010000000100101100110010000001000011011000011001010011100101000...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 2ms
memory: 8704kb
input:
16394
output:
000000000000011011010111101110100111010001101101001111101010101001100010111100100110001001001101010100000100010101001010001100010010101010010101010100010000001001101001111110100100111000010101011001111100001100000000001000111011010001001111010000101011000110110011000011010011110011110100010001000000...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 3ms
memory: 9448kb
input:
16395
output:
000000000000010111101110011010000001000011011110000000111110100001001000000100011100111101011110110100101111000111010111011001010110000101011110100100000011101110001001010101010101111111111101110010111111001001011110111110101010101001101111010111000010010001010000110101111111101010000001001010010011...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 0ms
memory: 9144kb
input:
16396
output:
000000000000010000101110010100001011000010101010110111101000100101101110010101101101101111110010100110001000000011111001000001110111011110111011011101101101011111111110110100110110011111100101101010000001100011000010000111010001010001011010001001101011011000001111100011001100011011111110010001110110...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 2ms
memory: 9528kb
input:
16397
output:
000000000000011111000100011100110011111101001001101101001100110100000100111011100001011010100010110111000000011010100011001011010100100110010111100001101000110110110110100101110110001100100101100111110011010001001000011110110111101111000010001110100101010011011010001011101010110111110101100010001111...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 0ms
memory: 9096kb
input:
16398
output:
000000000000001001011010100111011001010010111001110110100101100110100010000001101000001010010101111101100000101111101010001001001111001101100010101111110011010010111100100011101101011101110001101011000000100111001100111011100110011010011111110001000011100110101111000010010000000110100010010111010111...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 3ms
memory: 9644kb
input:
16399
output:
000000000000001100001001101011001001010110100111000000000100010001100111001110000111110000100110000001101111100000011010010001001000110010101101110110010110000111110011100110011100110100001000011000111111101011000010010111000111101111100001011110110101110100000001111000010000110110000100111100011101...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 4ms
memory: 9904kb
input:
32779
output:
000000000000011001110110000101011010010101100000000111110001110110110100010101100000101101011011010100011111011100011010110100101110001100110101101010011110000001011001100001010111111001001111001000100111110001101110100011110010111110011100100011010011111100100100101011101101011101011010101101110000...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 3ms
memory: 10808kb
input:
32780
output:
000000000000001000011010001100010001100001010010111100111100011100010100101010011111111010101100110000000111100010000101000100111000101010001011101101000111100111100110101100111100000100000000001001100000000001101001010100101011000001110001101001110000010110011011111100110001011000011011100011010000...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 5ms
memory: 10508kb
input:
32781
output:
000000000000010101000001010101111111011000110011001111000000110011011000111001100000100111100100010000101101011001010110001000111000111101101111001000011110110010000011000101111010111001001011001101010001100100110100000100100111000101001110110001110100100111111011101111101100010001011100011011101001...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 4ms
memory: 9844kb
input:
32782
output:
000000000000000111110100001011101111000001100000010111010111010100001010111011111010000100101111111011010011001001011010011110100111011001010101101110111011111111101111011000111000111100101011111010001111000111000100000010100100011011011011101011111100100110001101000001001111111110110100010101011010...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 3ms
memory: 10620kb
input:
32783
output:
000000000000000111101101111000111010001001011111100111011000010111111110010110011000110101111010111001001100101110100101111101001000010011011001110010100010000010001001110000011010100111011100100110001101000000100010100111100110010011110101001100011001111101110010111101111011110101100001011100000111...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 4ms
memory: 10484kb
input:
32784
output:
000000000000000100111100001011000101001111111010011100101000001000000111100000111100101100110001000000101010001010111111010011011001000100110111101001100001101101000101001010011111001010100111101001000001110110010011000011111111100110100100101111011011000111001101111100100011111110111011111111111110...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 5ms
memory: 11432kb
input:
65548
output:
000000000000000101110101101101000111101001011001010001011011001010001101110100010101011110000100001000001101101010000011101111110000101100010000010011100100001011011000011001001000011100101110100111011010010011000010100111101100111000011011101110110111000001100110111101111011000110101110101110001001...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 0ms
memory: 13500kb
input:
65549
output:
000000000000000110110101111011101001110100011011010011111010101010011000101111001001100010010011010101000001000101010010100011000100100010100101010101000100000010011010011111001001001110000101010110011111000011000000000010001110110100010011110100001010110001101100110000110100111100111101000000010000...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 4ms
memory: 12344kb
input:
65550
output:
000000000000000111110100001011101111000001100000010111010111010100001010111011111010000100101111111011010011001001011010011110100111011001010101101110111011111111101111011000111000111100101011111010001111000111000100000010100100011011011011101011111100100110001101000001001111111110110100101010101101...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 6ms
memory: 13192kb
input:
65551
output:
000000000000000011100000001011111111111100111101110010011101111111101000011000101100111110000100111000011011001010000110010010011100111010110011110010010000011001010100001001010110000111001001101011110011000110100101011010011101101110110101100010100110100011000000000111111001010000011110100111111001...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 7ms
memory: 13908kb
input:
65552
output:
000000000000000011100111101100001000110100001000100000000110111111000011011001001110111011010001010101011100111011110000001011011110011110101100001010010000100101010001100100010010011111010110011111010100011101000000001000001011111110000010000100000010000101011011000001000100010110101111110011011000...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 3ms
memory: 13544kb
input:
65553
output:
000000000000000010011001100000100101101011100001110010111101101000001111101011010011000110000000000111010100001001001010001100011110001011011001101111000101001110001110101100111000110101011110010011100101011101110111111100010101100001011000111001000001100110001000101110101111001111001000101110011101...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 3ms
memory: 17504kb
input:
131085
output:
000000000000000010000110100110101110110101001111010011001111001000100011001100001101101000010011011101010011000110111111100000100000111101100010011011110100101110101011001110011100110100101100100111110110001110101100001111111011100111001111111000101011101010100011100010111100001101111000100000001111...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 11ms
memory: 16116kb
input:
131086
output:
000000000000000010100110110010101110100001001111111101010000111101010101011110010110010111011101111001010000111011000000001110111111010101010101001111100000101010100100100000101100001100100010110010001110010110110100101101010000001010111111111000110000000111111001101001010101110001010110110110100111...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 0ms
memory: 17052kb
input:
131087
output:
000000000000000110011100110010111000010111110010011000111011011011111111110110011101100100001010101011111000100111111101010100100010111110001011110101111111001001100101100110011100111110011110101000100011000101110010011001000000000100101110011111000110001010111011110111001100011100000001110110110011...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 3ms
memory: 18308kb
input:
131088
output:
000000000000000010011010110011111101100110111101001001010010111110010001000000000001010010011001111011001000001111011001101010010001010110010011111010111110100100010111111101101011110000001101011000000001100110110111101101111101010111101011010010011010101001010111010000001001110011000101100100110100...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 12ms
memory: 18464kb
input:
131089
output:
000000000000000010100101101001100011001110100011011110011011101101101010000000111100000011011010111110011111001111010000111001011110110101100110111100111000100001101001010111111110010110000101010100010111011010001101110110010011101111110101110100110111101001110010110100010011111110111011101111101011...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 8ms
memory: 19140kb
input:
131090
output:
000000000000000011000100110010101010110010101001010111000110001011010100001100100000000000101001010000000000000111001011101001001110011110101101010000101000000011110110111010111111100001000011110100111100001010101011000101101100111000001110111101110101101110111000010000100111000101101101000100111111...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 2ms
memory: 9560kb
input:
8197
output:
000000000001000001111011001101010001101000100101010110100010110001011001010000100111010101101011110000011100110011001010001011110000110010101111000100001001001101110110010001101110001000101100110011100010100110000101010100000010111110100010111000011100101100101100111000011111101010000100010011100000...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 2ms
memory: 9124kb
input:
16328
output:
000000000000101101001101001010111100011110101101110111110110110000010000001111100100100100001100111001010110111001101001101010011110001100000101010000001001000111111100101111010000101001000101011001101111011100000011001010011110111111110011100010011111100011110001101111110010011100011000011101001011...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 5ms
memory: 10896kb
input:
32608
output:
000000000000001101001010101101111011010000010110110001001011000100001011000100011001111101111111100100110001011010111001011110001111011000000000010011111101001001011011111100010100011101010101001101110110110101110011100001101101000100100110100010010101001100000010110111110110111000100100101100001111...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 0ms
memory: 12924kb
input:
65141
output:
000000000000000110101100110011110010001110100100000100101110110000111111000100100110101101101100001001111001110001110100100110101000101001010000110011001010110001010101100011100001100001011010110010101110111100110000110101111101101101011111111101111000111000111011111011111110000110001110100001011111...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 10ms
memory: 17480kb
input:
130420
output:
000000000000000110000011101001111111001010101101011110110011010001101010111000000001011000111011101001011111000101111100101101101111111111100100011001010001100101000000100101111010111001111101001101000001011001111000100011001101101110000111110011111011000101011101000100011001010100011000000001011011...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 2ms
memory: 9220kb
input:
8265
output:
000000000000100011010100110010101000110110001100000011100001001110000111001100111011110110100001111110110111100100001010110110100100010010000100010010110101110111111001101000001100000100001110111100111111111100000111011100100111111001110100111111110101110011110111001010100000010100100010111011100110...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 0ms
memory: 10380kb
input:
16508
output:
000000000000010000011110110011010100011010001001010101101000101100010110010100001001110101011010011100000111001100110010100010111100001100101011110000000010010011011101100100011011100010001011001100111000101001100001010101000000101111101000101111010111001011001011001010011111011010100001001100111000...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 5ms
memory: 11660kb
input:
33008
output:
000000000000000100111111000111011100010110101010111010011111100001101011001011000101011101010000000111101101101100000010011101000100111111011100000001010011111100010101101011101101000000100110111010010100011001111111101001100010010000100111101111100011110001010011010000111100000101111011010110001100...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 6ms
memory: 13584kb
input:
65964
output:
000000000000000011100110111100000100100001100000011110101110000111100101000100011100100010000101001100010110001000010001101110011100100001101011011101010011000001111101010101011010100001001011010110100101010101110111011101110011110000010111100110100110111110011001101010011011110110111000010110111011...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 8ms
memory: 18752kb
input:
131692
output:
000000000000000010111100111001011001101011110101100010111100111000101110100000011110001100011110011011100110001010111011100110011011001110000111010001001011010000010111001111010111011100100011001110101001000011100110100110101000001000001110101101010110010001000101101111111000101000010111001111100011...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 0ms
memory: 8032kb
input:
15843
output:
000000000000110011000100101100100001110111100101110010111000011000110000000110010110011100101010010011001000000011000110101100001101100001111000100000101011000011100000110010011100001111001110100001110101101001000101001010010110010111111101101010100011101111110001110101110110111000111100111100000010...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 0ms
memory: 10508kb
input:
31560
output:
000000000000010010000110100011011111111101000111010010010111011001010010011010010110011000100001101101001111100010110001011011000111010000010111110101010000000100100111101010101100110011110100001110001110110110101101101100101110010110011011010001101001100111100111100001100011100010110100100010111001...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 0ms
memory: 11412kb
input:
64241
output:
000000000000001010000010010011001001001011110001011001110111010010110101100101111011000011100110111111010000111100000010100111100000100011011000100001111111100111011100100100000110000000001100111000011110011011110100111111111010001001100101111110010000111101011110101011111111011110101111011111111001...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 9ms
memory: 13408kb
input:
73307
output:
000000000000000010100110110010101110100001001111111101010000111101010101011110010110010111011101111001010000111011000000001110111111010101010101001111100000101010100100100000101100001100100010110010001110010110110100101101010000001010111111111000110000000111111001101001010101110001010110110110100111...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 4ms
memory: 17548kb
input:
129593
output:
000000000000000011100110111100100111000010101110001110010010000100100000111011111100011000000001110011101011111010000101001000100010011011110000111011100010110100011110111111110010001110010110010001111011110111100001011001110110001010111110011111100110000001010001111000100110001010100111111000000111...
result:
ok meet maximum 8395295323