QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#140556#5434. Binary SubstringsxcyleAC ✓17ms12368kbC++202.4kb2023-08-16 10:10:522023-08-16 10:10:54

Judging History

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

  • [2023-08-16 10:10:54]
  • 评测
  • 测评结果:AC
  • 用时:17ms
  • 内存:12368kb
  • [2023-08-16 10:10:52]
  • 提交

answer

/*

_/      _/       _/_/_/      _/      _/    _/           _/_/_/_/_/
 _/    _/      _/      _/     _/    _/     _/           _/
  _/  _/      _/               _/  _/      _/           _/
   _/_/       _/                 _/        _/           _/_/_/_/
  _/  _/      _/                 _/        _/           _/
 _/    _/      _/      _/        _/        _/           _/
_/      _/       _/_/_/          _/        _/_/_/_/_/   _/_/_/_/_/

*/
#include <bits/stdc++.h>
#define ll long long
#define lc(x) ((x) << 1)
#define rc(x) ((x) << 1 | 1)
#define ru(i, l, r) for (int i = (l); i <= (r); i++)
#define rd(i, r, l) for (int i = (r); i >= (l); i--)
#define mid ((l + r) >> 1)
#define pii pair<int, int>
#define mp make_pair
#define fi first
#define se second
#define sz(s) (int)s.size()
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
using namespace std;
#define maxn 600005
mt19937 Rand(chrono::steady_clock::now().time_since_epoch().count());
int read() {
    int x = 0, w = 0; char ch = getchar();
    while(!isdigit(ch)) w |= ch == '-', ch = getchar();
    while(isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
    return w ? -x : x;
}
int n, k, id[maxn], vis[maxn], nxt[maxn], cnt;
void dfs(int x) {
    if(vis[x]) return; vis[x] = 1;
    dfs(x * 2 % (1 << k)), dfs(x * 2 % (1 << k) + 1), id[++cnt] = x;
}
int main() {
    n = read();
    while((1 << (k + 1)) + k <= n) k++;
    dfs(0);
    reverse(id + 1, id + cnt + 1);
    if(n == (1 << k) + k - 1) {
        rd(i, k - 1, 1) printf("%d", (id[1] >> i) & 1);
        ru(i, 1, cnt) printf("%d", id[i] & 1);
        return 0;
    }
    memset(vis, 0, sizeof(vis));
    ru(i, 1, cnt) id[i] = (id[i] << 1) | (id[i + 1] & 1);
    ru(i, 1, cnt) vis[id[i]] = 1, nxt[id[i]] = id[i % cnt + 1];
    ru(i, 0, (1 << (k + 1)) - 1) if(!vis[i]) nxt[i] = nxt[i ^ (1 << k)] ^ 1;
    ru(i, 0, (1 << (k + 1)) - 1) if(!vis[i]) {
        assert(vis[nxt[i ^ (1 << k)]]);
        for (int j = i; !vis[j]; j = nxt[j]) vis[j] = ++cnt;
        swap(nxt[i], nxt[i ^ (1 << k)]);
        if(cnt + k >= n) {
            int now = nxt[i];
            rd(j, k, 1) printf("%d", (now >> j) & 1);
            ru(j, k + 1, n) printf("%d", now & 1), now = nxt[now];
            return 0;
        }
    }
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2

output:

01

result:

ok meet maximum 3

Test #2:

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

input:

5

output:

00110

result:

ok meet maximum 12

Test #3:

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

input:

1

output:

0

result:

ok meet maximum 1

Test #4:

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

input:

3

output:

010

result:

ok meet maximum 5

Test #5:

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

input:

4

output:

0100

result:

ok meet maximum 8

Test #6:

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

input:

6

output:

001100

result:

ok meet maximum 16

Test #7:

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

input:

7

output:

0011000

result:

ok meet maximum 21

Test #8:

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

input:

8

output:

10001101

result:

ok meet maximum 27

Test #9:

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

input:

9

output:

100011010

result:

ok meet maximum 34

Test #10:

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

input:

10

output:

0001011100

result:

ok meet maximum 42

Test #11:

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

input:

11

output:

00010111000

result:

ok meet maximum 50

Test #12:

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

input:

12

output:

000101110000

result:

ok meet maximum 59

Test #13:

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

input:

200000

output:

000000000011001010000000000110011100000000001101001000000000011010110000000000110110100000000001101111000000000011100010000000000111001100000000001110101000000000011101110000000000111100100000000001111011000000000011111010000000000111111100000000010000001000000000100000110000000001000010100000000010...

result:

ok meet maximum 19996962278

Test #14:

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

input:

24

output:

001101011110000010011101

result:

ok meet maximum 240

Test #15:

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

input:

35

output:

00110101111000001001110110010100011

result:

ok meet maximum 526

Test #16:

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

input:

30

output:

001101011110000010011101100101

result:

ok meet maximum 381

Test #17:

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

input:

45

output:

000110010100111010110111110000001000111101100

result:

ok meet maximum 882

Test #18:

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

input:

66

output:

010011101011011111000000100011110110001011100110100001100101001001

result:

ok meet maximum 1953

Test #19:

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

input:

50

output:

00011001010011101011011111000000100011110110001011

result:

ok meet maximum 1097

Test #20:

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

input:

80

output:

00001100010100011100100101100110100111101010111011011111100000001000011111011100

result:

ok meet maximum 2901

Test #21:

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

input:

107

output:

00001100010100011100100101100110100111101010111011011111100000001000011111011100011011000010111100111010000

result:

ok meet maximum 5277

Test #22:

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

input:

81

output:

000011000101000111001001011001101001111010101110110111111000000010000111110111000

result:

ok meet maximum 2976

Test #23:

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

input:

147

output:

000001100001010000111000100100010110001101000111100100110010101001011100110110011101001111101010110101111011011101111111000000001000001111110111000

result:

ok meet maximum 10124

Test #24:

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

input:

255

output:

000100100010110001101000111100100110010101001011100110110011101001111101010110101111011011101111111000000001000001111110111000011011110001110110000010111110011110100000011000010100001110001001110010110110100100101001101010001000110011000101011101011001000

result:

ok meet maximum 31130

Test #25:

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

input:

173

output:

00000110000101000011100010010001011000110100011110010011001010100101110011011001110100111110101011010111101101110111111100000000100000111111011100001101111000111011000001011

result:

ok meet maximum 14115

Test #26:

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

input:

288

output:

000000110000010100000111000010010000101100001101000011110001000100110001010100010111000110010001101100011101000111110010010100100111001010110010110100101111001100110101001101110011101100111101001111110101010111010110110101111101101111011101111111100000000010000001111111011110000111011100

result:

ok meet maximum 39850

Test #27:

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

input:

407

output:

000010010000101100001101000011110001000100110001010100010111000110010001101100011101000111110010010100100111001010110010110100101111001100110101001101110011101100111101001111110101010111010110110101111101101111011101111111100000000010000001111111011110000111011100000110111110001111011000000101111110...

result:

ok meet maximum 80310

Test #28:

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

input:

349

output:

000010010000101100001101000011110001000100110001010100010111000110010001101100011101000111110010010100100111001010110010110100101111001100110101001101110011101100111101001111110101010111010110110101111101101111011101111111100000000010000001111111011110000111011100000110111110001111011000000101111110...

result:

ok meet maximum 58821

Test #29:

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

input:

526

output:

000000011000000101000000111000001001000001011000001101000001111000010001000010011000010101000010111000011001000011011000011101000011111000100011000100101000100111000101001000101011000101101000101111000110011000110101000110111000111001000111011000111101000111111001001001011001001101001001111001010011...

result:

ok meet maximum 134925

Test #30:

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

input:

1018

output:

010100101011100101101100101110100101111100110011100110101100110110100110111100111010100111011100111101100111110100111111101010101101010111101011011101011101101011111101101101111101110111101111111110000000000100000001111111101111000001110111110000111101110000001101111110001111101100000001011111110011...

result:

ok meet maximum 510567

Test #31:

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

input:

1017

output:

010100101011100101101100101110100101111100110011100110101100110110100110111100111010100111011100111101100111110100111111101010101101010111101011011101011101101011111101101101111101110111101111111110000000000100000001111111101111000001110111110000111101110000001101111110001111101100000001011111110011...

result:

ok meet maximum 509558

Test #32:

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

input:

1209

output:

000000100100000010110000001101000000111100000100010000010011000001010100000101110000011001000001101100000111010000011111000010000100011000010010100001001110000101001000010101100001011010000101111000011000100001100110000110101000011011100001110010000111011000011110100001111110001000101000100011100010...

result:

ok meet maximum 721446

Test #33:

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

input:

1632

output:

000000100100000010110000001101000000111100000100010000010011000001010100000101110000011001000001101100000111010000011111000010000100011000010010100001001110000101001000010101100001011010000101111000011000100001100110000110101000011011100001110010000111011000011110100001111110001000101000100011100010...

result:

ok meet maximum 1318299

Test #34:

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

input:

1829

output:

000001000100000100110000010101000001011100000110010000011011000001110100000111110000100001000110000100101000010011100001010010000101011000010110100001011110000110001000011001100001101010000110111000011100100001110110000111101000011111100010001010001000111000100100100010010110001001101000100111100010...

result:

ok meet maximum 1657336

Test #35:

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

input:

3187

output:

000000010010000000101100000001101000000011110000001000100000010011000000101010000001011100000011001000000110110000001110100000011111000001000010000010001100000100101000001001110000010100100000101011000001011010000010111100000110001000001100110000011010100000110111000001110010000011101100000111101000...

result:

ok meet maximum 5049170

Test #36:

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

input:

2138

output:

000000000110000000010100000000111000000010010000000101100000001101000000011110000001000100000010011000000101010000001011100000011001000000110110000001110100000011111000001000010000010001100000100101000001001110000010100100000101011000001011010000010111100000110001000001100110000011010100000110111000...

result:

ok meet maximum 2267222

Test #37:

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

input:

4030

output:

000011001010000110011100001101001000011010110000110110100001101111000011100010000111001100001110101000011101110000111100100001111011000011111010000111111100010001001000100010110001000110100010001111000100100110001001010100010010111000100110010001001101100010011101000100111110001010001100010100101000...

result:

ok meet maximum 8082284

Test #38:

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

input:

6101

output:

000000001001000000001011000000001101000000001111000000010001000000010011000000010101000000010111000000011001000000011011000000011101000000011111000000100001000000100011000000100101000000100111000000101001000000101011000000101101000000101111000000110001000000110011000000110101000000110111000000111001...

result:

ok meet maximum 18549195

Test #39:

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

input:

5917

output:

000000001001000000001011000000001101000000001111000000010001000000010011000000010101000000010111000000011001000000011011000000011101000000011111000000100001000000100011000000100101000000100111000000101001000000101011000000101101000000101111000000110001000000110011000000110101000000110111000000111001...

result:

ok meet maximum 17445655

Test #40:

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

input:

6635

output:

000000001001000000001011000000001101000000001111000000010001000000010011000000010101000000010111000000011001000000011011000000011101000000011111000000100001000000100011000000100101000000100111000000101001000000101011000000101101000000101111000000110001000000110011000000110101000000110111000000111001...

result:

ok meet maximum 21943566

Test #41:

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

input:

9993

output:

000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110100000001011110000000110001000000011001100000001101010...

result:

ok meet maximum 49821572

Test #42:

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

input:

14474

output:

000000011010100000001101110000000111001000000011101100000001111010000000111111000000100000100000010000110000001000101000000100011100000010010010000001001011000000100110100000010011110000001010001000000101001100000010101010000001010111000000101100100000010110110000001011101000000101111100000011000010...

result:

ok meet maximum 104583873

Test #43:

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

input:

11534

output:

000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110100000001011110000000110001000000011001100000001101010...

result:

ok meet maximum 66388863

Test #44:

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

input:

19098

output:

000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000000101011000000001011010000000010111100000000110001000000...

result:

ok meet maximum 182141836

Test #45:

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

input:

31872

output:

000000101000010000001010001100000010100101000000101001110000001010100100000010101011000000101011010000001010111100000010110001000000101100110000001011010100000010110111000000101110010000001011101100000010111101000000101111110000001100000100000011000011000000110001010000001100011100000011001001000000...

result:

ok meet maximum 507514777

Test #46:

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

input:

27626

output:

000000010100010000000101001100000001010101000000010101110000000101100100000001011011000000010111010000000101111100000001100001000000011000110000000110010100000001100111000000011010010000000110101100000001101101000000011011110000000111000100000001110011000000011101010000000111011100000001111001000000...

result:

ok meet maximum 381257844

Test #47:

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

input:

43245

output:

000000000001001000000000001011000000000001101000000000001111000000000010001000000000010011000000000010101000000000010111000000000011001000000000011011000000000011101000000000011111000000000100001000000000100011000000000100101000000000100111000000000101001000000000101011000000000101101000000000101111...

result:

ok meet maximum 934503599

Test #48:

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

input:

34491

output:

000000000001001000000000001011000000000001101000000000001111000000000010001000000000010011000000000010101000000000010111000000000011001000000000011011000000000011101000000000011111000000000100001000000000100011000000000100101000000000100111000000000101001000000000101011000000000101101000000000101111...

result:

ok meet maximum 594380060

Test #49:

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

input:

64535

output:

000011110110101000011110110111000011110111001000011110111011000011110111101000011110111111000011111000101000011111000111000011111001001000011111001011000011111001101000011111001111000011111010001000011111010011000011111010101000011111010111000011111011001000011111011011000011111011101000011111011111...

result:

ok meet maximum 2081512994

Test #50:

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

input:

65746

output:

000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010...

result:

ok meet maximum 2160380385

Test #51:

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

input:

65861

output:

000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010...

result:

ok meet maximum 2167946005

Test #52:

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

input:

66725

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 2225209765

Test #53:

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

input:

86349

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 3726867681

Test #54:

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

input:

68454

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 2342045211

Test #55:

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

input:

112260

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 6299544960

Test #56:

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

input:

108023

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 5832941098

Test #57:

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

input:

103787

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 5384393176

Test #58:

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

input:

128710

output:

000001110111000100000111011100110000011101110101000001110111011100000111011110010000011101111011000001110111110100000111011111110000011110000101000001111000011100000111100010010000011110001011000001111000110100000111100011110000011110010001000001111001001100000111100101010000011110010111000001111001...

result:

ok meet maximum 8281268235

Test #59:

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

input:

129534

output:

000011110010010100001111001001110000111100101001000011110010101100001111001011010000111100101111000011110011000100001111001100110000111100110101000011110011011100001111001110010000111100111011000011110011110100001111001111110000111101000101000011110100011100001111010010010000111101001011000011110100...

result:

ok meet maximum 8387651991

Test #60:

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

input:

128670

output:

000001110111000100000111011100110000011101110101000001110111011100000111011110010000011101111011000001110111110100000111011111110000011110000101000001111000011100000111100010010000011110001011000001111000110100000111100011110000011110010001000001111001001100000111100101010000011110010111000001111001...

result:

ok meet maximum 8276121255

Test #61:

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

input:

154721

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 11967003302

Test #62:

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

input:

143149

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 10243718420

Test #63:

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

input:

134065

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 8984762318

Test #64:

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

input:

163454

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 13356170345

Test #65:

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

input:

139150

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 9679327553

Test #66:

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

input:

172380

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 14854850208

Test #67:

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

input:

178166

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 15868884317

Test #68:

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

input:

143651

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 10315696937

Test #69:

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

input:

198199

output:

000000000011001010000000000110011100000000001101001000000000011010110000000000110110100000000001101111000000000011100010000000000111001100000000001110101000000000011101110000000000111100100000000001111011000000000011111010000000000111111100000000010000001000000000100000110000000001000010100000000010...

result:

ok meet maximum 19638413795

Test #70:

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

input:

186272

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 17345817782

Test #71:

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

input:

198102

output:

000000000011001010000000000110011100000000001101001000000000011010110000000000110110100000000001101111000000000011100010000000000111001100000000001110101000000000011101110000000000111100100000000001111011000000000011111010000000000111111100000000010000001000000000100000110000000001000010100000000010...

result:

ok meet maximum 19619194797

Test #72:

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

input:

8201

output:

101010101101101010101111101010110101101010110111101010111011101010111101101010111111101011010111101011011011101011011101101011011111101011101011101101101011101111101011110111101011111011101011111101101011111111101101101101111101101110111101101111011101101111111101110111011111110111101111110111110111...

result:

ok meet maximum 33542145

Test #73:

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

input:

8202

output:

101010101101101010101111101010110101101010110111101010111011101010111101101010111111101011010111101011011011101011011101101011011111101011101011101101101011101111101011110111101011111011101011111101101011111111101101101101111101101110111101101111011101101111111101110111011111110111101111110111110111...

result:

ok meet maximum 33550335

Test #74:

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

input:

8203

output:

101010101101101010101111101010110101101010110111101010111011101010111101101010111111101011010111101011011011101011011101101011011111101011101011101101101011101111101011110111101011111011101011111101101011111111101101101101111101101110111101101111011101101111111101110111011111110111101111110111110111...

result:

ok meet maximum 33558526

Test #75:

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

input:

8204

output:

000000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...

result:

ok meet maximum 33566718

Test #76:

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

input:

8205

output:

000000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...

result:

ok meet maximum 33574910

Test #77:

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

input:

8206

output:

000000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...

result:

ok meet maximum 33583103

Test #78:

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

input:

16394

output:

010101010010101101010110101001010100101010110101101010100101001010101011100101010110110010101011101001010101111100101011001110010101101011001010110110100101011011110010101110011001010111010100101011101110010101111011001010111110100101011111110010110010111001011001101100101100111010010110011111001011...

result:

ok meet maximum 134193153

Test #79:

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

input:

16395

output:

101010101010110101010101111010101011011101010101110110101010111111010101101011101010110110110101011011111010101110101101010111011110101011110111010101111101101010111111110101101011011010110101111101011011011110101101110111010110111101101011011111110101110101111010111011011101011101110110101110111111...

result:

ok meet maximum 134209535

Test #80:

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

input:

16396

output:

101010101010110101010101111010101011011101010101110110101010111111010101101011101010110110110101011011111010101110101101010111011110101011110111010101111101101010111111110101101011011010110101111101011011011110101101110111010110111101101011011111110101110101111010111011011101011101110110101110111111...

result:

ok meet maximum 134225918

Test #81:

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

input:

16397

output:

000000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...

result:

ok meet maximum 134242302

Test #82:

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

input:

16398

output:

000000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...

result:

ok meet maximum 134258686

Test #83:

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

input:

16399

output:

000000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...

result:

ok meet maximum 134275071

Test #84:

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

input:

32779

output:

101010101011011010101010111110101010110101101010101101111010101011101110101010111101101010101111111010101101010110101111010101101101110101011011101101010110111111010101110101110101011101101101010111011111010101111010110101011110111101010111110111010101111110110101011111111101011010110111010110101110...

result:

ok meet maximum 536821761

Test #85:

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

input:

32780

output:

101010101011011010101010111110101010110101101010101101111010101011101110101010111101101010101111111010101101010110101111010101101101110101011011101101010110111111010101110101110101011101101101010111011111010101111010110101011110111101010111110111010101111110110101011111111101011010110111010110101110...

result:

ok meet maximum 536854527

Test #86:

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

input:

32781

output:

101010101011011010101010111110101010110101101010101101111010101011101110101010111101101010101111111010101101010110101111010101101101110101011011101101010110111111010101110101110101011101101101010111011111010101111010110101011110111101010111110111010101111110110101011111111101011010110111010110101110...

result:

ok meet maximum 536887294

Test #87:

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

input:

32782

output:

000000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...

result:

ok meet maximum 536920062

Test #88:

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

input:

32783

output:

000000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...

result:

ok meet maximum 536952830

Test #89:

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

input:

32784

output:

000000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...

result:

ok meet maximum 536985599

Test #90:

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

input:

65548

output:

010101010100101011010101011010100101010100101010110101011010101001010100101010101101011010101010010100101010101011100101010101101100101010101110100101010101111100101010110011100101010110101100101010110110100101010110111100101010111001100101010111010100101010111011100101010111101100101010111110100101...

result:

ok meet maximum 2147385345

Test #91:

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

input:

65549

output:

101010101010101101010101010111101010101011011101010101011101101010101011111101010101101011101010101101101101010101101111101010101110101101010101110111101010101111011101010101111101101010101111111101010110101011101010110101101101010110101111101010110110101101010110110111101010110111011101010110111101...

result:

ok meet maximum 2147450879

Test #92:

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

input:

65550

output:

101010101010101101010101010111101010101011011101010101011101101010101011111101010101101011101010101101101101010101101111101010101110101101010101110111101010101111011101010101111101101010101111111101010110101011101010110101101101010110101111101010110110101101010110110111101010110111011101010110111101...

result:

ok meet maximum 2147516414

Test #93:

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

input:

65551

output:

000000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...

result:

ok meet maximum 2147581950

Test #94:

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

input:

65552

output:

000000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...

result:

ok meet maximum 2147647486

Test #95:

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

input:

65553

output:

000000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...

result:

ok meet maximum 2147713023

Test #96:

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

input:

131085

output:

101010101010110110101010101011111010101010110101101010101011011110101010101110111010101010111101101010101011111110101010110101011010101011010111101010101101101110101010110111011010101011011111101010101110101110101010111011011010101011101111101010101111010110101010111101111010101011111011101010101111...

result:

ok meet maximum 8589737985

Test #97:

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

input:

131086

output:

101010101010110110101010101011111010101010110101101010101011011110101010101110111010101010111101101010101011111110101010110101011010101011010111101010101101101110101010110111011010101011011111101010101110101110101010111011011010101011101111101010101111010110101010111101111010101011111011101010101111...

result:

ok meet maximum 8589869055

Test #98:

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

input:

131087

output:

101010101010110110101010101011111010101010110101101010101011011110101010101110111010101010111101101010101011111110101010110101011010101011010111101010101101101110101010110111011010101011011111101010101110101110101010111011011010101011101111101010101111010110101010111101111010101011111011101010101111...

result:

ok meet maximum 8590000126

Test #99:

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

input:

131088

output:

000000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...

result:

ok meet maximum 8590131198

Test #100:

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

input:

131089

output:

000000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...

result:

ok meet maximum 8590262270

Test #101:

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

input:

131090

output:

000000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...

result:

ok meet maximum 8590393343

Test #102:

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

input:

8197

output:

101010101101101010101111101010110101101010110111101010111011101010111101101010111111101011010111101011011011101011011101101011011111101011101011101101101011101111101011110111101011111011101011111101101011111111101101101101111101101110111101101111011101101111111101110111011111110111101111110111110111...

result:

ok meet maximum 33509395

Test #103:

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

input:

16328

output:

010100101010101110010101011011001010101110100101010111110010101100111001010110101100101011011010010101101111001010111001100101011101010010101110111001010111101100101011111010010101111111001011001011100101100110110010110011101001011001111100101101001110010110101011001011010110100101101011110010110110...

result:

ok meet maximum 133114152

Test #104:

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

input:

32608

output:

001011011001010010111010010100101111100101001100111001010011010110010100110110100101001101111001010011100110010100111010100101001110111001010011110110010100111110100101001111111001010100101010010111001010100110110010101001110100101010011111001010101001110010101010101100101010101101001010101011110010...

result:

ok meet maximum 531233481

Test #105:

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

input:

65141

output:

001011011100101001011101100101001011110100101001011111100101001100101100101001100110100101001100111100101001101001100101001101010100101001101011100101001101101100101001101110100101001101111100101001110011100101001110101100101001110110100101001110111100101001111001100101001111010100101001111011100101...

result:

ok meet maximum 2120796035

Test #106:

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

input:

130420

output:

001011010010010100101111001001010011001100100101001101010010010100110111001001010011101100100101001111010010010100111111001001010100101100100101010011010010010101001111001001010101001100100101010101010010010101010111001001010101101100100101010111010010010101011111001001010110010100100101011001110010...

result:

ok meet maximum 8502797880

Test #107:

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

input:

8265

output:

000000000001100000000001010000000000111000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110100000001011110...

result:

ok meet maximum 34068260

Test #108:

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

input:

16508

output:

000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000000101011000000...

result:

ok meet maximum 136067031

Test #109:

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

input:

33008

output:

000000000000011000000000000101000000000000111000000000001001000000000001011000000000001101000000000001111000000000010001000000000010011000000000010101000000000010111000000000011001000000000011011000000000011101000000000011111000000000100001000000000100011000000000100101000000000100111000000000101001...

result:

ok meet maximum 544351055

Test #110:

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

input:

65964

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 2174733396

Test #111:

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

input:

131692

output:

000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000...

result:

ok meet maximum 8669480792

Test #112:

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

input:

15843

output:

000010010110100001001011110000100110001000010011001100001001101010000100110111000010011100100001001110110000100111101000010011111100001010000110000101000101000010100011100001010010010000101001011000010100110100001010011110000101010001000010101001100001010101010000101010111000010101100100001010110110...

result:

ok meet maximum 125318747

Test #113:

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

input:

31560

output:

000000101000010000001010001100000010100101000000101001110000001010100100000010101011000000101011010000001010111100000010110001000000101100110000001011010100000010110111000000101110010000001011101100000010111101000000101111110000001100000100000011000011000000110001010000001100011100000011001001000000...

result:

ok meet maximum 497623597

Test #114:

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

input:

64241

output:

000001001001001000001001001011000001001001101000001001001111000001001010001000001001010011000001001010101000001001010111000001001011001000001001011011000001001011101000001001011111000001001100001000001001100011000001001100101000001001100111000001001101001000001001101011000001001101101000001001101111...

result:

ok meet maximum 2062587185

Test #115:

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

input:

73307

output:

000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100101000000000010011100000000001010010000000000101011000000000010...

result:

ok meet maximum 2685953056

Test #116:

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

input:

129593

output:

000011110010010100001111001001110000111100101001000011110010101100001111001011010000111100101111000011110011000100001111001100110000111100110101000011110011011100001111001110010000111100111011000011110011110100001111001111110000111101000101000011110100011100001111010010010000111101001011000011110100...

result:

ok meet maximum 8395295323