QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#563426#5434. Binary SubstringsWuyanruTL 1949ms14704kbC++142.1kb2024-09-14 11:43:482024-09-14 11:43:48

Judging History

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

  • [2024-09-14 11:43:48]
  • 评测
  • 测评结果:TL
  • 用时:1949ms
  • 内存:14704kb
  • [2024-09-14 11:43:48]
  • 提交

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(time(0)^clock());
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\n",i,to[i][0],to[i][1]);
    return lst;
}
void output(int num,int now)
{
    // printf("%d %d\n",num,now);
    if(num==n+1)
    {
        s[n+1]=0;printf("%s\n",s+1);
        // printf("finish cnt=%d\n",cnt);
        exit(0);
    }
    for(int i=1;i>=0;i--) if(!to[now][i])
    {
        to[now][i]=to[now][1-i]+1;s[num]=i+'0';
        output(num+1,(now<<1|i)&((1<<k)-1));
        to[now][i]=0;
    }
}
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 o=run(k-1);
        output((1<<k)+k,o);
    }
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 6516kb

input:

2

output:

10

result:

ok meet maximum 3

Test #2:

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

input:

5

output:

00110

result:

ok meet maximum 12

Test #3:

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

input:

1

output:

0

result:

ok meet maximum 1

Test #4:

score: 0
Accepted
time: 1ms
memory: 6428kb

input:

3

output:

101

result:

ok meet maximum 5

Test #5:

score: 0
Accepted
time: 1ms
memory: 6556kb

input:

4

output:

0110

result:

ok meet maximum 8

Test #6:

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

input:

6

output:

001101

result:

ok meet maximum 16

Test #7:

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

input:

7

output:

0011010

result:

ok meet maximum 21

Test #8:

score: 0
Accepted
time: 1ms
memory: 6340kb

input:

8

output:

01100101

result:

ok meet maximum 27

Test #9:

score: 0
Accepted
time: 1ms
memory: 6448kb

input:

9

output:

001101000

result:

ok meet maximum 34

Test #10:

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

input:

10

output:

0001011100

result:

ok meet maximum 42

Test #11:

score: 0
Accepted
time: 1ms
memory: 6536kb

input:

11

output:

00101110001

result:

ok meet maximum 50

Test #12:

score: 0
Accepted
time: 1ms
memory: 6448kb

input:

12

output:

000101110011

result:

ok meet maximum 59

Test #13:

score: 0
Accepted
time: 22ms
memory: 14636kb

input:

200000

output:

000000000000000010100101001111001000011110000010001111100110101010111000001001001001101011000000100001010001001011000111111110100101111010110110111111011010100000011001100100010001001100011111000101111110000011100000000110011011100011101110110111110001110011000100100011010010101010101111010100000001...

result:

ok meet maximum 19996962278

Test #14:

score: 0
Accepted
time: 1ms
memory: 6552kb

input:

24

output:

000111101100101000010011

result:

ok meet maximum 240

Test #15:

score: 0
Accepted
time: 1ms
memory: 6424kb

input:

35

output:

00001010011011110001110101100100000

result:

ok meet maximum 526

Test #16:

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

input:

30

output:

000010110011110100011011100000

result:

ok meet maximum 381

Test #17:

score: 0
Accepted
time: 1ms
memory: 6472kb

input:

45

output:

000001100111110100100010101101110000100110101

result:

ok meet maximum 882

Test #18:

score: 0
Accepted
time: 1ms
memory: 6464kb

input:

66

output:

000010110001110011011111010100100000110010101110110100010011110000

result:

ok meet maximum 1953

Test #19:

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

input:

50

output:

00001110001001101011111011001010000010110111010010

result:

ok meet maximum 1097

Test #20:

score: 0
Accepted
time: 1ms
memory: 6400kb

input:

80

output:

00000010101000111011010011011110001000011001001011100111111010110000011110111010

result:

ok meet maximum 2901

Test #21:

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

input:

107

output:

00000011110001101100101001000101101000010011101010111111011100110000010101000111000011001111100100101110110

result:

ok meet maximum 5277

Test #22:

score: 0
Accepted
time: 1ms
memory: 6448kb

input:

81

output:

000001011000100001100100101011110011111101101110101001101000111000000111101001000

result:

ok meet maximum 2976

Test #23:

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

input:

147

output:

000000011110001110000110100100101001101100100010111110011101010111011010110000010101000010011111110111001011011110100011001100010000001000111110101

result:

ok meet maximum 10124

Test #24:

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

input:

255

output:

000000011100101010111111101001011011101111011000111110011110001000001001000101110000101001110101100100110110101000011010001100110000001011000011110101010010010100010011111100000110001010110100110010111100100001000111011011001110001101111101110011010111010

result:

ok meet maximum 31130

Test #25:

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

input:

173

output:

00000010101011111110100110010001101010000011000010010100100111001101100111100101101000101110110111101110001110101100010000111110000000111000011011101000010110010101101101011

result:

ok meet maximum 14115

Test #26:

score: 0
Accepted
time: 1ms
memory: 6552kb

input:

288

output:

000000001100110111100110010110001101100001110010101010010000001010011000001001001101010001001110111110100011000100001101001111111101110011110000101101101110101011100010101100100010111111000111010010111011010000011111001001010000100011110101101011110110011100000001000001011100100001010100

result:

ok meet maximum 39850

Test #27:

score: 0
Accepted
time: 1ms
memory: 6568kb

input:

407

output:

000000010010100110010110110101110110001100010011111111001000100011100001101001000010100001111101000000111010101011111101111100011110011000001011001001001101100111101101111010110100011011101001110111000101011000010000011001101010010111001110010101000101111000000001101101100000010101010011110001000011...

result:

ok meet maximum 80310

Test #28:

score: 0
Accepted
time: 1ms
memory: 6540kb

input:

349

output:

000000001011001011011111111010101000100001010010001111001111101111011001110111010111110010000001100001110010101110110100111000110101001101101100000111111000100111101001011100110100011001001001100110001011110000100101000001000101010110101100011101000011011100000001110110001000110110010001001000011110...

result:

ok meet maximum 58821

Test #29:

score: 0
Accepted
time: 1ms
memory: 6496kb

input:

526

output:

000000000101111110001111011110000010011010101111001011000101011100111110101111100001001010101100100111111111001101110000000111111011001011110110100100011111001000100011010001110101100001110000110010100101000100100110011001000011110011100010011100110000101010010010110111101010001100000011000110110101...

result:

ok meet maximum 134925

Test #30:

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

input:

1018

output:

000000000111010100111010010001110011101110000101100000001010001011111101101110100000011010110001011011010010110011010011010101100101101000011011011001000100111101110110101000111111001100110001110110001101000110011110010111100111110000111000001111101000100011011110110011100100001111000000100001000101...

result:

ok meet maximum 510567

Test #31:

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

input:

1017

output:

000000001000011101110011100000111000100010111100110000110010111001010000011010000110110111011110111010000000111110101111010101100111010100010010110100111111001111011011010001010011001111100100000101101111000111001101110001100000011000100110001111111000101010000101000111101001000010001100110101001110...

result:

ok meet maximum 509558

Test #32:

score: 0
Accepted
time: 1ms
memory: 6528kb

input:

1209

output:

000000000011110010000000100000110111101000001010011001011111010011101100000010101010100110111001010000001101001101010010110011110011111100011110001100100101101111000100000010011111001001001010110011011111111011100001100101010001010001001100010100100111101111011101010111111100101101000111010011000000...

result:

ok meet maximum 721446

Test #33:

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

input:

1632

output:

000000000100000011001010001000001011001100110110110000101110100011111100101001110000100101011111011011010110111101110101000001110111100000101011001111000100111111011001101010101011110100000010011100101011010001100100011000101010001110010001001101111001101001101100011011001110101011100101110111000101...

result:

ok meet maximum 1318299

Test #34:

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

input:

1829

output:

000000000010000000111100101100011000010110100011010001011001010111101111000101101111110000110100110000000101110100010000010100011001101001011011001001011001101111010001111000010100101111111111000100111000110010011001010011111011101001010001001100010101000011011100010000100101011001000110001001000111...

result:

ok meet maximum 1657336

Test #35:

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

input:

3187

output:

000000000001110110110001110001101001000111100010101111001101110111111001100101111001001110111001111110110001010100101000001111100101101100100101011111100001010001101000010000111110100000011001101111011010011111100100011001111111111101000101001001111000110111100001001101010011011111101111100111011010...

result:

ok meet maximum 5049170

Test #36:

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

input:

2138

output:

000000000001011001000010100101000101100110101100101111100000110001000010110111011001001100100010001011011000000011111000010001010111101101001001100001011000100110001100011010110100101010100100000011011100010000001001011111110111011110000101000001110001100111011000110111011101101000000101010010110000...

result:

ok meet maximum 2267222

Test #37:

score: 0
Accepted
time: 1ms
memory: 6672kb

input:

4030

output:

000000000001011111100011110111100000100110101011110010110001010111101111101011111101110011101011101001111101100010111000001010011111110010111111101001000111111101101100110100011111011101011110000100101001010001000011111111011110111000101000000110100110001110101101001001111011101111010000110011101001...

result:

ok meet maximum 8082284

Test #38:

score: 0
Accepted
time: 1ms
memory: 6644kb

input:

6101

output:

000000000001111101111011000000101101010001010100111110011000001100001000111000100110011001111011101110000100110000111000011100100110100010101100100011101110011001110100101111100100101101001001101101110011101101011011100100001111000010111011101010010000000111101100010100010010101110001000101110000011...

result:

ok meet maximum 18549195

Test #39:

score: 0
Accepted
time: 1ms
memory: 6664kb

input:

5917

output:

000000000000111101100100101110000110011100001110001000101111011111000111101001100111001001001101000100110010101000011110011010011010101110011100000000010100101011001001100001011110101111110010111110100000101011110010011010110011011111100000001111111110010100001001110000011001010000001001101001111100...

result:

ok meet maximum 17445655

Test #40:

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

input:

6635

output:

000000000000100000110011001000101110000011111010110000100011010000110100000001011111001001001111100001011011101100010101100111100100001111110101111000001001100111010110110101111001110101010011110011001110011001001101010101111011010001011111110100000101100011011111001010110100100000011011110101001010...

result:

ok meet maximum 21943566

Test #41:

score: 0
Accepted
time: 1ms
memory: 6900kb

input:

9993

output:

000000000000101101010010101001000110110101011101011111111101011011010011000101110000000010111001101010011001100110100001011100100101001100000111101001100101110000101011111110100101100100001101111101011101110110010100100110011110011110101011111000000100111000011111101111111111001101011111110011000010...

result:

ok meet maximum 49821572

Test #42:

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

input:

14474

output:

000000000000110111000110111101010011100100000011101001100001011000011101011101101100000100011000001110010101011110011000110010001110011000011000110001011110110001010001111000110111001010000001010111111001011101111010110100100110111000100001010101001010010110010101001111101010111001101011000010000001...

result:

ok meet maximum 104583873

Test #43:

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

input:

11534

output:

000000000000101010001000111011100110001101111001110110001001001110101101110001001001000110111011100111101100101001101010101111011111100100110000110011100110000001001001101001000111100000101000100010010100010101111000000100011010011100111111100100100100111001000111110100110110010101101011110000111001...

result:

ok meet maximum 66388863

Test #44:

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

input:

19098

output:

000000000000011010011101111101001101001010100110011100101000100011110001100100110101110111100000010101100110101011100111000100101100011101001101101000010011000010011011010100110011000011101100001010110111100011101110011100000000010100101000001110010110010101010001010110111001110011111100101001000101...

result:

ok meet maximum 182141836

Test #45:

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

input:

31872

output:

000000000000010110101001010100100011011010101110101111111110101101101001100010111000000001011000110101001100110011010000101110011010100110100011110100110010111000010101111111010010110010000110111110101110111011001010010011001111001111010101111100000010011100001111110111111111100110101111111101101001...

result:

ok meet maximum 507514777

Test #46:

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

input:

27626

output:

000000000000011110011010101110010001000011001000000101000000110000011010010011110011100010111000101011001110000011001001001000011001100101011001001001010010110101001001110010101010110101011010010111100000110000110110000001011000101111001100101000101000010000100101101100001011000100000111100001101001...

result:

ok meet maximum 381257844

Test #47:

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

input:

43245

output:

000000000000000110011011110011011011000110111001111001011101011000000011100100010010010011001100010010101111001000100110001011100011111110101101001001011100110010000100010010110010011011011001010010111100001000001111111011010001001110000011010000010001010110101100110101101011010011000011111010001010...

result:

ok meet maximum 934503599

Test #48:

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

input:

34491

output:

000000000000000111101100100101110000110011100001110001000101111011111000111101001100111000001001101000100110010101000011110011010011010101110011100001000010100101011001001100001011110101111110010111110100000101011110010011010010011011111100000001111111110010110001001110000001001010000001001101001111...

result:

ok meet maximum 594380060

Test #49:

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

input:

64535

output:

000000000000001001110111111001001100010101000010100111101111001111111111100011101101011110100101011010111111111011010000001001001011001111111001101111100011000000000011101011111000101010110001110100011111000011010111111110000011110000000110101011000010100000011010000001111011001101011010000001110110...

result:

ok meet maximum 2081512994

Test #50:

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

input:

65746

output:

000000000000000101001101001101110100000111110101000000001010010110100111001010011011000101011001000000110101111111001111110111101110101111011101110000100101000101101111001100011011100011110110000111100011011100000100100101011011000111010110111100101111001100001100001101010110101111110111111111010000...

result:

ok meet maximum 2160380385

Test #51:

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

input:

65861

output:

000000000000000010000110011110010100111110001111110000101010110001110011110111111011111111101001011111111101111110111010000110100000001011010001101010010010000100000101011111101011001110101100000110111010111100100010100100101001011001101000011010001111001101010010010100011001010111111001000100100100...

result:

ok meet maximum 2167946005

Test #52:

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

input:

66725

output:

000000000000000011110001111001110100100101001001000100110111110011100010111010000110010001010011101000111101011110010111011011000101000001000011011001011010011100011110010101110111000010001011101111101101110010011011010101000100111110010011000001011111001011010100011011010110001010100100100101000111...

result:

ok meet maximum 2225209765

Test #53:

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

input:

86349

output:

000000000000000100011000110011001000101101000001101110000000110011100001011011010011100011000010001000110000000111011001001100111001101110000000010100011101111110000010010111100100101000100110011000111100110101000111110100100110011101111000011101100101111111110000110000100111100011110011111110111101...

result:

ok meet maximum 3726867681

Test #54:

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

input:

68454

output:

000000000000000011100100001100101011110100110111100111011011101110111110100110011100000101000111011111111100010010001101110010001001100000111000011100110111110101110100101111110101010101110111001011000001010100111010101000100110001010000100111011100111110101101001111010110011111110000010100111110010...

result:

ok meet maximum 2342045211

Test #55:

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

input:

112260

output:

000000000000000010001000001110010111010011001111100010000001001101100011110111011100010100001001110001101011111110011010000001110000011011011001110011010101000001101010100011101011011010000011011011010100001001001110101110001010011111101010011001101110101110011010111110101000010111001011111010101101...

result:

ok meet maximum 6299544960

Test #56:

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

input:

108023

output:

000000000000000010001000001110010111010011001111100010000001001101100011110111011100010100001001110001101011111110011010000001110000011011011001110011010101000001101010100011101011011010000011011011010100001001001110101110001010011111101010011001101110101110011010111110101000010111001011111010101101...

result:

ok meet maximum 5832941098

Test #57:

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

input:

103787

output:

000000000000000010111111000111101111000001001101010111100101100010101111011111010111111001100111010111010011111011000101110000010000111110100101111111010010001111111010011001101000111110110010111000000001010010100010000111111100111101110011010000001101001100011101011010010011110111100110100001100111...

result:

ok meet maximum 5384393176

Test #58:

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

input:

128710

output:

000000000000000011100011001000111010001100110101000101111100000000011110111001111000101101001011101101100011100100110100000010001101111101010100001011110001111101011101110001110100011101001001010101111110111101111101011101010111110000011011010111001011101100010110011111001111011100101001001011101110...

result:

ok meet maximum 8281268235

Test #59:

score: 0
Accepted
time: 56ms
memory: 10500kb

input:

129534

output:

000000000000000010010110100110101001000111101011001110001100001001000111110100101010001000010101101010010001100110100010110000101111010111011110000011001110011101011101001101011001000001101010101001000000010001001000100111001000001110110100110000111001110101100111100000011101000001011110000001010101...

result:

ok meet maximum 8387651991

Test #60:

score: 0
Accepted
time: 20ms
memory: 10496kb

input:

128670

output:

000000000000000111101001010001110101101000010010011111000101000011001011111101011011111110001010010010010011100110111011101010000001001101101000110001110001110111110010011010010011011011101100111000100111011001100110010101011101010110010011011000111011000000101010110100011111001101101111101111101000...

result:

ok meet maximum 8276121255

Test #61:

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

input:

154721

output:

000000000000000010011101100110010110001100011111101011010111100001001100001101000010001111101110000000000001011010101111010100011111001100111000011001111000000110000010101001111010001001100101101100001111110110011101011010100111100111011010010100010000011010010000011111100000101110011111111010011110...

result:

ok meet maximum 11967003302

Test #62:

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

input:

143149

output:

000000000000000010010100111011011011110011001011110011100110111110110110011101110110000010000001111001011000011011000111011000010110010001001100000101111011011110000001111000000001110100110110010011001101101001011010011100111001110100000000110011001111110001101000100101010001011101110101110010010110...

result:

ok meet maximum 10243718420

Test #63:

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

input:

134065

output:

000000000000000001010100011101101000101101000110000110000000101001101010011001100110101111011101110110001011000011101011011110110110010111010101001000011001111110010000011101000010010110010100011000011010010100100011100111101100011010100100011110001000001010110100111100100010000101000111100001001001...

result:

ok meet maximum 8984762318

Test #64:

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

input:

163454

output:

000000000000000010001100011001100100010110100000110111000000011001110000101101101001110001100001000100011000000011101100100110011100110111000000010010001110111111000001001011110010010100010011001100011110011010100011111010010011001110111100001110110010111111111000011000010011110001111001111111011110...

result:

ok meet maximum 13356170345

Test #65:

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

input:

139150

output:

000000000000000011010010010011110011001010111011111101101000000010100110100000111010100001110100010100111001111010100001001101000101001000010111100011011010011111110100010111001011001111001101101001010001100000000001110110100111010001101101001110010111110101110000011010111111111010100010100111010011...

result:

ok meet maximum 9679327553

Test #66:

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

input:

172380

output:

000000000000000010111000110010001110100011001101010001011111000000000111101110011110001011010010111011011000111001001101000000100011011111010101000010111100011111010111011100011101000111010010010101011111101111011111010111010101111100000110110101110010111011000101100111110011110111001010010010111011...

result:

ok meet maximum 14854850208

Test #67:

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

input:

178166

output:

000000000000000001000111000111011101100111100110101101100011000101001001000010111100001000111101011110001111011110011101110100101100110011001001011000000110000011001011001110000001010101010101101001110000111100110010001001111111111111100011101000000110010100101101101111111101000000101000000111001011...

result:

ok meet maximum 15868884317

Test #68:

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

input:

143651

output:

000000000000000010100110100110111010000011111010100000000101001011010011100101001101100010101100100000011010111111100111111011110111010111101110111000010010100010110111100110001101110001111011000011110001101110000010010010101101100011101011011110010111100110000110000110101011010111111011111111101000...

result:

ok meet maximum 10315696937

Test #69:

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

input:

198199

output:

000000000000000011100111011101010110001010111001110101100001001000001101000010100111111101010001111100010110101100110100100011001001100110000010110000010010001010001011100000101100011001010111101111011000011111000101000001100110111000110010010000000111011010001111000110001110011001110101001101101111...

result:

ok meet maximum 19638413795

Test #70:

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

input:

186272

output:

000000000000000011000111001010010111100011001001111110001110100110010000111110111000001110111011010100001000011100001011011101010001101001000010111001001010101010101101001010001010100000111111010100110110101000100100001011110000100110010011111010011100100001010010110100010011010111011101111001000011...

result:

ok meet maximum 17345817782

Test #71:

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

input:

198102

output:

000000000000000011010101101110111111101000001111000000001011110111011101111001100111011011101111011110101100010110000110101101101111000110010010010110001010010100010010110111010100011000111011011101010101110100000100111111101110010010000101001001100001110001011000010110001100010111011100110101011111...

result:

ok meet maximum 19619194797

Test #72:

score: 0
Accepted
time: 115ms
memory: 6744kb

input:

8201

output:

000000000000100011010000000011100101011101011000110000111001110110110001110100001100111101010010000010000111101011100001010010101010101000010011000000010011010100111000011000010000011011100000100000101100111001011010110101011011100111000100100011101110001000111000110110111110001000010001111101100010...

result:

ok meet maximum 33542145

Test #73:

score: 0
Accepted
time: 391ms
memory: 6664kb

input:

8202

output:

000000000000111110101001100110100111000111100001010011000000001110100001001001101101011011011110110101111100010010011111000001001011001010101111110110101000001000100010011110111110101011110000111000000011000111011101001100001001100110000001010100100010011001000001011011111000000001011110101110001000...

result:

ok meet maximum 33550335

Test #74:

score: 0
Accepted
time: 262ms
memory: 6648kb

input:

8203

output:

000000000001110101111100110000110011010100100101011100000011000011110011101000111011000100111101011100101001111111110100100101110100001111110101011111010110010011000000100000010001100111100011101011001100100010110100011100110100100000101011001110100101011111111011111010100110101000000000010011010010...

result:

ok meet maximum 33558526

Test #75:

score: 0
Accepted
time: 1ms
memory: 6964kb

input:

8204

output:

000000000000011111111100110110010000000010011101000110110010111101111100111010111011111010001100110111010011010110010101010001001010010000011000000010011011100001100110110011001100001010111010011111000111011000101010011000101101100001111001010100110110010100011000001001000000101001000011000000101000...

result:

ok meet maximum 33566718

Test #76:

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

input:

8205

output:

000000000000011111000100001100101100100010101101110100101100101110110011010100010111010010000110011000111010110000111010010001100110000110111100011000011010111111011101100101011100111100110100100110100110011000000101001010111111101111110100100010001101100111111001101000100001010010110000101001100110...

result:

ok meet maximum 33574910

Test #77:

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

input:

8206

output:

000000000000100011011011000011010110100000110001001000011000101100011011101010001011001010100001011011110100001101110100111100010001101110111000101111100110000000110101100101000100011001001011101001011000000011110101000001111101111101100010111010101000001101010010111011000110100101001011000110000100...

result:

ok meet maximum 33583103

Test #78:

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

input:

16394

output:

000000000000011000100000100010000000001101111001111010100111011011010101110110111111001001001011111100001011100111001100010001011110100011010110011010111101011100010011001101111110000010101111111111100110000100110100101010100010000011010001101100101100101010100100001001010010011100110111101101010000...

result:

ok meet maximum 134193153

Test #79:

score: 0
Accepted
time: 1949ms
memory: 6992kb

input:

16395

output:

000000000000010001101010100111111100100111001001100000010000011010010011110110101110010011011000011101111010111110110111100001010111011100111000111111100000111010100110011011101110101110000010100011000110011000011110101010011011010111101100110101000101011000111000111101110000000001001011101000101100...

result:

ok meet maximum 134209535

Test #80:

score: 0
Accepted
time: 556ms
memory: 7036kb

input:

16396

output:

000000000000011100010111100001000110000110001111000010110011010011000110010000110011000101101010001111111111111011110011111010110001101100110101100000110111100111001101100011110111101000000011001101100001010011101001011000101110000000101000101000001110000000010000000001001010010001000011001011101001...

result:

ok meet maximum 134225918

Test #81:

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

input:

16397

output:

000000000000001010100110111010101000101100110010001110010001100000110001001001111111111110001101110000101011010000001100101101011000010111101111100110111101100111111011111001010010110101101000011000011010100100110101011001110011100011110001100111010110110001001001010011000000111001001010111011011010...

result:

ok meet maximum 134242302

Test #82:

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

input:

16398

output:

000000000000011110110010010101101010111111001011011100110000110001110011001001000011100001010110101001001001000010010111110001011011010111101001100011010001011100101101010001000000011001001100101010101001101100010110111110000001011100000111111110110111001110100110100000111110000100101011011001011000...

result:

ok meet maximum 134258686

Test #83:

score: 0
Accepted
time: 1ms
memory: 7456kb

input:

16399

output:

000000000000010110101010010111011011011110100101010101010110101010000010001111100101001111100011111000001100100100100110001011111011011011101011001001110100011011111001100011110001111010011111101000011011110111000100100101010000010111000001000010001001010101000101001101000100000001111110110111001100...

result:

ok meet maximum 134275071

Test #84:

score: 0
Accepted
time: 1940ms
memory: 7568kb

input:

32779

output:

000000000000001101011001000001111010100110010100000000001100100011110011001111100101011100000100111001010111011001110000001001001111010000010100011110111101100000010011110001000001001011110000100111100111110000111001010010010100010111101010000000101111001110010110100100111010101011010101100011001001...

result:

ok meet maximum 536821761

Test #85:

score: 0
Accepted
time: 420ms
memory: 7472kb

input:

32780

output:

000000000000010100111010111111110011011100011010001001111011001111000000110110101010010001101110000100110011000101000100001100110101000001100001000000101110111000010111111010011111111101011101001110100100101010001110101101001100101111000111000010101111000000100010100101100001111111111001100111000000...

result:

ok meet maximum 536854527

Test #86:

score: -100
Time Limit Exceeded

input:

32781

output:

000000000000001100101100000011111101100001010111001000010010001011011101111111111101100011010100011000100011010001101000011010010100010111100000001110101101011101101010010111101110001011101100010111100011011100000111010111110001101010010101000001000011110100110011010010111100110010111100001000011111...

result: