QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#454827 | #5434. Binary Substrings | wsyear | AC ✓ | 7ms | 17928kb | C++17 | 2.6kb | 2024-06-25 14:54:01 | 2024-06-25 14:54:01 |
Judging History
answer
#include <bits/stdc++.h>
#define rep(i, j, k) for (int i = (j); i <= (k); ++i)
#define per(i, j, k) for (int i = (j); i >= (k); --i)
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
#define gc getchar
#define pc putchar
using ll = long long;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;
using namespace std;
template <class T = int> T read() {
T x = 0; bool f = 0; char ch = gc();
while (!isdigit(ch)) f = ch == '-', ch = gc();
while (isdigit(ch)) x = (x << 3) + (x << 1) + (ch ^ 48), ch = gc();
return f ? -x: x;
}
template <class T> void write(T x) {
if (x >= 0) { if (x > 9) write(x / 10); pc(x % 10 + 48); }
else { pc('-'); if (x < -9) write(-x / 10); pc(48 - x % 10); }
}
const int N = 1000010;
int n, k, fa[N], to[N], val[N], sz[N], tar[N];
int find(int x) {
return fa[x] == x ? x : fa[x] = find(fa[x]);
}
void merge(int x, int y) {
x = find(x), y = find(y);
if (x == y) return;
fa[x] = y, sz[y] += sz[x];
}
void print(int x) {
per (i, k, 1) write(x >> i & 1);
rep (i, 1, n - k) write(x & 1), x = tar[x];
}
int main() {
n = read();
if (n == 1) return puts("0"), 0;
if (n == 2) return puts("01"), 0;
while ((1 << (k + 1)) + k < n) k++;
rep (i, 0, (1 << k) - 1) fa[i] = i;
rep (i, 0, (1 << (k - 1)) - 1) {
to[i] = (2 * i) & ((1 << k) - 1);
merge(i, (2 * i) & ((1 << k) - 1));
}
rep (i, (1 << (k - 1)), (1 << k) - 1) {
to[i] = (2 * i + 1) & ((1 << k) - 1);
merge(i, (2 * i + 1) & ((1 << k) - 1));
}
rep (i, 0, (1 << (k - 1)) - 1) {
int u = i, v = i + (1 << (k - 1));
int uu = (2 * u) & ((1 << k) - 1);
int vv = (2 * v + 1) & ((1 << k) - 1);
if (find(u) == find(v)) continue;
to[u] = vv, to[v] = uu, merge(u, v);
}
rep (i, 0, (1 << k) - 1) val[i] = (i << 1 | (to[i] & 1));
rep (i, 0, (1 << k) - 1) tar[val[i]] = val[to[i]];
rep (i, 0, (1 << k) - 1) {
int u = i, v = i + (1 << k);
int uu = (2 * u) & ((1 << (k + 1)) - 1);
int vv = (2 * v + 1) & ((1 << (k + 1)) - 1);
if (tar[u]) tar[v] = uu ^ vv ^ tar[u];
else if (tar[v]) tar[u] = vv ^ uu ^ tar[v];
}
rep (i, 0, (1 << (k + 1)) - 1) fa[i] = i, sz[i] = 1;
rep (i, 0, (1 << (k + 1)) - 1) merge(i, tar[i]);
if (sz[find(val[0])] >= n - k) return print(val[0]), 0;
rep (i, 0, (1 << k) - 1) {
int u = i, v = i + (1 << k);
if (find(u) == find(v)) continue;
swap(tar[u], tar[v]);
if (sz[find(u)] < sz[find(v)]) swap(u, v);
merge(u, v);
if (sz[find(u)] >= n - k) return print(tar[v]), 0;
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3564kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 9752kb
input:
5
output:
10011
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 1ms
memory: 9748kb
input:
3
output:
010
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 1ms
memory: 9748kb
input:
4
output:
0100
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 0ms
memory: 9668kb
input:
6
output:
001100
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 1ms
memory: 9748kb
input:
7
output:
0011000
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 1ms
memory: 9708kb
input:
8
output:
01100010
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 1ms
memory: 9740kb
input:
9
output:
011000101
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 0ms
memory: 9664kb
input:
10
output:
1100010111
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 0ms
memory: 9844kb
input:
11
output:
00011101000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 1ms
memory: 9664kb
input:
12
output:
000111010000
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 6ms
memory: 14700kb
input:
200000
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 0ms
memory: 9848kb
input:
24
output:
000111101100101000001001
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 0ms
memory: 9708kb
input:
35
output:
00011110110010100000100110101110001
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 1ms
memory: 9784kb
input:
30
output:
000111101100101000001001101011
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 1ms
memory: 9860kb
input:
45
output:
000011111011100110001011010100100000010011101
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 1ms
memory: 9784kb
input:
66
output:
000011111011100110001011010100100000010011101000110110010101111000
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 1ms
memory: 9848kb
input:
50
output:
00001111101110011000101101010010000001001110100011
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 0ms
memory: 9848kb
input:
80
output:
00000111111011110011100011011010011000010111010110010101000100100000001000111011
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 1ms
memory: 9744kb
input:
107
output:
00000111111011110011100011011010011000010111010110010101000100100000001000111011000101001011011100100111101
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 1ms
memory: 9752kb
input:
81
output:
000001111110111100111000110110100110000101110101100101010001001000000010001110110
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 1ms
memory: 9744kb
input:
147
output:
000000111111101111100111100011101001110000110111011011001101000110000010111101011100101100010101101010100101000010011001001000100000000100011110110
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 0ms
memory: 9844kb
input:
255
output:
000000111111101111100111100011101001110000110111011011001101000110000010111101011100101100010101101010100101000010011001001000100000000100011110110000101001101101001001111101000001100111011100010010111010100010110111100100001110011000110101100101010111111
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 1ms
memory: 9748kb
input:
173
output:
00000011111110111110011110001110100111000011011101101100110100011000001011110101110010110001010110101010010100001001100100100010000000010001111011000010100110110100100111110
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 1ms
memory: 9752kb
input:
288
output:
000000011111111011111100111110001111010011110000111011101100111010001110000011011110110111001101100011010100110100001100110010001100000010111110101111001011100010110110101101001011000010101110101011001010101000101000001001110010011000100101001001000010001000000000100001111001100001101001
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 1ms
memory: 9856kb
input:
407
output:
000000011111111011111100111110001111010011110000111011101100111010001110000011011110110111001101100011010100110100001100110010001100000010111110101111001011100010110110101101001011000010101110101011001010101000101000001001110010011000100101001001000010001000000000100001111001100001101001100111101110...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 1ms
memory: 9772kb
input:
349
output:
000000011111111011111100111110001111010011110000111011101100111010001110000011011110110111001101100011010100110100001100110010001100000010111110101111001011100010110110101101001011000010101110101011001010101000101000001001110010011000100101001001000010001000000000100001111001100001101001100111101110...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 1ms
memory: 9776kb
input:
526
output:
000000001111111110111111100111111000111110100111110000111101100111101000111100000111011110111011100111011000111010100111010000111001000111000000110111110110111100110111000110110110100110110000110101100110101000110100000110011100110011000110010000110000000101111110101111100101111000101110110101110100...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 0ms
memory: 9772kb
input:
1018
output:
000000101111110101111100101111000101110110101110100101110000101101110101101100101101000101100000101011110101011100101011000101010110101010100101010000101001100101001000101000000100111100100111000100110100100110000100101100100101000100100100000100011000100010000100000000001000011111001100000110100111...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 1ms
memory: 9796kb
input:
1017
output:
000000101111110101111100101111000101110110101110100101110000101101110101101100101101000101100000101011110101011100101011000101010110101010100101010000101001100101001000101000000100111100100111000100110100100110000100101100100101000100100100000100011000100010000100000000001000011111001100000110100111...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 1ms
memory: 9864kb
input:
1209
output:
000000000111111111101111111100111111100011111101001111110000111110110011111010001111100000111101111011100111101100011110101001111010000111100100011110000001110111110111011110011101110001110110100111011000011101011001110101000111010000011100111001100011100100001110000000110111111011011111001101111000...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 1ms
memory: 9720kb
input:
1632
output:
000000001111111111011111111001111111000111111010011111100001111101100111110100011111000001111011110111001111011000111101010011110100001111001000111100000011101111101110111100111011100011101101001110110000111010110011101010001110100000111001110011000111001000011100000001101111110110111110011011110001...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 1ms
memory: 9756kb
input:
1829
output:
000000001111111111011111111001111111000111111010011111100001111101100111110100011111000001111011110111001111011000111101010011110100001111001000111100000011101111101110111100111011100011101101001110110000111010110011101010001110100000111001110011000111001000011100000001101111110110111110011011110001...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 1ms
memory: 9816kb
input:
3187
output:
000000000011111111111011111111100111111110001111111010011111110000111111011001111110100011111100000111110111001111101100011111010100111110100001111100100011111000000111101111101111011110011110111000111101101001111011000011110101100111101010001111010000011110011000111100100001111000000011101111110111...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 0ms
memory: 9780kb
input:
2138
output:
000000000011111111111011111111100111111110001111111010011111110000111111011001111110100011111100000111110111001111101100011111010100111110100001111100100011111000000111101111101111011110011110111000111101101001111011000011110101100111101010001111010000011110011000111100100001111000000011101111110111...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 1ms
memory: 9696kb
input:
4030
output:
000011001111100110011110001100111010011001110000110011011001100110100011001100000110010110001100101000011001001000110010000001100011100011000110000110001000001100000000010111111110101111111001011111100010111110110101111101001011111000010111101110101111011001011110100010111100000101110111101011101110...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 1ms
memory: 9732kb
input:
6101
output:
000000000101111111110101111111100101111111000101111110110101111110100101111110000101111101110101111101100101111101000101111100000101111011110101111011100101111011000101111010100101111010000101111001100101111001000101111000000101110111110101110111100101110111000101110110110101110110100101110110000101...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 0ms
memory: 9916kb
input:
5917
output:
000000000101111111110101111111100101111111000101111110110101111110100101111110000101111101110101111101100101111101000101111100000101111011110101111011100101111011000101111010100101111010000101111001100101111001000101111000000101110111110101110111100101110111000101110110110101110110100101110110000101...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 1ms
memory: 9772kb
input:
6635
output:
000000000101111111110101111111100101111111000101111110110101111110100101111110000101111101110101111101100101111101000101111100000101111011110101111011100101111011000101111010100101111010000101111001100101111001000101111000000101110111110101110111100101110111000101110110110101110110100101110110000101...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 1ms
memory: 9844kb
input:
9993
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 1ms
memory: 11804kb
input:
14474
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 1ms
memory: 9876kb
input:
11534
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 1ms
memory: 9916kb
input:
19098
output:
000000000000111111111111110111111111111001111111111100011111111110100111111111100001111111110110011111111101000111111111000001111111101110011111111011000111111110101001111111101000011111111001000111111110000001111111011110011111110111000111111101101001111111011000011111110101100111111101010001111111...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 2ms
memory: 12048kb
input:
31872
output:
000000000101011111111101010111111110010101111111000101011111101101010111111010010101111110000101011111011101010111110110010101111101000101011111000001010111101111010101111011100101011110110001010111101011010101111010100101011110100001010111100110010101111001000101011110000001010111011111010101110111...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 1ms
memory: 10064kb
input:
27626
output:
000000000011011111111110110111111111001101111111100011011111110100110111111100001101111110111011011111101100110111111010001101111110000011011111011110110111110111001101111101100011011111010100110111110100001101111100100011011111000000110111101111101101111011110011011110111000110111101101001101111011...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 2ms
memory: 10224kb
input:
43245
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 2ms
memory: 10248kb
input:
34491
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 2ms
memory: 10180kb
input:
64535
output:
000000000000101111111111110101111111111100101111111111000101111111110110101111111110100101111111110000101111111101110101111111101100101111111101000101111111100000101111111011110101111111011100101111111011000101111111010100101111111010000101111111001100101111111001000101111111000000101111110111110101...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 0ms
memory: 12612kb
input:
65746
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 0ms
memory: 10736kb
input:
65861
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 0ms
memory: 16960kb
input:
66725
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 0ms
memory: 14792kb
input:
86349
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 0ms
memory: 10732kb
input:
68454
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 0ms
memory: 10728kb
input:
112260
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 4ms
memory: 10692kb
input:
108023
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 4ms
memory: 12376kb
input:
103787
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 4ms
memory: 10876kb
input:
128710
output:
000000000001000111111111000100011111111000010001111111010001000111111100000100011111101100010001111110100001000111111001000100011111100000010001111101110001000111110110000100011111010100010001111101000001000111110011000100011111001000010001111100000001000111101111000100011110111000010001111011010001...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 3ms
memory: 10808kb
input:
129534
output:
000000001100000111100000110000011100000011000001101000001100000110000000110000010100000011000001000000001100000011000000100000001100000000000000101111111111111010111111111111001011111111111000101111111111011010111111111101001011111111110000101111111110111010111111111011001011111111101000101111111110...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 4ms
memory: 14872kb
input:
128670
output:
000000000001000111111111000100011111111000010001111111010001000111111100000100011111101100010001111110100001000111111001000100011111100000010001111101110001000111110110000100011111010100010001111101000001000111110011000100011111001000010001111100000001000111101111000100011110111000010001111011010001...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 3ms
memory: 13728kb
input:
154721
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 6ms
memory: 17928kb
input:
143149
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 6ms
memory: 15436kb
input:
134065
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 7ms
memory: 17900kb
input:
163454
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 3ms
memory: 14736kb
input:
139150
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 0ms
memory: 15628kb
input:
172380
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 6ms
memory: 14704kb
input:
178166
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 3ms
memory: 17076kb
input:
143651
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 0ms
memory: 14904kb
input:
198199
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 0ms
memory: 14760kb
input:
186272
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 3ms
memory: 13844kb
input:
198102
output:
000000000000000111111111111111110111111111111111001111111111111100011111111111110100111111111111100001111111111110110011111111111101000111111111111000001111111111101110011111111111011000111111111110101001111111111101000011111111111001000111111111110000001111111111011110011111111110111000111111111101...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 1ms
memory: 11972kb
input:
8201
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 1ms
memory: 9772kb
input:
8202
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 1ms
memory: 9768kb
input:
8203
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 0ms
memory: 9852kb
input:
8204
output:
111111111111011111111110011111111100011111111010011111111000011111110110011111110100011111110000011111101110011111101100011111101010011111101000011111100100011111100000011111011111011110011111011100011111011010011111011000011111010110011111010100011111010000011111001100011111001000011111000000011110...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 1ms
memory: 9920kb
input:
8205
output:
000000000000011111111111110111111111110011111111110001111111110100111111111000011111111011001111111101000111111110000011111110111001111111011000111111101010011111110100001111111001000111111100000011111101111001111110111000111111011010011111101100001111110101100111111010100011111101000001111110011000...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 1ms
memory: 12020kb
input:
8206
output:
000000000000011111111111110111111111110011111111110001111111110100111111111000011111111011001111111101000111111110000011111110111001111111011000111111101010011111110100001111111001000111111100000011111101111001111110111000111111011010011111101100001111110101100111111010100011111101000001111110011000...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 1ms
memory: 9976kb
input:
16394
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 1ms
memory: 11784kb
input:
16395
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 1ms
memory: 9980kb
input:
16396
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 1ms
memory: 9880kb
input:
16397
output:
111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001111110010000...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 1ms
memory: 10112kb
input:
16398
output:
000000000000001111111111111101111111111110011111111111000111111111101001111111111000011111111101100111111111010001111111110000011111111011100111111110110001111111101010011111111010000111111110010001111111100000011111110111100111111101110001111111011010011111110110000111111101011001111111010100011111...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 2ms
memory: 12068kb
input:
16399
output:
000000000000001111111111111101111111111110011111111111000111111111101001111111111000011111111101100111111111010001111111110000011111111011100111111110110001111111101010011111111010000111111110010001111111100000011111110111100111111101110001111111011010011111110110000111111101011001111111010100011111...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 2ms
memory: 11968kb
input:
32779
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 0ms
memory: 12008kb
input:
32780
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 0ms
memory: 9976kb
input:
32781
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 0ms
memory: 9920kb
input:
32782
output:
111111111111110111111111111001111111111100011111111110100111111111100001111111110110011111111101000111111111000001111111101110011111111011000111111110101001111111101000011111111001000111111110000001111111011110011111110111000111111101101001111111011000011111110101100111111101010001111111010000011111...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 0ms
memory: 12260kb
input:
32783
output:
000000000000000111111111111111011111111111110011111111111100011111111111010011111111111000011111111110110011111111110100011111111110000011111111101110011111111101100011111111101010011111111101000011111111100100011111111100000011111111011110011111111011100011111111011010011111111011000011111111010110...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 2ms
memory: 12084kb
input:
32784
output:
000000000000000111111111111111011111111111110011111111111100011111111111010011111111111000011111111110110011111111110100011111111110000011111111101110011111111101100011111111101010011111111101000011111111100100011111111100000011111111011110011111111011100011111111011010011111111011000011111111010110...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 3ms
memory: 12104kb
input:
65548
output:
000001000011101100001000011101000001000011100100001000011100000001000011011100001000011011000001000011010100001000011010000001000011001100001000011001000001000011000100001000011000000001000010111100001000010111000001000010110100001000010110000001000010101100001000010101000001000010100100001000010100...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 2ms
memory: 12304kb
input:
65549
output:
000001000011101100001000011101000001000011100100001000011100000001000011011100001000011011000001000011010100001000011010000001000011001100001000011001000001000011000100001000011000000001000010111100001000010111000001000010110100001000010110000001000010101100001000010101000001000010100100001000010100...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 2ms
memory: 10300kb
input:
65550
output:
000001000011101100001000011101000001000011100100001000011100000001000011011100001000011011000001000011010100001000011010000001000011001100001000011001000001000011000100001000011000000001000010111100001000010111000001000010110100001000010110000001000010101100001000010101000001000010100100001000010100...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 0ms
memory: 10180kb
input:
65551
output:
111111111111111011111111111110011111111111100011111111111010011111111111000011111111110110011111111110100011111111110000011111111101110011111111101100011111111101010011111111101000011111111100100011111111100000011111111011110011111111011100011111111011010011111111011000011111111010110011111111010100...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 0ms
memory: 10788kb
input:
65552
output:
000000000000000011111111111111110111111111111110011111111111110001111111111110100111111111111000011111111111011001111111111101000111111111110000011111111110111001111111111011000111111111101010011111111110100001111111111001000111111111100000011111111101111001111111110111000111111111011010011111111101...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 3ms
memory: 12756kb
input:
65553
output:
000000000000000011111111111111110111111111111110011111111111110001111111111110100111111111111000011111111111011001111111111101000111111111110000011111111110111001111111111011000111111111101010011111111110100001111111111001000111111111100000011111111101111001111111110111000111111111011010011111111101...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 4ms
memory: 10688kb
input:
131085
output:
000000001101101111111110110110111111110011011011111110001101101111110100110110111111000011011011111011101101101111101100110110111110100011011011111000001101101111011110110110111101110011011011110110001101101111010100110110111101000011011011110010001101101111000000110110111011111011011011101111001101...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 3ms
memory: 10768kb
input:
131086
output:
000000001101101111111110110110111111110011011011111110001101101111110100110110111111000011011011111011101101101111101100110110111110100011011011111000001101101111011110110110111101110011011011110110001101101111010100110110111101000011011011110010001101101111000000110110111011111011011011101111001101...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 0ms
memory: 14968kb
input:
131087
output:
000000001101101111111110110110111111110011011011111110001101101111110100110110111111000011011011111011101101101111101100110110111110100011011011111000001101101111011110110110111101110011011011110110001101101111010100110110111101000011011011110010001101101111000000110110111011111011011011101111001101...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 4ms
memory: 14884kb
input:
131088
output:
111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011000011111111101...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 6ms
memory: 15316kb
input:
131089
output:
000000000000000001111111111111111101111111111111110011111111111111000111111111111101001111111111111000011111111111101100111111111111010001111111111110000011111111111011100111111111110110001111111111101010011111111111010000111111111110010001111111111100000011111111110111100111111111101110001111111111...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 3ms
memory: 17084kb
input:
131090
output:
000000000000000001111111111111111101111111111111110011111111111111000111111111111101001111111111111000011111111111101100111111111111010001111111111110000011111111111011100111111111110110001111111111101010011111111111010000111111111110010001111111111100000011111111110111100111111111101110001111111111...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 1ms
memory: 11864kb
input:
8197
output:
000001011111111101011111111001011111110001011111101101011111101001011111100001011111011101011111011001011111010001011111000001011110111101011110111001011110110001011110101001011110100001011110011001011110010001011110000001011101111101011101111001011101110001011101101101011101101001011101100001011101...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 0ms
memory: 11932kb
input:
16328
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 1ms
memory: 10040kb
input:
32608
output:
000000011010111111100110101111110001101011111010011010111110000110101111011001101011110100011010111100000110101110111001101011101100011010111010100110101110100001101011100100011010111000000110101101111001101011011100011010110110100110101101100001101011010110011010110101000110101101000001101011001110...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 2ms
memory: 10304kb
input:
65141
output:
000000000000101111111111110101111111111100101111111111000101111111110110101111111110100101111111110000101111111101110101111111101100101111111101000101111111100000101111111011110101111111011100101111111011000101111111010100101111111010000101111111001100101111111001000101111111000000101111110111110101...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 4ms
memory: 12740kb
input:
130420
output:
000000001100010111110000110001011110000011000101110100001100010111000000110001011011000011000101101000001100010110010000110001011000000011000101011100001100010101100000110001010101000011000101010000001100010100110000110001010010000011000101000100001100010100000000110001001111000011000100111000001100...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 1ms
memory: 9892kb
input:
8265
output:
000000000000111111111111101111111111100111111111100011111111101001111111110000111111110110011111111010001111111100000111111101110011111110110001111111010100111111101000011111110010001111111000000111111011110011111101110001111110110100111111011000011111101011001111110101000111111010000011111100110001...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 2ms
memory: 11892kb
input:
16508
output:
000000000000011111111111111011111111111100111111111110001111111111010011111111110000111111111011001111111110100011111111100000111111110111001111111101100011111111010100111111110100001111111100100011111111000000111111101111001111111011100011111110110100111111101100001111111010110011111110101000111111...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 2ms
memory: 10372kb
input:
33008
output:
000000000000001111111111111110111111111111100111111111111000111111111110100111111111110000111111111101100111111111101000111111111100000111111111011100111111111011000111111111010100111111111010000111111111001000111111111000000111111110111100111111110111000111111110110100111111110110000111111110101100...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 0ms
memory: 14428kb
input:
65964
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 6ms
memory: 17128kb
input:
131692
output:
000000000000000011111111111111111011111111111111100111111111111110001111111111111010011111111111110000111111111111011001111111111110100011111111111100000111111111110111001111111111101100011111111111010100111111111110100001111111111100100011111111111000000111111111101111001111111111011100011111111110...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 0ms
memory: 9896kb
input:
15843
output:
000000001101111111110110111111110011011111110001101111110100110111111000011011111011101101111101100110111110100011011111000001101111011110110111101110011011110110001101111010100110111101000011011110010001101111000000110111011111011011101111001101110111000110111011010011011101100001101110101100110111...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 0ms
memory: 11828kb
input:
31560
output:
000000000011111111111111011111111111100111111111110001111111111010011111111110000111111111011001111111110100011111111100000111111110111001111111101100011111111010100111111110100001111111100100011111111000000111111101111001111111011100011111110110100111111101100001111111010110011111110101000111111101...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 2ms
memory: 12320kb
input:
64241
output:
000000000000101111111111110101111111111100101111111111000101111111110110101111111110100101111111110000101111111101110101111111101100101111111101000101111111100000101111111011110101111111011100101111111011000101111111010100101111111010000101111111001100101111111001000101111111000000101111110111110101...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 3ms
memory: 10792kb
input:
73307
output:
000000000000000111111111111111101111111111111100111111111111100011111111111101001111111111110000111111111110110011111111111010001111111111100000111111111101110011111111110110001111111111010100111111111101000011111111110010001111111111000000111111111011110011111111101110001111111110110100111111111011...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 0ms
memory: 14556kb
input:
129593
output:
000000001100000111100000110000011100000011000001101000001100000110000000110000010100000011000001000000001100000011000000100000001100000000000000101111111111111010111111111111001011111111111000101111111111011010111111111101001011111111110000101111111110111010111111111011001011111111101000101111111110...
result:
ok meet maximum 8395295323