QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#241624 | #5434. Binary Substrings | ZSH_ZSH | AC ✓ | 39ms | 104588kb | C++14 | 2.9kb | 2023-11-06 14:25:43 | 2023-11-06 14:25:44 |
Judging History
answer
#include<bits/stdc++.h>
#define rep(i,a,b) for (register int i=(a);i<=(b);i++)
#define drep(i,a,b) for (register int i=(a);i>=(b);i--)
typedef long long ll;
using namespace std;
const int N=4000010;
int n,ans[N],anslen,k;
vector<int> ham;
vector<array<int,2> > G[N];
void dfs(int u)
{
if (!G[u].size()) return;
auto t=G[u].back(); G[u].pop_back();
ham.push_back(2*u+t[1]);
dfs(t[0]);
}
void getham()
{
rep(i,0,(1<<(k-1))-1) rep(j,0,1)
{
G[i].push_back({(2*i+j)%(1<<(k-1)),j});
// printf("i %d -> %d %d\n",i,((2*i+j)%(1<<(k-1))),j);
}
dfs(0);
assert(ham.size()==(1<<k));
int p0=-1;
rep(i,0,(1<<k)-1) if (ham[i]==0) p0=i;
assert(p0>=0);
rotate(ham.begin(),ham.begin()+p0,ham.end());
// printf("ham : ");
// rep(i,0,(1<<k)-1) printf("%d ",ham[i]);
// printf("\n");
}
void solve()
{
while ((1<<k)+k-1<=n) k++;
k--;
// printf("n %d k %d len %d\n",n,k,(1<<k)+k-1);
getham();
if (n==(1<<k)+(k-1))
{
drep(i,k,1) ans[++anslen]=((ham[0]>>i)&1);
rep(i,1,(1<<k)-1) ans[++anslen]=(ham[i]&1);
return;
}
vector<int> seq(1<<k);
rep(i,0,(1<<k)-1) seq[i]=(2*ham[i]+(ham[(i+1)%(1<<k)]&1));
// rep(i,0,(1<<k)-1) printf("seq %d = %d\n",i,seq[i]);
vector<int> nxt(1<<(k+1),-1),vis(1<<(k+1));
rep(i,0,(1<<k)-1) nxt[seq[i]]=seq[(i+1)%(1<<k)];
rep(i,0,(1<<(k+1))-1) if (nxt[i]==-1) nxt[i]=nxt[i^(1<<k)]^1;
rep(i,0,(1<<k)-1) vis[seq[i]]=1;
int now=(1<<k);
rep(i,0,(1<<(k+1))-1) if (!vis[i])
{
int cnt=0,x=i;
while (!vis[x]) vis[x]=1,x=nxt[x],cnt++;
swap(nxt[i],nxt[i^(1<<k)]);
now+=cnt;
if (now+k>=n)
{
int st=nxt[i];
drep(j,k,1) ans[++anslen]=((st>>j)&1);
rep(j,1,n-k)
{
ans[++anslen]=(st&1);
st=nxt[st];
}
return;
}
}
}
namespace checker
{
struct info
{
int ch[2],len,fa;
}t[N];
int cnt=1,lst=1;
void insert(int c)
{
int node=++cnt,p=lst;
t[node].len=t[p].len+1; lst=node;
for (;p&&!t[p].ch[c];p=t[p].fa) t[p].ch[c]=node;
if (!p) t[node].fa=1;
else
{
int q=t[p].ch[c];
if (t[p].len+1==t[q].len) t[node].fa=q;
else
{
int clone=++cnt;
t[clone]=t[q];
t[clone].len=t[p].len+1;
t[q].fa=t[node].fa=clone;
for (;p&&t[p].ch[c]==q;p=t[p].fa) t[p].ch[c]=clone;
}
}
}
void solve()
{
ll v1=0;
rep(i,1,30) v1+=max(0,min((1<<i),n-i+1));
rep(i,31,n) v1+=n-i+1;
rep(i,1,n) insert(ans[i]);
ll v2=0;
rep(i,1,cnt) v2+=t[i].len-t[t[i].fa].len;
printf("v1 %lld v2 %lld\n",v1,v2);
assert(v1==v2);
printf("ok\n");
}
}
int main()
{
ios::sync_with_stdio(false); cin.tie(0);
cin>>n;
if (n==1)
{
printf("1\n");
return 0;
}
if (n==2)
{
printf("10\n");
return 0;
}
if (n==3)
{
printf("101\n");
return 0;
}
solve();
assert(anslen==n);
rep(i,1,anslen) printf("%d",ans[i]);
printf("\n");
#ifdef pbtxdy
checker::solve();
#endif
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 8ms
memory: 99744kb
input:
2
output:
10
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 8ms
memory: 99884kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 9ms
memory: 99696kb
input:
1
output:
1
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 7ms
memory: 99728kb
input:
3
output:
101
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 9ms
memory: 99872kb
input:
4
output:
0100
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 8ms
memory: 99912kb
input:
6
output:
001100
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 12ms
memory: 99912kb
input:
7
output:
0011000
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 24ms
memory: 99964kb
input:
8
output:
10001101
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 9ms
memory: 99908kb
input:
9
output:
100011010
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 15ms
memory: 99976kb
input:
10
output:
0001110100
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 8ms
memory: 99880kb
input:
11
output:
00011101000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 9ms
memory: 99912kb
input:
12
output:
000111010000
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 39ms
memory: 104556kb
input:
200000
output:
000000000111001101110011001110011011100101011100110111001000111001101110001101110011011100010011100110111000010111001101110000001110011011011100011100110110110110111001101101101001110011011011001011100110110110000111001101101011001110011011010101011100110110101000111001101101001101110011011010010011...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 8ms
memory: 97816kb
input:
24
output:
001010000011110110010011
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 9ms
memory: 99880kb
input:
35
output:
00101000001111011001001101011100010
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 15ms
memory: 99920kb
input:
30
output:
001010000011110110010011010111
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 15ms
memory: 99848kb
input:
45
output:
000101001000000111110111001101011000100111010
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 17ms
memory: 99920kb
input:
66
output:
110111001101010110001001110100011001011110000101001000000111110110
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 11ms
memory: 99884kb
input:
50
output:
00010100100000011111011100110101100010011101000110
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 12ms
memory: 97872kb
input:
80
output:
00001010100010010000000111111011110011101011100011011010011001011000010001110010
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 21ms
memory: 99936kb
input:
107
output:
00001010100010010000000111111011110011101011100011011010011001011000010001110010011110100001100010111110000
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 12ms
memory: 99920kb
input:
81
output:
000010101000100100000001111110111100111010111000110110100110010110000100011100100
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 11ms
memory: 99888kb
input:
147
output:
000001010100101000010010001000000001111111011111001111010111100011101101110100111001011100001101100110101011010001100100110001011000001000111100100
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 16ms
memory: 99888kb
input:
255
output:
001010000100100010000000011111110111110011110101111000111011011101001110010111000011011001101010110100011001001100010110000010001111001000011100010011111010000011000010111111000000101010010100110111101100011010010010110110101100101011101110011001110101000
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 10ms
memory: 99944kb
input:
173
output:
00000101010010100001001000100000000111111101111100111101011110001110110111010011100101110000110110011010101101000110010011000101100000100011110010000111000100111110100000110
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 22ms
memory: 99868kb
input:
288
output:
000000101010100010100100101000001001000010001000000000111111110111111001111101011111000111101101111010011110010111100001110111011001110101011101000111001101110010011100010111000001101101011011000110101001101001011010000110011001010110010001100010011000010110000001000011110001000111110010
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 14ms
memory: 99872kb
input:
407
output:
000101001001010000010010000100010000000001111111101111110011111010111110001111011011110100111100101111000011101110110011101010111010001110011011100100111000101110000011011010110110001101010011010010110100001100110010101100100011000100110000101100000010000111100010001111100100000111000010011111101000...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 12ms
memory: 99880kb
input:
349
output:
000101001001010000010010000100010000000001111111101111110011111010111110001111011011110100111100101111000011101110110011101010111010001110011011100100111000101110000011011010110110001101010011010010110100001100110010101100100011000100110000101100000010000111100010001111100100000111000010011111101000...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 11ms
memory: 99892kb
input:
526
output:
000000010101010010101000010100100010100010010100000010010010000010001000010000000000111111111011111110011111101011111100011111011011111010011111001011111000011110111011110110011110101011110100011110011011110010011110001011110000011101110011101101011101100011101011011101010011101001011101000011100110...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 14ms
memory: 99908kb
input:
1018
output:
010100101010000101000011011111101100000110100001001011110111100011000111101001000010110111101011000010101111101110000110010001001101110110110011001011100110100111001111001010001110110010011001101101010110010101011101011100011100100100111011111001100001110100010001011101110100110001001000110110001011...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 9ms
memory: 99900kb
input:
1017
output:
010100101010000101000011011111101100000110100001001011110111100011000111101001000010110111101011000010101111101110000110010001001101110110110011001011100110100111001111001010001110110010011001101101010110010101011101011100011100100100111011111001100001110100010001011101110100110001001000110110001011...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 15ms
memory: 97840kb
input:
1209
output:
000001010010100100001010001000101000010010100000001001001000100100000010001000001000010000000000011111111110111111110011111110101111111000111111011011111101001111110010111111000011111011101111101100111110101011111010001111100110111110010011111000101111100000111101111011100111101101011110110001111010...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 4ms
memory: 99924kb
input:
1632
output:
000001010010100100001010001000101000010010100000001001001000100100000010001000001000010000000000011111111110111111110011111110101111111000111111011011111101001111110010111111000011111011101111101100111110101011111010001111100110111110010011111000101111100000111101111011100111101101011110110001111010...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 15ms
memory: 99892kb
input:
1829
output:
000010101100001000110000010011000000101100000000100000111110000100001111110001000000111100000100011111110010000000111000000100111111110100000000110000000101111111110000000001010101010001010100100101010000010100000110111111101100000011010000010010111110111100001100010001001110111001001100011011010010...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 18ms
memory: 97908kb
input:
3187
output:
000000101001010001010010010010100100000101000100001010000100010100000100101000000001001001000010010001000100100000001000100000010000100000100000000000011111111111011111111100111111110101111111100011111110110111111101001111111001011111110000111111011101111110110011111101010111111010001111110011011111...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 10ms
memory: 99948kb
input:
2138
output:
000000000101010101001010101000010101001000101010001001010100000010100101000101001001001010010000010100010000101000010001010000010010100000000100100100001001000100010010000000100010000001000010000010000000000001111111111101111111110011111111010111111110001111111011011111110100111111100101111111000011...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 20ms
memory: 100000kb
input:
4030
output:
000110100101001101001001011010010000110100011001101000101011010001000110100001001101000001011010000000110011001001100110001011001100000110010110001100101010011001010010110010100001100100101011001001000110010001001100100001011001000000110001100001100010101011000101000110001001001100010001011000100000...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 12ms
memory: 100032kb
input:
6101
output:
000000010100101000010100100100010100100010010100100000010100010100010010010100010000010100001000010100000100010100000010010100000000010010010010000010010001000010010000100010010000000010001000100000001000010000001000001000000000000011111111111101111111111001111111110101111111110001111111101101111111...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 9ms
memory: 100052kb
input:
5917
output:
000000010100101000010100100100010100100010010100100000010100010100010010010100010000010100001000010100000100010100000010010100000000010010010010000010010001000010010000100010010000000010001000100000001000010000001000001000000000000011111111111101111111111001111111110101111111110001111111101101111111...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 11ms
memory: 100036kb
input:
6635
output:
000000010100101000010100100100010100100010010100100000010100010100010010010100010000010100001000010100000100010100000010010100000000010010010010000010010001000010010000100010010000000010001000100000001000010000001000001000000000000011111111111101111111111001111111110101111111110001111111101101111111...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 17ms
memory: 100172kb
input:
9993
output:
000000001010010100100101001010000010100100100001010010001000101001000010010100100000001010001010000101000100100010100010001001010001000000101000010010010100001000001010000010000101000000100010100000001001010000000000100100100100010010010000001001000100000100100001000010010000010001001000000000100010...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 11ms
memory: 100112kb
input:
14474
output:
000000110101011010011010101100101101010110000110101010110011010101010101101010101000110101010010011010101000101101010100000110101001100011010100101001101010010010110101001000011010100011001101010001010110101000100011010100001001101010000010110101000000011010011010001101001100100110100110001011010011...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 15ms
memory: 100124kb
input:
11534
output:
000000001010010100100101001010000010100100100001010010001000101001000010010100100000001010001010000101000100100010100010001001010001000000101000010010010100001000001010000010000101000000100010100000001001010000000000100100100100010010010000001001000100000100100001000010010000010001001000000000100010...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 3ms
memory: 100356kb
input:
19098
output:
000000000101001010010001010010100010010100101000000101001001010001010010010010010100100100000101001000100001010010000100010100100000100101001000000001010001010000010100010010000101000100010001010001000010010100010000000101000010100001001000101000010001001010000100000010100000100100101000001000001010...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 7ms
memory: 100356kb
input:
31872
output:
000000111000101101101110001011010011100010110010111000101100001110001010110011100010101010111000101010001110001010011011100010100100111000101000101110001010000011100010011010111000100110001110001001011011100010010100111000100100101110001001000011100010001100111000100010101110001000100011100010000110...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 12ms
memory: 100328kb
input:
27626
output:
000000011010101101010110100011010101100100110101011000101101010110000011010101011000110101010101001101010101001011010101010000110101010011001101010100101011010101001000110101010001001101010100001011010101000000110101001101001101010011001011010100110000110101001011001101010010101011010100101000110101...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 16ms
memory: 100684kb
input:
43245
output:
000000000010100101001010010000101001010001000101001010000100101001010000000101001001010000101001001001000101001001000100101001001000000101001000101000101001000100100101001000100000101001000010000101001000001000101001000000100101001000000000101000101000100101000101000000101000100100100101000100100000...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 15ms
memory: 100672kb
input:
34491
output:
000000000010100101001010010000101001010001000101001010000100101001010000000101001001010000101001001001000101001001000100101001001000000101001000101000101001000100100101001000100000101001000010000101001000001000101001000000100101001000000000101000101000100101000101000000101000100100100101000100100000...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 20ms
memory: 100656kb
input:
64535
output:
000011110110110111011110110110110011110110110101011110110110100011110110110011011110110110010011110110110001011110110110000011110110101110011110110101101011110110101100011110110101011011110110101010011110110101001011110110101000011110110100111011110110100110011110110100101011110110100100011110110100...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 24ms
memory: 102092kb
input:
65746
output:
000000000000001010101010101010001010101010100100101010101010000010101010100101001010101010010000101010101000100010101010100001001010101010000000101010100101010010101010010100001010101001001000101010100100010010101010010000001010101000101000101010100010010010101010001000001010101000010100101010100001...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 11ms
memory: 102100kb
input:
65861
output:
000000000000001010101010101010001010101010100100101010101010000010101010100101001010101010010000101010101000100010101010100001001010101010000000101010100101010010101010010100001010101001001000101010100100010010101010010000001010101000101000101010100010010010101010001000001010101000010100101010100001...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 16ms
memory: 100056kb
input:
66725
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 12ms
memory: 102096kb
input:
86349
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 21ms
memory: 102016kb
input:
68454
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 22ms
memory: 102056kb
input:
112260
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 21ms
memory: 102116kb
input:
108023
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 21ms
memory: 102104kb
input:
103787
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 15ms
memory: 102044kb
input:
128710
output:
000001111110111011110111111011101110011111101110110101111110111011000111111011101011011111101110101001111110111010010111111011101000011111101110011101111110111001100111111011100101011111101110010001111110111000110111111011100010011111101110000101111110111000000111111011000000100000110011111101111101...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 27ms
memory: 102020kb
input:
129534
output:
000100010110010100010000011001010000110001100101000010100110010100001001011001010000100001100101000001010110010100000100011001010000001001100101000000010110010100000000011001001100100101100100110010000110010011000101011001001100010001100100110000100110010011000001011001001100000001100100101100010110...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 22ms
memory: 102048kb
input:
128670
output:
000001111110111011110111111011101110011111101110110101111110111011000111111011101011011111101110101001111110111010010111111011101000011111101110011101111110111001100111111011100101011111101110010001111110111000110111111011100010011111101110000101111110111000000111111011000000100000110011111101111101...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 23ms
memory: 104532kb
input:
154721
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 23ms
memory: 104588kb
input:
143149
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 35ms
memory: 104480kb
input:
134065
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 29ms
memory: 104532kb
input:
163454
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 23ms
memory: 104524kb
input:
139150
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 24ms
memory: 104548kb
input:
172380
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 28ms
memory: 104564kb
input:
178166
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 25ms
memory: 104564kb
input:
143651
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 27ms
memory: 104500kb
input:
198199
output:
000000000111001101110011001110011011100101011100110111001000111001101110001101110011011100010011100110111000010111001101110000001110011011011100011100110110110110111001101101101001110011011011001011100110110110000111001101101011001110011011010101011100110110101000111001101101001101110011011010010011...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 31ms
memory: 104508kb
input:
186272
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 28ms
memory: 104564kb
input:
198102
output:
000000000111001101110011001110011011100101011100110111001000111001101110001101110011011100010011100110111000010111001101110000001110011011011100011100110110110110111001101101101001110011011011001011100110110110000111001101101011001110011011010101011100110110101000111001101101001101110011011010010011...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 20ms
memory: 100024kb
input:
8201
output:
101010101011101010100011101010011011101010010011101010001011101010000011101001110011101001101011101001100011101001011011101001010011101001001011101001000011101000110011101000101011101000100011101000011011101000010011101000001011101000000011100111001011100111000011100110000100111001111011001010001100...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 12ms
memory: 100040kb
input:
8202
output:
101010101011101010100011101010011011101010010011101010001011101010000011101001110011101001101011101001100011101001011011101001010011101001001011101001000011101000110011101000101011101000100011101000011011101000010011101000001011101000000011100111001011100111000011100110000100111001111011001010001100...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 9ms
memory: 100084kb
input:
8203
output:
101010101011101010100011101010011011101010010011101010001011101010000011101001110011101001101011101001100011101001011011101001010011101001001011101001000011101000110011101000101011101000100011101000011011101000010011101000001011101000000011100111001011100111000011100110000100111001111011001010001100...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 9ms
memory: 97988kb
input:
8204
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 12ms
memory: 100136kb
input:
8205
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 8ms
memory: 100140kb
input:
8206
output:
000000000000011111111111110111111111110011111111110101111111111000111111111011011111111101001111111110010111111111000011111111011101111111101100111111110101011111111010001111111100110111111110010011111111000101111111100000111111101111011111110111001111111011010111111101100011111110101101111111010100...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 21ms
memory: 100136kb
input:
16394
output:
010101010010101101010110101001010100101010110101101010100101001010101010000101010100100010101010001001010101000000101010010100010101001001001010100100000101010001010010101000100001010100001000101010000010010101000000001010000000011011111111110110000000001101000000001001011111111011110000000110001000...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 11ms
memory: 100168kb
input:
16395
output:
101010101010110101010100011010101001001101010100010110101010000011010100110001101010010100110101001001011010100100001101010001100110101000101011010100010001101010000100110101000001011010100000001101001101000110111001011100100011010001101001100100110100110001011010011000001101001011000110100101010011...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 8ms
memory: 100124kb
input:
16396
output:
101010101010110101010100011010101001001101010100010110101010000011010100110001101010010100110101001001011010100100001101010001100110101000101011010100010001101010000100110101000001011010100000001101001101000110111001011100100011010001101001100100110100110001011010011000001101001011000110100101010011...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 11ms
memory: 98264kb
input:
16397
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 15ms
memory: 100352kb
input:
16398
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 12ms
memory: 100284kb
input:
16399
output:
000000000000001111111111111101111111111110011111111111010111111111110001111111111011011111111110100111111111100101111111111000011111111101110111111111011001111111110101011111111101000111111111001101111111110010011111111100010111111111000001111111101111011111111011100111111110110101111111101100011111...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 13ms
memory: 100416kb
input:
32779
output:
110110110110111101101101001111011011001011110110110000111101101011101111011010110011110110101010111101101010001111011010011011110110100100111101101000101111011010000011110110011100111101100110101111011001100011110110010110111101100101001111011001001011110110010000111101100011101111011000110011110110...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 14ms
memory: 100320kb
input:
32780
output:
110110110110111101101101001111011011001011110110110000111101101011101111011010110011110110101010111101101010001111011010011011110110100100111101101000101111011010000011110110011100111101100110101111011001100011110110010110111101100101001111011001001011110110010000111101100011101111011000110011110110...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 19ms
memory: 98240kb
input:
32781
output:
110110110110111101101101001111011011001011110110110000111101101011101111011010110011110110101010111101101010001111011010011011110110100100111101101000101111011010000011110110011100111101100110101111011001100011110110010110111101100101001111011001001011110110010000111101100011101111011000110011110110...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 21ms
memory: 100512kb
input:
32782
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 18ms
memory: 100692kb
input:
32783
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 11ms
memory: 100724kb
input:
32784
output:
000000000000000111111111111111011111111111110011111111111101011111111111100011111111111011011111111111010011111111111001011111111111000011111111110111011111111110110011111111110101011111111110100011111111110011011111111110010011111111110001011111111110000011111111101111011111111101110011111111101101...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 12ms
memory: 100740kb
input:
65548
output:
010101010100101011010101011010100101010100101010110101011010101001010100101010101101011010101010010100101010101010000101010101001000101010101000100101010101000000101010100101000101010100100100101010111011011010111000100100111000111011011001001001100100110110110011001011001011100110100110100111001011...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 12ms
memory: 98640kb
input:
65549
output:
101010101010101101010101010001101010101001001101010101000101101010101000001101010100110001101010100101001101010100100101101010100100001101010100011001101010100010101101010100010001101010100001001101010100000101101010100000001101010011010001101011100101110010100011010001101010011001001101010011000101...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 16ms
memory: 100660kb
input:
65550
output:
101010101010101101010101010001101010101001001101010101000101101010101000001101010100110001101010100101001101010100100101101010100100001101010100011001101010100010101101010100010001101010100001001101010100000101101010100000001101010011010001101011100101110010100011010001101010011001001101010011000101...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 17ms
memory: 100984kb
input:
65551
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 17ms
memory: 102020kb
input:
65552
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 15ms
memory: 102068kb
input:
65553
output:
000000000000000011111111111111110111111111111110011111111111110101111111111111000111111111111011011111111111101001111111111110010111111111111000011111111111011101111111111101100111111111110101011111111111010001111111111100110111111111110010011111111111000101111111111100000111111111101111011111111110...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 21ms
memory: 102116kb
input:
131085
output:
101010101010101110101010101000111010101010011011101010101001001110101010100010111010101010000011101010100111001110101010011010111010101001100011101010100101101110101010010100111010101001001011101010100100001110101010001100111010101000101011101010100010001110101010000110111010101000010011101010100000...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 27ms
memory: 102040kb
input:
131086
output:
101010101010101110101010101000111010101010011011101010101001001110101010100010111010101010000011101010100111001110101010011010111010101001100011101010100101101110101010010100111010101001001011101010100100001110101010001100111010101000101011101010100010001110101010000110111010101000010011101010100000...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 28ms
memory: 101996kb
input:
131087
output:
101010101010101110101010101000111010101010011011101010101001001110101010100010111010101010000011101010100111001110101010011010111010101001100011101010100101101110101010010100111010101001001011101010100100001110101010001100111010101000101011101010100010001110101010000110111010101000010011101010100000...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 36ms
memory: 102128kb
input:
131088
output:
000000000000000001111111111111111101111111111111110011111111111111010111111111111110001111111111111011011111111111110100111111111111100101111111111111000011111111111101110111111111111011001111111111110101011111111111101000111111111111001101111111111110010011111111111100010111111111111000001111111111...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 30ms
memory: 104472kb
input:
131089
output:
000000000000000001111111111111111101111111111111110011111111111111010111111111111110001111111111111011011111111111110100111111111111100101111111111111000011111111111101110111111111111011001111111111110101011111111111101000111111111111001101111111111110010011111111111100010111111111111000001111111111...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 23ms
memory: 104508kb
input:
131090
output:
000000000000000001111111111111111101111111111111110011111111111111010111111111111110001111111111111011011111111111110100111111111111100101111111111111000011111111111101110111111111111011001111111111110101011111111111101000111111111111001101111111111110010011111111111100010111111111111000001111111111...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 22ms
memory: 100088kb
input:
8197
output:
101010101011101010100011101010011011101010010011101010001011101010000011101001110011101001101011101001100011101001011011101001010011101001001011101001000011101000110011101000101011101000100011101000011011101000010011101000001011101000000011100111001011100111000011100110000100111001111011001010001100...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 8ms
memory: 100132kb
input:
16328
output:
010100101010101000010101010010001010101000100101010100000010101001010001010100100100101010010000010101000101001010100010000101010000100010101000001001010100000000101000000001101111111111011000000000110100000000100101111111101111000000011000100000010011101111110110011000001100110000001011100111111010...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 11ms
memory: 98328kb
input:
32608
output:
001011011001010000110110010011001101100100101011011001001000110110010001001101100100001011011001000000110110001101001101100011001011011000110000110110001011001101100010101011011000101000110110001001001101100010001011011000100000110110000110101101100001100011011000010100110110000100101101100001000011...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 30ms
memory: 100668kb
input:
65141
output:
001011011100101001010011100101001001011100101001000011100101000110011100101000101011100101000100011100101000011011100101000010011100101000001011100101000000011100100111000011100100110110011100100110101011100100110100011100100110011011100100110010011100100110001011100100110000011100100101101011100100...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 23ms
memory: 102088kb
input:
130420
output:
001011010010010100001101001001001100110100100100101011010010010010001101001001000100110100100100001011010010010000001101001000110010110100100011000011010010001011001101001000101010110100100010100011010010001001001101001000100010110100100010000011010010000110001101001000010100110100100001001011010010...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 8ms
memory: 100168kb
input:
8265
output:
000000000001010101010100101010101000010101010010001010101000100101010100000010101001010001010100100100101010010000010101000101001010100010000101010000100010101000001001010100000000101001010010010100101000001010010010000101001000100010100100001001010010000000101000101000010100010010001010001000100101...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 13ms
memory: 100360kb
input:
16508
output:
000000000000101010101010100010101010100100101010101000001010101001010010101010010000101010100010001010101000010010101010000000101010010101001010000101010010010001010100100010010101001000000101010001010001010100010010010101000100000101010000101001010100001000010101000001000101010000001001010100000000...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 19ms
memory: 98584kb
input:
33008
output:
000000000000010101010101010010101010101000010101010100100010101010100010010101010100000010101010010100010101010010010010101010010000010101010001010010101010001000010101010000100010101010000010010101010000000010101001010100010101001010010010101001010000010101001001010010101001001000010101001000100010...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 20ms
memory: 99988kb
input:
65964
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 26ms
memory: 104512kb
input:
131692
output:
000000000000101001010010100001010010100100100010100101001000100101001010010000001010010100010100010100101000100100101001010001000001010010100001000010100101000001000101001010000001001010010100000000010100100101001000101001001010001001010010010100000010100100100101000101001001001001001010010010010000...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 4ms
memory: 98124kb
input:
15843
output:
000010011000100000101100010000000110000110000011000010101001100001010010110000101000011000010010101100001001000110000100010011000010000101100001000000110000010101011000001010001100000100100110000010001011000001000001100000010100110000001001011000000100001100000001010110000000100011000000001001100000...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 15ms
memory: 100356kb
input:
31560
output:
000000111000101101101110001011010011100010110010111000101100001110001010110011100010101010111000101010001110001010011011100010100100111000101000101110001010000011100010011010111000100110001110001001011011100010010100111000100100101110001001000011100010001100111000100010101110001000100011100010000110...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 16ms
memory: 100648kb
input:
64241
output:
000001001001101000001000101101000001000001101000000110001101000000101001101000000100101101000000100001101000000011001101000000010101101000000010001101000000001001101000000000101101000000000001100110011001001100110011000101100110011000001100110010110001100110010101001100110010100101100110010100001100...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 16ms
memory: 102116kb
input:
73307
output:
000000000001010010100101000101001010010010010100101001000001010010100010000101001010000100010100101000001001010010100000000101001001010010010100000101001001001000010100100100010001010010010000100101001001000000010100100010100001010010001001000101001000100010010100100010000001010010000101000101001000...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 21ms
memory: 101996kb
input:
129593
output:
000100010110010100010000011001010000110001100101000010100110010100001001011001010000100001100101000001010110010100000100011001010000001001100101000000010110010100000000011001001100100101100100110010000110010011000101011001001100010001100100110000100110010011000001011001001100000001100100101100010110...
result:
ok meet maximum 8395295323