QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#430222#5434. Binary SubstringsCryingAC ✓27ms55488kbC++143.4kb2024-06-03 16:08:112024-06-03 16:08:13

Judging History

你现在查看的是最新测评结果

  • [2024-06-03 16:08:13]
  • 评测
  • 测评结果:AC
  • 用时:27ms
  • 内存:55488kb
  • [2024-06-03 16:08:11]
  • 提交

answer

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define op(x) ((x&1)?x+1:x-1)
#define odd(x) (x&1)
#define even(x) (!odd(x))
#define lc(x) (x<<1)
#define rc(x) (lc(x)|1)
#define lowbit(x) (x&-x)
#define mp(x,y) make_pair(x,y)
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
using namespace std;
const int MAXN = (1<<20)+10;
typedef array<int,2> pr;

int n,k,U;

vector<int> e[MAXN];
int st[MAXN],cur[MAXN],top;

int ans[MAXN],tot;

void dfs(int u){
    for(int& j=cur[u];j<e[u].size();){
        int v = e[u][j]; j++;
        dfs(v);
    }
    st[++top] = u;
}

namespace T{
    int cyc[MAXN],len,vis[MAXN];

    int to[MAXN];

    void solve(){
        //先变成2^k意义下的欧拉路
        U<<=1;
        for(int i=1;i<top;i++){
            cyc[++len] = (st[i]<<1) | (st[i+1]&1);
            cyc[len] %= U;
        }
        U<<=1;
        //for(int i=1;i<=len;i++)cout<<cyc[i]<<" "; cout<<endl;
        //再变成2^(k+1)意义下的
        for(int i=len-1;i;i--){
            cyc[i+1] = (cyc[i]<<1) | (cyc[i+1]&1);
            cyc[i+1]%=U;
        }
        cyc[1] = (cyc[len]<<1) | (cyc[1]&1); cyc[1]%=U;
        //for(int i=1;i<=len;i++)cout<<cyc[i]<<" "; exit(0);

        for(int i=1;i<=len;i++)vis[cyc[i]] = 1;
        for(int i=0;i<U;i++)to[i] = -1;
        for(int i=1;i<len;i++)to[cyc[i]] = cyc[i+1]; to[cyc[len]] = cyc[1];
        for(int i=0;i<U;i++)if(to[i]==-1){
            int j = (i+(U/2))%U; 
            //printf("i:%d j:%d\n",i,j);
            assert(to[j] != -1);
            //printf("i:%d j:%d(%d)\n",i,j,to[j]);
            to[i] = (i<<1) | !(to[j]&1); to[i] %= U;
            //printf("get %d\n",to[i]);
        }
        //for(int i=0;i<U;i++)cout<<to[i]<<" "; exit(0);
        //for(int j=1;j<=len;j++)cout<<cyc[j]<<" "; cout<<endl;
        for(int i=0;i<U;i++)if(!vis[i]){ //找到一个新环
            int u = i,cnt = 0;
            while(!vis[u])vis[u] = 1,u = to[u],cnt++;
            int uu = (u+(U/2))%U; swap(to[u],to[uu]);
            //printf("with u:%d uu:%d\n",u,uu);
            //printf("%d : %d %d\n",i,cnt,to[i]);
            len += cnt;
            if(len < n-k)continue;
            len = tot = 0;
            for(int j=1;j<=n-k;j++)cyc[++len] = u,u = to[u];

            //cout<<"done path : ";
            //for(int j=1;j<=len;j++)cout<<cyc[j]<<" "; cout<<endl;
            
            for(int j=k;j>=0;j--)ans[++tot] = cyc[1]>>j&1;
            for(int j=1;j<len;j++)ans[++tot] = cyc[j+1]&1;
            for(int i=1;i<=n;i++)cout<<ans[i];
            exit(0);
        }
        assert(0);
    }
}

int main(){
    //freopen("string.in","r",stdin);
    //freopen("string.out","w",stdout);

    cin>>n;
    if(n==1)return (cout<<"0\n"),0;
    if(n==2)return (cout<<"01\n"),0;
    if(n==3)return (cout<<"010\n"),0;
    if(n==4)return (cout<<"0110\n"),0;
    k = 1; while((1<<k)+k-1 <= n)k++; k--;

    U = 1<<(k-1);
    for(int i=0;i<U;i++){
        e[i].push_back((i<<1)%U);
        e[i].push_back(((i<<1)|1)%U);
    }

    dfs(0); reverse(st+1,st+1+top);

    tot = k-1;
    for(int i=1;i<top;i++){
        if(((st[i]<<1)%U) == st[i+1])ans[++tot] = 0;
        else ans[++tot] = 1;
    }
    if((1<<k)+k-1 < n)T::solve();

    for(int i=1;i<=tot;i++)cout<<ans[i];

    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 29924kb

input:

2

output:

01

result:

ok meet maximum 3

Test #2:

score: 0
Accepted
time: 3ms
memory: 33072kb

input:

5

output:

00110

result:

ok meet maximum 12

Test #3:

score: 0
Accepted
time: 3ms
memory: 29932kb

input:

1

output:

0

result:

ok meet maximum 1

Test #4:

score: 0
Accepted
time: 0ms
memory: 28892kb

input:

3

output:

010

result:

ok meet maximum 5

Test #5:

score: 0
Accepted
time: 3ms
memory: 28860kb

input:

4

output:

0110

result:

ok meet maximum 8

Test #6:

score: 0
Accepted
time: 4ms
memory: 36188kb

input:

6

output:

000110

result:

ok meet maximum 16

Test #7:

score: 0
Accepted
time: 0ms
memory: 34360kb

input:

7

output:

0001100

result:

ok meet maximum 21

Test #8:

score: 0
Accepted
time: 8ms
memory: 36096kb

input:

8

output:

01000110

result:

ok meet maximum 27

Test #9:

score: 0
Accepted
time: 2ms
memory: 34660kb

input:

9

output:

010001101

result:

ok meet maximum 34

Test #10:

score: 0
Accepted
time: 5ms
memory: 33556kb

input:

10

output:

0001011100

result:

ok meet maximum 42

Test #11:

score: 0
Accepted
time: 0ms
memory: 34928kb

input:

11

output:

00001011100

result:

ok meet maximum 50

Test #12:

score: 0
Accepted
time: 0ms
memory: 35368kb

input:

12

output:

000010111000

result:

ok meet maximum 59

Test #13:

score: 0
Accepted
time: 18ms
memory: 44736kb

input:

200000

output:

000000000001100101000000000011001110000000000110100100000000001101011000000000011011010000000000110111100000000001110001000000000011100110000000000111010100000000001110111000000000011110010000000000111101100000000001111101000000000011111110000000001000000100000000010000011000000000100001010000000001...

result:

ok meet maximum 19996962278

Test #14:

score: 0
Accepted
time: 3ms
memory: 34656kb

input:

24

output:

000110101111000001001110

result:

ok meet maximum 240

Test #15:

score: 0
Accepted
time: 0ms
memory: 34308kb

input:

35

output:

00011010111100000100111011001010001

result:

ok meet maximum 526

Test #16:

score: 0
Accepted
time: 3ms
memory: 35560kb

input:

30

output:

000110101111000001001110110010

result:

ok meet maximum 381

Test #17:

score: 0
Accepted
time: 0ms
memory: 36312kb

input:

45

output:

000011001010011101011011111000000100011110110

result:

ok meet maximum 882

Test #18:

score: 0
Accepted
time: 5ms
memory: 36328kb

input:

66

output:

001001110101101111100000010001111011000101110011010000110010100100

result:

ok meet maximum 1953

Test #19:

score: 0
Accepted
time: 3ms
memory: 35612kb

input:

50

output:

00001100101001110101101111100000010001111011000101

result:

ok meet maximum 1097

Test #20:

score: 0
Accepted
time: 4ms
memory: 35656kb

input:

80

output:

00000110001010001110010010110011010011110101011101101111110000000100001111101110

result:

ok meet maximum 2901

Test #21:

score: 0
Accepted
time: 3ms
memory: 35224kb

input:

107

output:

00000110001010001110010010110011010011110101011101101111110000000100001111101110001101100001011110011101000

result:

ok meet maximum 5277

Test #22:

score: 0
Accepted
time: 4ms
memory: 34724kb

input:

81

output:

000001100010100011100100101100110100111101010111011011111100000001000011111011100

result:

ok meet maximum 2976

Test #23:

score: 0
Accepted
time: 3ms
memory: 36376kb

input:

147

output:

000000110000101000011100010010001011000110100011110010011001010100101110011011001110100111110101011010111101101110111111100000000100000111111011100

result:

ok meet maximum 10124

Test #24:

score: 0
Accepted
time: 0ms
memory: 35556kb

input:

255

output:

000010010001011000110100011110010011001010100101110011011001110100111110101011010111101101110111111100000000100000111111011100001101111000111011000001011111001111010000001100001010000111000100111001011011010010010100110101000100011001100010101110101100100

result:

ok meet maximum 31130

Test #25:

score: 0
Accepted
time: 3ms
memory: 35080kb

input:

173

output:

00000011000010100001110001001000101100011010001111001001100101010010111001101100111010011111010101101011110110111011111110000000010000011111101110000110111100011101100000101

result:

ok meet maximum 14115

Test #26:

score: 0
Accepted
time: 0ms
memory: 35600kb

input:

288

output:

000000011000001010000011100001001000010110000110100001111000100010011000101010001011100011001000110110001110100011111001001010010011100101011001011010010111100110011010100110111001110110011110100111111010101011101011011010111110110111101110111111110000000001000000111111101111000011101110

result:

ok meet maximum 39850

Test #27:

score: 0
Accepted
time: 3ms
memory: 35836kb

input:

407

output:

000001001000010110000110100001111000100010011000101010001011100011001000110110001110100011111001001010010011100101011001011010010111100110011010100110111001110110011110100111111010101011101011011010111110110111101110111111110000000001000000111111101111000011101110000011011111000111101100000010111111...

result:

ok meet maximum 80310

Test #28:

score: 0
Accepted
time: 0ms
memory: 36080kb

input:

349

output:

000001001000010110000110100001111000100010011000101010001011100011001000110110001110100011111001001010010011100101011001011010010111100110011010100110111001110110011110100111111010101011101011011010111110110111101110111111110000000001000000111111101111000011101110000011011111000111101100000010111111...

result:

ok meet maximum 58821

Test #29:

score: 0
Accepted
time: 4ms
memory: 35380kb

input:

526

output:

000000001100000010100000011100000100100000101100000110100000111100001000100001001100001010100001011100001100100001101100001110100001111100010001100010010100010011100010100100010101100010110100010111100011001100011010100011011100011100100011101100011110100011111100100100101100100110100100111100101001...

result:

ok meet maximum 134925

Test #30:

score: 0
Accepted
time: 2ms
memory: 34944kb

input:

1018

output:

001010010101110010110110010111010010111110011001110011010110011011010011011110011101010011101110011110110011111010011111110101010110101011110101101110101110110101111110110110111110111011110111111111000000000010000000111111110111100000111011111000011110111000000110111111000111110110000000101111111001...

result:

ok meet maximum 510567

Test #31:

score: 0
Accepted
time: 2ms
memory: 35852kb

input:

1017

output:

001010010101110010110110010111010010111110011001110011010110011011010011011110011101010011101110011110110011111010011111110101010110101011110101101110101110110101111110110110111110111011110111111111000000000010000000111111110111100000111011111000011110111000000110111111000111110110000000101111111001...

result:

ok meet maximum 509558

Test #32:

score: 0
Accepted
time: 0ms
memory: 35236kb

input:

1209

output:

000000010010000001011000000110100000011110000010001000001001100000101010000010111000001100100000110110000011101000001111100001000010001100001001010000100111000010100100001010110000101101000010111100001100010000110011000011010100001101110000111001000011101100001111010000111111000100010100010001110001...

result:

ok meet maximum 721446

Test #33:

score: 0
Accepted
time: 4ms
memory: 34856kb

input:

1632

output:

000000010010000001011000000110100000011110000010001000001001100000101010000010111000001100100000110110000011101000001111100001000010001100001001010000100111000010100100001010110000101101000010111100001100010000110011000011010100001101110000111001000011101100001111010000111111000100010100010001110001...

result:

ok meet maximum 1318299

Test #34:

score: 0
Accepted
time: 8ms
memory: 34688kb

input:

1829

output:

000000100010000010011000001010100000101110000011001000001101100000111010000011111000010000100011000010010100001001110000101001000010101100001011010000101111000011000100001100110000110101000011011100001110010000111011000011110100001111110001000101000100011100010010010001001011000100110100010011110001...

result:

ok meet maximum 1657336

Test #35:

score: 0
Accepted
time: 0ms
memory: 35504kb

input:

3187

output:

000000001001000000010110000000110100000001111000000100010000001001100000010101000000101110000001100100000011011000000111010000001111100000100001000001000110000010010100000100111000001010010000010101100000101101000001011110000011000100000110011000001101010000011011100000111001000001110110000011110100...

result:

ok meet maximum 5049170

Test #36:

score: 0
Accepted
time: 0ms
memory: 35088kb

input:

2138

output:

000000000011000000001010000000011100000001001000000010110000000110100000001111000000100010000001001100000010101000000101110000001100100000011011000000111010000001111100000100001000001000110000010010100000100111000001010010000010101100000101101000001011110000011000100000110011000001101010000011011100...

result:

ok meet maximum 2267222

Test #37:

score: 0
Accepted
time: 8ms
memory: 34980kb

input:

4030

output:

000001100101000011001110000110100100001101011000011011010000110111100001110001000011100110000111010100001110111000011110010000111101100001111101000011111110001000100100010001011000100011010001000111100010010011000100101010001001011100010011001000100110110001001110100010011111000101000110001010010100...

result:

ok meet maximum 8082284

Test #38:

score: 0
Accepted
time: 4ms
memory: 36016kb

input:

6101

output:

000000000100100000000101100000000110100000000111100000001000100000001001100000001010100000001011100000001100100000001101100000001110100000001111100000010000100000010001100000010010100000010011100000010100100000010101100000010110100000010111100000011000100000011001100000011010100000011011100000011100...

result:

ok meet maximum 18549195

Test #39:

score: 0
Accepted
time: 2ms
memory: 36504kb

input:

5917

output:

000000000100100000000101100000000110100000000111100000001000100000001001100000001010100000001011100000001100100000001101100000001110100000001111100000010000100000010001100000010010100000010011100000010100100000010101100000010110100000010111100000011000100000011001100000011010100000011011100000011100...

result:

ok meet maximum 17445655

Test #40:

score: 0
Accepted
time: 0ms
memory: 34788kb

input:

6635

output:

000000000100100000000101100000000110100000000111100000001000100000001001100000001010100000001011100000001100100000001101100000001110100000001111100000010000100000010001100000010010100000010011100000010100100000010101100000010110100000010111100000011000100000011001100000011010100000011011100000011100...

result:

ok meet maximum 21943566

Test #41:

score: 0
Accepted
time: 0ms
memory: 36436kb

input:

9993

output:

000000000010010000000001011000000000110100000000011110000000010001000000001001100000000101010000000010111000000001100100000000110110000000011101000000001111100000001000010000000100011000000010010100000001001110000000101001000000010101100000001011010000000101111000000011000100000001100110000000110101...

result:

ok meet maximum 49821572

Test #42:

score: 0
Accepted
time: 3ms
memory: 35740kb

input:

14474

output:

000000001101010000000110111000000011100100000001110110000000111101000000011111100000010000010000001000011000000100010100000010001110000001001001000000100101100000010011010000001001111000000101000100000010100110000001010101000000101011100000010110010000001011011000000101110100000010111110000001100001...

result:

ok meet maximum 104583873

Test #43:

score: 0
Accepted
time: 0ms
memory: 36384kb

input:

11534

output:

000000000010010000000001011000000000110100000000011110000000010001000000001001100000000101010000000010111000000001100100000000110110000000011101000000001111100000001000010000000100011000000010010100000001001110000000101001000000010101100000001011010000000101111000000011000100000001100110000000110101...

result:

ok meet maximum 66388863

Test #44:

score: 0
Accepted
time: 3ms
memory: 36268kb

input:

19098

output:

000000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000011011000000000111010000000001111100000000100001000000001000110000000010010100000000100111000000001010010000000010101100000000101101000000001011110000000011000100000...

result:

ok meet maximum 182141836

Test #45:

score: 0
Accepted
time: 3ms
memory: 37076kb

input:

31872

output:

000000010100001000000101000110000001010010100000010100111000000101010010000001010101100000010101101000000101011110000001011000100000010110011000000101101010000001011011100000010111001000000101110110000001011110100000010111111000000110000010000001100001100000011000101000000110001110000001100100100000...

result:

ok meet maximum 507514777

Test #46:

score: 0
Accepted
time: 0ms
memory: 36720kb

input:

27626

output:

000000001010001000000010100110000000101010100000001010111000000010110010000000101101100000001011101000000010111110000000110000100000001100011000000011001010000000110011100000001101001000000011010110000000110110100000001101111000000011100010000000111001100000001110101000000011101110000000111100100000...

result:

ok meet maximum 381257844

Test #47:

score: 0
Accepted
time: 8ms
memory: 37176kb

input:

43245

output:

000000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011100000000010100100000000010101100000000010110100000000010111...

result:

ok meet maximum 934503599

Test #48:

score: 0
Accepted
time: 7ms
memory: 37892kb

input:

34491

output:

000000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011100000000010100100000000010101100000000010110100000000010111...

result:

ok meet maximum 594380060

Test #49:

score: 0
Accepted
time: 4ms
memory: 37628kb

input:

64535

output:

000001111011010100001111011011100001111011100100001111011101100001111011110100001111011111100001111100010100001111100011100001111100100100001111100101100001111100110100001111100111100001111101000100001111101001100001111101010100001111101011100001111101100100001111101101100001111101110100001111101111...

result:

ok meet maximum 2081512994

Test #50:

score: 0
Accepted
time: 8ms
memory: 40384kb

input:

65746

output:

000000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001...

result:

ok meet maximum 2160380385

Test #51:

score: 0
Accepted
time: 7ms
memory: 50976kb

input:

65861

output:

000000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001...

result:

ok meet maximum 2167946005

Test #52:

score: 0
Accepted
time: 13ms
memory: 39356kb

input:

66725

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 2225209765

Test #53:

score: 0
Accepted
time: 8ms
memory: 39856kb

input:

86349

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 3726867681

Test #54:

score: 0
Accepted
time: 12ms
memory: 40268kb

input:

68454

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 2342045211

Test #55:

score: 0
Accepted
time: 7ms
memory: 40044kb

input:

112260

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 6299544960

Test #56:

score: 0
Accepted
time: 10ms
memory: 39984kb

input:

108023

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 5832941098

Test #57:

score: 0
Accepted
time: 15ms
memory: 40548kb

input:

103787

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 5384393176

Test #58:

score: 0
Accepted
time: 12ms
memory: 49372kb

input:

128710

output:

000000111011100010000011101110011000001110111010100000111011101110000011101111001000001110111101100000111011111010000011101111111000001111000010100000111100001110000011110001001000001111000101100000111100011010000011110001111000001111001000100000111100100110000011110010101000001111001011100000111100...

result:

ok meet maximum 8281268235

Test #59:

score: 0
Accepted
time: 14ms
memory: 39520kb

input:

129534

output:

000001111001001010000111100100111000011110010100100001111001010110000111100101101000011110010111100001111001100010000111100110011000011110011010100001111001101110000111100111001000011110011101100001111001111010000111100111111000011110100010100001111010001110000111101001001000011110100101100001111010...

result:

ok meet maximum 8387651991

Test #60:

score: 0
Accepted
time: 3ms
memory: 40020kb

input:

128670

output:

000000111011100010000011101110011000001110111010100000111011101110000011101111001000001110111101100000111011111010000011101111111000001111000010100000111100001110000011110001001000001111000101100000111100011010000011110001111000001111001000100000111100100110000011110010101000001111001011100000111100...

result:

ok meet maximum 8276121255

Test #61:

score: 0
Accepted
time: 23ms
memory: 55408kb

input:

154721

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 11967003302

Test #62:

score: 0
Accepted
time: 17ms
memory: 49516kb

input:

143149

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 10243718420

Test #63:

score: 0
Accepted
time: 16ms
memory: 44416kb

input:

134065

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 8984762318

Test #64:

score: 0
Accepted
time: 15ms
memory: 49648kb

input:

163454

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 13356170345

Test #65:

score: 0
Accepted
time: 27ms
memory: 49412kb

input:

139150

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 9679327553

Test #66:

score: 0
Accepted
time: 19ms
memory: 55404kb

input:

172380

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 14854850208

Test #67:

score: 0
Accepted
time: 23ms
memory: 44668kb

input:

178166

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 15868884317

Test #68:

score: 0
Accepted
time: 16ms
memory: 44336kb

input:

143651

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 10315696937

Test #69:

score: 0
Accepted
time: 14ms
memory: 45288kb

input:

198199

output:

000000000001100101000000000011001110000000000110100100000000001101011000000000011011010000000000110111100000000001110001000000000011100110000000000111010100000000001110111000000000011110010000000000111101100000000001111101000000000011111110000000001000000100000000010000011000000000100001010000000001...

result:

ok meet maximum 19638413795

Test #70:

score: 0
Accepted
time: 21ms
memory: 49600kb

input:

186272

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 17345817782

Test #71:

score: 0
Accepted
time: 18ms
memory: 44960kb

input:

198102

output:

000000000001100101000000000011001110000000000110100100000000001101011000000000011011010000000000110111100000000001110001000000000011100110000000000111010100000000001110111000000000011110010000000000111101100000000001111101000000000011111110000000001000000100000000010000011000000000100001010000000001...

result:

ok meet maximum 19619194797

Test #72:

score: 0
Accepted
time: 3ms
memory: 35684kb

input:

8201

output:

010101010110110101010111110101011010110101011011110101011101110101011110110101011111110101101011110101101101110101101110110101101111110101110101110110110101110111110101111011110101111101110101111110110101111111110110110110111110110111011110110111101110110111111110111011101111111011110111111011111011...

result:

ok meet maximum 33542145

Test #73:

score: 0
Accepted
time: 0ms
memory: 35428kb

input:

8202

output:

010101010110110101010111110101011010110101011011110101011101110101011110110101011111110101101011110101101101110101101110110101101111110101110101110110110101110111110101111011110101111101110101111110110101111111110110110110111110110111011110110111101110110111111110111011101111111011110111111011111011...

result:

ok meet maximum 33550335

Test #74:

score: 0
Accepted
time: 9ms
memory: 35736kb

input:

8203

output:

010101010110110101010111110101011010110101011011110101011101110101011110110101011111110101101011110101101101110101101110110101101111110101110101110110110101110111110101111011110101111101110101111110110101111111110110110110111110110111011110110111101110110111111110111011101111111011110111111011111011...

result:

ok meet maximum 33558526

Test #75:

score: 0
Accepted
time: 9ms
memory: 33724kb

input:

8204

output:

000000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...

result:

ok meet maximum 33566718

Test #76:

score: 0
Accepted
time: 0ms
memory: 40984kb

input:

8205

output:

000000000000001000000000001100000000001010000000000111000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110...

result:

ok meet maximum 33574910

Test #77:

score: 0
Accepted
time: 6ms
memory: 36772kb

input:

8206

output:

000000000000001000000000001100000000001010000000000111000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110...

result:

ok meet maximum 33583103

Test #78:

score: 0
Accepted
time: 0ms
memory: 36368kb

input:

16394

output:

001010101001010110101011010100101010010101011010110101010010100101010101110010101011011001010101110100101010111110010101100111001010110101100101011011010010101101111001010111001100101011101010010101110111001010111101100101011111010010101111111001011001011100101100110110010110011101001011001111100101...

result:

ok meet maximum 134193153

Test #79:

score: 0
Accepted
time: 4ms
memory: 35868kb

input:

16395

output:

010101010101011010101010111101010101101110101010111011010101011111101010110101110101011011011010101101111101010111010110101011101111010101111011101010111110110101011111111010110101101101011010111110101101101111010110111011101011011110110101101111111010111010111101011101101110101110111011010111011111...

result:

ok meet maximum 134209535

Test #80:

score: 0
Accepted
time: 3ms
memory: 36176kb

input:

16396

output:

010101010101011010101010111101010101101110101010111011010101011111101010110101110101011011011010101101111101010111010110101011101111010101111011101010111110110101011111111010110101101101011010111110101101101111010110111011101011011110110101101111111010111010111101011101101110101110111011010111011111...

result:

ok meet maximum 134225918

Test #81:

score: 0
Accepted
time: 4ms
memory: 34672kb

input:

16397

output:

000000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...

result:

ok meet maximum 134242302

Test #82:

score: 0
Accepted
time: 2ms
memory: 37044kb

input:

16398

output:

000000000000000100000000000011000000000001010000000000011100000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000011011000000000111010000000001111100000000100001000000001000110000000010010100000000100111000000001010010000...

result:

ok meet maximum 134258686

Test #83:

score: 0
Accepted
time: 0ms
memory: 35992kb

input:

16399

output:

000000000000000100000000000011000000000001010000000000011100000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000011011000000000111010000000001111100000000100001000000001000110000000010010100000000100111000000001010010000...

result:

ok meet maximum 134275071

Test #84:

score: 0
Accepted
time: 7ms
memory: 37096kb

input:

32779

output:

010101010101101101010101011111010101011010110101010110111101010101110111010101011110110101010111111101010110101011010111101010110110111010101101110110101011011111101010111010111010101110110110101011101111101010111101011010101111011110101011111011101010111111011010101111111110101101011011101011010111...

result:

ok meet maximum 536821761

Test #85:

score: 0
Accepted
time: 6ms
memory: 36076kb

input:

32780

output:

010101010101101101010101011111010101011010110101010110111101010101110111010101011110110101010111111101010110101011010111101010110110111010101101110110101011011111101010111010111010101110110110101011101111101010111101011010101111011110101011111011101010111111011010101111111110101101011011101011010111...

result:

ok meet maximum 536854527

Test #86:

score: 0
Accepted
time: 3ms
memory: 36248kb

input:

32781

output:

010101010101101101010101011111010101011010110101010110111101010101110111010101011110110101010111111101010110101011010111101010110110111010101101110110101011011111101010111010111010101110110110101011101111101010111101011010101111011110101011111011101010111111011010101111111110101101011011101011010111...

result:

ok meet maximum 536887294

Test #87:

score: 0
Accepted
time: 7ms
memory: 35792kb

input:

32782

output:

000000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...

result:

ok meet maximum 536920062

Test #88:

score: 0
Accepted
time: 8ms
memory: 38608kb

input:

32783

output:

000000000000000010000000000000110000000000001010000000000001110000000000010010000000000010110000000000011010000000000011110000000000100010000000000100110000000000101010000000000101110000000000110010000000000110110000000000111010000000000111110000000001000010000000001000110000000001001010000000001001...

result:

ok meet maximum 536952830

Test #89:

score: 0
Accepted
time: 3ms
memory: 38680kb

input:

32784

output:

000000000000000010000000000000110000000000001010000000000001110000000000010010000000000010110000000000011010000000000011110000000000100010000000000100110000000000101010000000000101110000000000110010000000000110110000000000111010000000000111110000000001000010000000001000110000000001001010000000001001...

result:

ok meet maximum 536985599

Test #90:

score: 0
Accepted
time: 7ms
memory: 38048kb

input:

65548

output:

001010101010010101101010101101010010101010010101011010101101010100101010010101010110101101010101001010010101010101110010101010110110010101010111010010101010111110010101011001110010101011010110010101011011010010101011011110010101011100110010101011101010010101011101110010101011110110010101011111010010...

result:

ok meet maximum 2147385345

Test #91:

score: 0
Accepted
time: 8ms
memory: 37848kb

input:

65549

output:

010101010101010110101010101011110101010101101110101010101110110101010101111110101010110101110101010110110110101010110111110101010111010110101010111011110101010111101110101010111110110101010111111110101011010101110101011010110110101011010111110101011011010110101011011011110101011011101110101011011110...

result:

ok meet maximum 2147450879

Test #92:

score: 0
Accepted
time: 8ms
memory: 38660kb

input:

65550

output:

010101010101010110101010101011110101010101101110101010101110110101010101111110101010110101110101010110110110101010110111110101010111010110101010111011110101010111101110101010111110110101010111111110101011010101110101011010110110101011010111110101011011010110101011011011110101011011101110101011011110...

result:

ok meet maximum 2147516414

Test #93:

score: 0
Accepted
time: 10ms
memory: 36980kb

input:

65551

output:

000000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...

result:

ok meet maximum 2147581950

Test #94:

score: 0
Accepted
time: 4ms
memory: 40296kb

input:

65552

output:

000000000000000001000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000...

result:

ok meet maximum 2147647486

Test #95:

score: 0
Accepted
time: 12ms
memory: 39712kb

input:

65553

output:

000000000000000001000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000...

result:

ok meet maximum 2147713023

Test #96:

score: 0
Accepted
time: 7ms
memory: 49112kb

input:

131085

output:

010101010101011011010101010101111101010101011010110101010101101111010101010111011101010101011110110101010101111111010101011010101101010101101011110101010110110111010101011011101101010101101111110101010111010111010101011101101101010101110111110101010111101011010101011110111101010101111101110101010111...

result:

ok meet maximum 8589737985

Test #97:

score: 0
Accepted
time: 11ms
memory: 39972kb

input:

131086

output:

010101010101011011010101010101111101010101011010110101010101101111010101010111011101010101011110110101010101111111010101011010101101010101101011110101010110110111010101011011101101010101101111110101010111010111010101011101101101010101110111110101010111101011010101011110111101010101111101110101010111...

result:

ok meet maximum 8589869055

Test #98:

score: 0
Accepted
time: 14ms
memory: 40104kb

input:

131087

output:

010101010101011011010101010101111101010101011010110101010101101111010101010111011101010101011110110101010101111111010101011010101101010101101011110101010110110111010101011011101101010101101111110101010111010111010101011101101101010101110111110101010111101011010101011110111101010101111101110101010111...

result:

ok meet maximum 8590000126

Test #99:

score: 0
Accepted
time: 15ms
memory: 41532kb

input:

131088

output:

000000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...

result:

ok meet maximum 8590131198

Test #100:

score: 0
Accepted
time: 15ms
memory: 49456kb

input:

131089

output:

000000000000000000100000000000000011000000000000001010000000000000011100000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000...

result:

ok meet maximum 8590262270

Test #101:

score: 0
Accepted
time: 16ms
memory: 55328kb

input:

131090

output:

000000000000000000100000000000000011000000000000001010000000000000011100000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000...

result:

ok meet maximum 8590393343

Test #102:

score: 0
Accepted
time: 3ms
memory: 36304kb

input:

8197

output:

010101010110110101010111110101011010110101011011110101011101110101011110110101011111110101101011110101101101110101101110110101101111110101110101110110110101110111110101111011110101111101110101111110110101111111110110110110111110110111011110110111101110110111111110111011101111111011110111111011111011...

result:

ok meet maximum 33509395

Test #103:

score: 0
Accepted
time: 3ms
memory: 36568kb

input:

16328

output:

001010010101010111001010101101100101010111010010101011111001010110011100101011010110010101101101001010110111100101011100110010101110101001010111011100101011110110010101111101001010111111100101100101110010110011011001011001110100101100111110010110100111001011010101100101101011010010110101111001011011...

result:

ok meet maximum 133114152

Test #104:

score: 0
Accepted
time: 4ms
memory: 36048kb

input:

32608

output:

000101101100101001011101001010010111110010100110011100101001101011001010011011010010100110111100101001110011001010011101010010100111011100101001111011001010011111010010100111111100101010010101001011100101010011011001010100111010010101001111100101010100111001010101010110010101010110100101010101111001...

result:

ok meet maximum 531233481

Test #105:

score: 0
Accepted
time: 7ms
memory: 37092kb

input:

65141

output:

000101101110010100101110110010100101111010010100101111110010100110010110010100110011010010100110011110010100110100110010100110101010010100110101110010100110110110010100110111010010100110111110010100111001110010100111010110010100111011010010100111011110010100111100110010100111101010010100111101110010...

result:

ok meet maximum 2120796035

Test #106:

score: 0
Accepted
time: 16ms
memory: 40360kb

input:

130420

output:

000101101001001010010111100100101001100110010010100110101001001010011011100100101001110110010010100111101001001010011111100100101010010110010010101001101001001010100111100100101010100110010010101010101001001010101011100100101010110110010010101011101001001010101111100100101011001010010010101100111001...

result:

ok meet maximum 8502797880

Test #107:

score: 0
Accepted
time: 0ms
memory: 35556kb

input:

8265

output:

000000000000110000000000101000000000011100000000010010000000001011000000000110100000000011110000000010001000000001001100000000101010000000010111000000001100100000000110110000000011101000000001111100000001000010000000100011000000010010100000001001110000000101001000000010101100000001011010000000101111...

result:

ok meet maximum 34068260

Test #108:

score: 0
Accepted
time: 8ms
memory: 36472kb

input:

16508

output:

000000000000011000000000001010000000000011100000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000011011000000000111010000000001111100000000100001000000001000110000000010010100000000100111000000001010010000000010101100000...

result:

ok meet maximum 136067031

Test #109:

score: 0
Accepted
time: 8ms
memory: 38492kb

input:

33008

output:

000000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011100000000010100...

result:

ok meet maximum 544351055

Test #110:

score: 0
Accepted
time: 9ms
memory: 51036kb

input:

65964

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 2174733396

Test #111:

score: 0
Accepted
time: 16ms
memory: 55488kb

input:

131692

output:

000000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001000110000000000010010100000000000100111000000000001010010000000000...

result:

ok meet maximum 8669480792

Test #112:

score: 0
Accepted
time: 0ms
memory: 36544kb

input:

15843

output:

000001001011010000100101111000010011000100001001100110000100110101000010011011100001001110010000100111011000010011110100001001111110000101000011000010100010100001010001110000101001001000010100101100001010011010000101001111000010101000100001010100110000101010101000010101011100001010110010000101011011...

result:

ok meet maximum 125318747

Test #113:

score: 0
Accepted
time: 6ms
memory: 35988kb

input:

31560

output:

000000010100001000000101000110000001010010100000010100111000000101010010000001010101100000010101101000000101011110000001011000100000010110011000000101101010000001011011100000010111001000000101110110000001011110100000010111111000000110000010000001100001100000011000101000000110001110000001100100100000...

result:

ok meet maximum 497623597

Test #114:

score: 0
Accepted
time: 7ms
memory: 37296kb

input:

64241

output:

000000100100100100000100100101100000100100110100000100100111100000100101000100000100101001100000100101010100000100101011100000100101100100000100101101100000100101110100000100101111100000100110000100000100110001100000100110010100000100110011100000100110100100000100110101100000100110110100000100110111...

result:

ok meet maximum 2062587185

Test #115:

score: 0
Accepted
time: 15ms
memory: 39816kb

input:

73307

output:

000000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010100000000001001110000000000101001000000000010101100000000001...

result:

ok meet maximum 2685953056

Test #116:

score: 0
Accepted
time: 12ms
memory: 50960kb

input:

129593

output:

000001111001001010000111100100111000011110010100100001111001010110000111100101101000011110010111100001111001100010000111100110011000011110011010100001111001101110000111100111001000011110011101100001111001111010000111100111111000011110100010100001111010001110000111101001001000011110100101100001111010...

result:

ok meet maximum 8395295323