QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#398300 | #5434. Binary Substrings | caijianhong | AC ✓ | 68ms | 31644kb | C++20 | 2.4kb | 2024-04-25 10:30:42 | 2024-04-25 10:30:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define debug(...) fprintf(stderr, ##__VA_ARGS__)
#else
#define endl "\n"
#define debug(...) void(0)
#endif
typedef long long LL;
int n, k, to[1000010], repr[1000010], bel[1000010], siz[1000010];
vector<int> g[1000010];
vector<int> ans;
void dfs(int u) {
while (!g[u].empty()) {
int v = g[u].back();
g[u].pop_back();
dfs(v);
ans.push_back(v & 1);
}
}
int main() {
#ifndef LOCAL
cin.tie(nullptr)->sync_with_stdio(false);
#endif
cin >> n;
if (n == 1) return cout << "1" << endl, 0;
if (n == 2) return cout << "10" << endl, 0;
while (k + (1 << (k + 1)) <= n) ++k;
int pk1 = 1 << (k - 1), pk2 = pk1 << 2, pk = pk2 >> 1;
for (int i = 0; i < pk1; i++) {
g[i] = {(i << 1 | 1) % pk1, (i << 1) % pk1};
}
dfs(0);
reverse(ans.begin(), ans.end());
ans.insert(ans.begin(), k - 1, 0);
for (int x : ans) cerr << x;
cerr << endl;
memset(to, -1, sizeof to);
int lst = 0;
for (int i = 0, now = 0; i < ans.size(); i++) {
now = (now << 1 | ans[i]) % pk2;
if (i >= k) to[lst] = now;
lst = now;
}
to[lst] = (lst << 1) % pk2;
for (int i = 0; i < pk; i++) {
if (~to[i] && to[i + pk] == -1) to[i + pk] = to[i] ^ 1;
if (~to[i + pk] && to[i] == -1) to[i] = to[i + pk] ^ 1;
}
memset(repr, -1, sizeof repr);
memset(bel, -1, sizeof bel);
for (int i = 0; i < pk2; i++) {
if (~repr[i]) continue;
bel[i] = i;
for (int j = i; repr[j] == -1; j = to[j]) repr[j] = i, siz[i] += 1;
}
for (int i = 0; i < pk; i++) {
if (bel[repr[i]] != bel[repr[i + pk]]) {
int u = repr[i], v = repr[i + pk], flag = false;
if (bel[v] == 0) swap(u, v), flag = true;
if (bel[u] == 0 && siz[u] >= n - k + 1) continue;
bel[v] = u;
siz[u] += siz[v];
swap(to[i], to[i + pk]);
if (bel[u] == 0 && siz[u] >= n - k + 1) {
ans.clear();
for (int j = k - 2; j >= 0; j--) ans.push_back((i + pk * !flag) >> j & 1);
for (int now = to[i + pk * !flag]; ans.size() < n; now = to[now]) ans.push_back(now & 1);
for (int x : ans) cout << x;
cout << endl;
return 0;
}
}
}
ans.assign(k - 1, 0);
for (int now = 0; ans.size() < n; now = to[now]) ans.push_back(now & 1);
for (int x : ans) cout << x;
cout << endl;
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3720kb
input:
2
output:
10
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 16856kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 1ms
memory: 3716kb
input:
1
output:
1
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 0ms
memory: 17128kb
input:
3
output:
011
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 0ms
memory: 16764kb
input:
4
output:
0110
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 0ms
memory: 17368kb
input:
6
output:
001100
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 0ms
memory: 15392kb
input:
7
output:
1100010
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 0ms
memory: 16872kb
input:
8
output:
11000101
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 4ms
memory: 15380kb
input:
9
output:
100010111
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 4ms
memory: 16752kb
input:
10
output:
0001011100
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 4ms
memory: 16368kb
input:
11
output:
00010111000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 4ms
memory: 15700kb
input:
12
output:
010111000011
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 68ms
memory: 30172kb
input:
200000
output:
000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000101011000000000001011010000000000010111100000000000110001000000000001100110000000000011010100000000000110111000000000001110010000000000011...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 4ms
memory: 16396kb
input:
24
output:
001001101011110000011101
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 0ms
memory: 17144kb
input:
35
output:
11100000111011001010001001101011111
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 0ms
memory: 16700kb
input:
30
output:
001001101011110000011101100101
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 0ms
memory: 15744kb
input:
45
output:
000100011001010011101011011111000000111101100
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 4ms
memory: 15572kb
input:
66
output:
101001110101101111100000011110110001011100110100001001000110010101
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 0ms
memory: 15564kb
input:
50
output:
00010001100101001110101101111100000011110110001011
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 0ms
memory: 15484kb
input:
80
output:
00001000011000101000111001001011001101001111010101110110111111000000011111011100
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 0ms
memory: 17088kb
input:
107
output:
00001000011000101000111001001011001101001111010101110110111111000000011111011100011011000010111100111010000
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 0ms
memory: 15708kb
input:
81
output:
000010000110001010001110010010110011010011110101011101101111110000000111110111000
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 0ms
memory: 16780kb
input:
147
output:
000001000001100001010000111000100100010110001101000111100100110010101001011100110110011101001111101010110101111011011101111111000000001111110111000
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 4ms
memory: 15824kb
input:
255
output:
000100000110000101000011100010010001011000110100011110010011001010100101110011011001110100111110101011010111101101110111111100000000111111011100001101111000111011000001011111001111010000001001110010110110100100101001101010001000110011000101011101011001000
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 0ms
memory: 16684kb
input:
173
output:
00000100000110000101000011100010010001011000110100011110010011001010100101110011011001110100111110101011010111101101110111111100000000111111011100001101111000111011000001011
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 5ms
memory: 17460kb
input:
288
output:
000000100000011000001010000011100001001000010110000110100001111000100010011000101010001011100011001000110110001110100011111001001010010011100101011001011010010111100110011010100110111001110110011110100111111010101011101011011010111110110111101110111111110000000001111111011110000111011100
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 0ms
memory: 15964kb
input:
407
output:
000010000001100000101000001110000100100001011000011010000111100010001001100010101000101110001100100011011000111010001111100100101001001110010101100101101001011110011001101010011011100111011001111010011111101010101110101101101011111011011110111011111111000000000111111101111000011101110000011011111000...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 0ms
memory: 16916kb
input:
349
output:
000010000001100000101000001110000100100001011000011010000111100010001001100010101000101110001100100011011000111010001111100100101001001110010101100101101001011110011001101010011011100111011001111010011111101010101110101101101011111011011110111011111111000000000111111101111000011101110000011011111000...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 4ms
memory: 17192kb
input:
526
output:
000000010000000110000001010000001110000010010000010110000011010000011110000100010000100110000101010000101110000110010000110110000111010000111110001000110001001010001001110001010010001010110001011010001011110001100110001101010001101110001110010001110110001111010001111110010010010110010011010010011110...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 0ms
memory: 16156kb
input:
1018
output:
010100100010101100010110100010111100011001100011010100011011100011100100011101100011110100011111100100100101100100110100100111100101001100101010100101011100101101100101110100101111100110011100110101100110110100110111100111010100111011100111101100111110100111111101010101101010111101011011101011101101...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 4ms
memory: 16756kb
input:
1017
output:
010100100010101100010110100010111100011001100011010100011011100011100100011101100011110100011111100100100101100100110100100111100101001100101010100101011100101101100101110100101111100110011100110101100110110100110111100111010100111011100111101100111110100111111101010101101010111101011011101011101101...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 2ms
memory: 16472kb
input:
1209
output:
000000100000000110000000101000000011100000010010000001011000000110100000011110000010001000001001100000101010000010111000001100100000110110000011101000001111100001000010001100001001010000100111000010100100001010110000101101000010111100001100010000110011000011010100001101110000111001000011101100001111...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 0ms
memory: 16980kb
input:
1632
output:
000000100000000110000000101000000011100000010010000001011000000110100000011110000010001000001001100000101010000010111000001100100000110110000011101000001111100001000010001100001001010000100111000010100100001010110000101101000010111100001100010000110011000011010100001101110000111001000011101100001111...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 5ms
memory: 16608kb
input:
1829
output:
000001000000001100000001010000000111000000100100000010110000001101000000111100000100010000010011000001010100000101110000011001000001101100000111010000011111000010000100011000010010100001001110000101001000010101100001011010000101111000011000100001100110000110101000011011100001110010000111011000011110...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 0ms
memory: 17192kb
input:
3187
output:
000000010000000001100000000101000000001110000000100100000001011000000011010000000111100000010001000000100110000001010100000010111000000110010000001101100000011101000000111110000010000100000100011000001001010000010011100000101001000001010110000010110100000101111000001100010000011001100000110101000001...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 3ms
memory: 16516kb
input:
2138
output:
000000000100000000011000000001010000000011100000001001000000010110000000110100000001111000000100010000001001100000010101000000101110000001100100000011011000000111010000001111100000100001000001000110000010010100000100111000001010010000010101100000101101000001011110000011000100000110011000001101010000...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 3ms
memory: 17192kb
input:
4030
output:
000011001000000110110000001110100000011111000001000010000010001100000100101000001001110000010100100000101011000001011010000010111100000110001000001100110000011010100000110111000001110010000011101100000111101000001111110000100001100001000101000010001110000100100100001001011000010011010000100111100001...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 0ms
memory: 17100kb
input:
6101
output:
000000001000000000011000000000101000000000111000000001001000000001011000000001101000000001111000000010001000000010011000000010101000000010111000000011001000000011011000000011101000000011111000000100001000000100011000000100101000000100111000000101001000000101011000000101101000000101111000000110001000...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 6ms
memory: 17084kb
input:
5917
output:
000000001000000000011000000000101000000000111000000001001000000001011000000001101000000001111000000010001000000010011000000010101000000010111000000011001000000011011000000011101000000011111000000100001000000100011000000100101000000100111000000101001000000101011000000101101000000101111000000110001000...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 3ms
memory: 15988kb
input:
6635
output:
000000001000000000011000000000101000000000111000000001001000000001011000000001101000000001111000000010001000000010011000000010101000000010111000000011001000000011011000000011101000000011111000000100001000000100011000000100101000000100111000000101001000000101011000000101101000000101111000000110001000...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 3ms
memory: 17272kb
input:
9993
output:
000000000100000000000110000000000101000000000011100000000010010000000001011000000000110100000000011110000000010001000000001001100000000101010000000010111000000001100100000000110110000000011101000000001111100000001000010000000100011000000010010100000001001110000000101001000000010101100000001011010000...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 8ms
memory: 16580kb
input:
14474
output:
000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101000000010111100000001100010000000110011000000011010100000001101110000000111001000...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 3ms
memory: 17512kb
input:
11534
output:
000000000100000000000110000000000101000000000011100000000010010000000001011000000000110100000000011110000000010001000000001001100000000101010000000010111000000001100100000000110110000000011101000000001111100000001000010000000100011000000010010100000001001110000000101001000000010101100000001011010000...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 4ms
memory: 18896kb
input:
19098
output:
000000000010000000000001100000000000101000000000001110000000000100100000000001011000000000011010000000000111100000000010001000000000100110000000001010100000000010111000000000110010000000001101100000000011101000000000111110000000010000100000000100011000000001001010000000010011100000000101001000000001...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 4ms
memory: 17392kb
input:
31872
output:
000000101000000000001110011111111000010111111101111010000000100000011111100111110111110110000010000011011110011111001000011000001101110101111100100010100000110111000111110011101101111011000100100001001110100111001100010110001000111000011101101101110000100100011011110100111001000010110001001111000011...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 0ms
memory: 19268kb
input:
27626
output:
000000010100000000000111001111111100001011111110111101000000010000001111110011111011111011000001000001101111001111100100001100000110111010111110010001010000011011100011111001110110111101100010010000100111010011100110001011000100011100001110110110111000010010001101111010011100100001011000100111100001...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 12ms
memory: 19988kb
input:
43245
output:
000000000001000000000000011000000000000101000000000000111000000000001001000000000001011000000000001101000000000001111000000000010001000000000010011000000000010101000000000010111000000000011001000000000011011000000000011101000000000011111000000000100001000000000100011000000000100101000000000100111000...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 12ms
memory: 20468kb
input:
34491
output:
000000000001000000000000011000000000000101000000000000111000000000001001000000000001011000000000001101000000000001111000000000010001000000000010011000000000010101000000000010111000000000011001000000000011011000000000011101000000000011111000000000100001000000000100011000000000100101000000000100111000...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 11ms
memory: 19660kb
input:
64535
output:
000011110110100000011110111100000011111000100000011111001100000011111010100000011111011100000011111100100000011111101100000011111110100000011111111100000100000100100000100000101100000100000110100000100000111100000100001000100000100001001100000100001010100000100001011100000100001100100000100001101100...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 20ms
memory: 22896kb
input:
65746
output:
000000000000001000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 26ms
memory: 23836kb
input:
65861
output:
000000000000001000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 46ms
memory: 23800kb
input:
66725
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 12ms
memory: 24064kb
input:
86349
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 27ms
memory: 23096kb
input:
68454
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 8ms
memory: 22716kb
input:
112260
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 24ms
memory: 23212kb
input:
108023
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 23ms
memory: 23528kb
input:
103787
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 24ms
memory: 23444kb
input:
128710
output:
000001110111000000000111100100000000011110110000000001111101011111110000001001111110111110011000000100000101011111001111101011111010000001010000010111111000111110011111011000000110000000011111010000000001111111000000001000000100000000100000110000000010000101000000001000011100000000100010010000000010...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 20ms
memory: 23412kb
input:
129534
output:
000011110010010000001111001011000000111100110100000011110011110000001111010001000000111101001100000011110101010000001111010111000000111101100100000011110110110000001111011101000000111101111100000011111000010000001111100011000000111110010100000011111001110000001111101001000000111110101100000011111011...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 31ms
memory: 23664kb
input:
128670
output:
000001110111000000000111100100000000011110110000000001111101011111110000001001111110111110011000000100000101011111001111101011111010000001010000010111111000111110011111011000000110000000011111010000000001111111000000001000000100000000100000110000000010000101000000001000011100000000100010010000000010...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 44ms
memory: 30600kb
input:
154721
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 52ms
memory: 30852kb
input:
143149
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 51ms
memory: 29956kb
input:
134065
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 35ms
memory: 30600kb
input:
163454
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 55ms
memory: 30972kb
input:
139150
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 55ms
memory: 31160kb
input:
172380
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 24ms
memory: 31412kb
input:
178166
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 52ms
memory: 29572kb
input:
143651
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 43ms
memory: 30952kb
input:
198199
output:
000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000101011000000000001011010000000000010111100000000000110001000000000001100110000000000011010100000000000110111000000000001110010000000000011...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 31ms
memory: 30852kb
input:
186272
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 36ms
memory: 31644kb
input:
198102
output:
000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000010001100000000000100101000000000001001110000000000010100100000000000101011000000000001011010000000000010111100000000000110001000000000001100110000000000011010100000000000110111000000000001110010000000000011...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 0ms
memory: 17508kb
input:
8201
output:
101010101100101010110100101010111100101011001100101011010100101011011100101011101100101011110100101011111100101100101100110100101100111100101101001100101101010100101101011100101101101100101101110100101101111100101110011100101110101100101110110100101110111100101111001100101111010100101111011100101111...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 5ms
memory: 17932kb
input:
8202
output:
101010101100101010110100101010111100101011001100101011010100101011011100101011101100101011110100101011111100101100101100110100101100111100101101001100101101010100101101011100101101101100101101110100101101111100101110011100101110101100101110110100101110111100101111001100101111010100101111011100101111...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 3ms
memory: 17692kb
input:
8203
output:
111111111110000000000000111111111110111111000000111110111110000000111101111111000001111110111100000000111011111111000011111110111000000000110111111111000111111110110000000000101111111111001111111110100000000000100111111110010111111101101000000010000111111001110111110110001000001001100111100110011111...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 4ms
memory: 18144kb
input:
8204
output:
000000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 8ms
memory: 17280kb
input:
8205
output:
000000000000010000000000011000000000010100000000001110000000001001000000000101100000000011010000000001111000000001000100000000100110000000010101000000001011100000000110010000000011011000000001110100000000111110000000100001000000010001100000001001010000000100111000000010100100000001010110000000101101...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 8ms
memory: 18188kb
input:
8206
output:
000000000001000000000001100000000001010000000000111000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110100...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 8ms
memory: 17584kb
input:
16394
output:
101010101010010101010111001010101101100101010111010010101011111001010110011100101011010110010101101101001010110111100101011100110010101110101001010111011100101011110110010101111101001010111111100101100101110010110011011001011001110100101100111110010110100111001011010101100101101011010010110101111001...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 4ms
memory: 16380kb
input:
16395
output:
101010101010010101010111001010101101100101010111010010101011111001010110011100101011010110010101101101001010110111100101011100110010101110101001010111011100101011110110010101111101001010111111100101100101110010110011011001011001110100101100111110010110100111001011010101100101101011010010110101111001...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 4ms
memory: 16528kb
input:
16396
output:
111111111111000000000000001111111111110111111000000011111011111110000001111110111110000000011110111111110000011111110111100000000011101111111110000111111110111000000000011011111111110001111111110110000000000010111111111110011111111110100000000000010011111111100101111111101101000000001000011111110011...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 8ms
memory: 17460kb
input:
16397
output:
000000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 15ms
memory: 17996kb
input:
16398
output:
000000000000001000000000000110000000000010100000000000111000000000010010000000000101100000000001101000000000011110000000001000100000000010011000000000101010000000001011100000000011001000000000110110000000001110100000000011111000000001000010000000010001100000000100101000000001001110000000010100100000...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 0ms
memory: 18264kb
input:
16399
output:
000000000000100000000000011000000000001010000000000011100000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000011011000000000111010000000001111100000000100001000000001000110000000010010100000000100111000000001010010000000...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 8ms
memory: 19088kb
input:
32779
output:
101010101011001010101011010010101010111100101010110011001010101101010010101011011100101010111011001010101111010010101011111100101011001011001010110011010010101100111100101011010011001010110101010010101101011100101011011011001010110111010010101101111100101011100111001010111010110010101110110100101011...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 8ms
memory: 17328kb
input:
32780
output:
101010101011001010101011010010101010111100101010110011001010101101010010101011011100101010111011001010101111010010101011111100101011001011001010110011010010101100111100101011010011001010110101010010101101011100101011011011001010110111010010101101111100101011100111001010111010110010101110110100101011...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 7ms
memory: 18440kb
input:
32781
output:
111111111111100000000000000011111111111110111111100000001111110111111000000001111101111111100000011111110111110000000001111011111111100000111111110111100000000001110111111111100001111111110111000000000001101111111111100011111111110110000000000001011111111111100111111111110100000000000001001111111111...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 16ms
memory: 19752kb
input:
32782
output:
000000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 4ms
memory: 19716kb
input:
32783
output:
000000000000000100000000000001100000000000010100000000000011100000000000100100000000000101100000000000110100000000000111100000000001000100000000001001100000000001010100000000001011100000000001100100000000001101100000000001110100000000001111100000000010000100000000010001100000000010010100000000010011...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 12ms
memory: 19764kb
input:
32784
output:
000000000000010000000000000110000000000001010000000000001110000000000010010000000000010110000000000011010000000000011110000000000100010000000000100110000000000101010000000000101110000000000110010000000000110110000000000111010000000000111110000000001000010000000001000110000000001001010000000001001110...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 8ms
memory: 20464kb
input:
65548
output:
101010101010100101010101011100101010101101100101010101110100101010101111100101010110011100101010110101100101010110110100101010110111100101010111001100101010111010100101010111011100101010111101100101010111110100101010111111100101011001011100101011001101100101011001110100101011001111100101011010011100...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 7ms
memory: 20416kb
input:
65549
output:
101010101010100101010101011100101010101101100101010101110100101010101111100101010110011100101010110101100101010110110100101010110111100101010111001100101010111010100101010111011100101010111101100101010111110100101010111111100101011001011100101011001101100101011001110100101011001111100101011010011100...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 0ms
memory: 20936kb
input:
65550
output:
111111111111110000000000000000111111111111110111111100000000111111011111111000000011111110111111000000000111110111111111000000111111110111110000000000111101111111111000001111111110111100000000000111011111111111000011111111110111000000000000110111111111111000111111111110110000000000000101111111111111...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 36ms
memory: 22460kb
input:
65551
output:
000000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 16ms
memory: 22448kb
input:
65552
output:
000000000000000010000000000000011000000000000010100000000000001110000000000001001000000000000101100000000000011010000000000001111000000000001000100000000000100110000000000010101000000000001011100000000000110010000000000011011000000000001110100000000000111110000000000100001000000000010001100000000001...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 8ms
memory: 22628kb
input:
65553
output:
000000000000001000000000000001100000000000001010000000000000111000000000000100100000000000010110000000000001101000000000000111100000000000100010000000000010011000000000001010100000000000101110000000000011001000000000001101100000000000111010000000000011111000000000010000100000000001000110000000000100...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 31ms
memory: 24716kb
input:
131085
output:
101010101010110010101010101101001010101010111100101010101100110010101010110101001010101011011100101010101110110010101010111101001010101011111100101010110010110010101011001101001010101100111100101010110100110010101011010101001010101101011100101010110110110010101011011101001010101101111100101010111001...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 28ms
memory: 23260kb
input:
131086
output:
101010101010110010101010101101001010101010111100101010101100110010101010110101001010101011011100101010101110110010101010111101001010101011111100101010110010110010101011001101001010101100111100101010110100110010101011010101001010101101011100101010110110110010101011011101001010101101111100101010111001...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 20ms
memory: 23716kb
input:
131087
output:
111111111111111000000000000000001111111111111110111111110000000011111110111111100000000011111101111111110000000111111110111111000000000011111011111111110000001111111110111110000000000011110111111111110000011111111110111100000000000011101111111111110000111111111110111000000000000011011111111111110001...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 43ms
memory: 29980kb
input:
131088
output:
000000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 59ms
memory: 31092kb
input:
131089
output:
000000000000000001000000000000000110000000000000010100000000000000111000000000000010010000000000000101100000000000001101000000000000011110000000000001000100000000000010011000000000000101010000000000001011100000000000011001000000000000110110000000000001110100000000000011111000000000001000010000000000...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 43ms
memory: 30232kb
input:
131090
output:
000000000000000100000000000000011000000000000001010000000000000011100000000000001001000000000000010110000000000000110100000000000001111000000000000100010000000000001001100000000000010101000000000000101110000000000001100100000000000011011000000000000111010000000000001111100000000000100001000000000001...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 0ms
memory: 17268kb
input:
8197
output:
101010101100101010110100101010111100101011001100101011010100101011011100101011101100101011110100101011111100101100101100110100101100111100101101001100101101010100101101011100101101101100101101110100101101111100101110011100101110101100101110110100101110111100101111001100101111010100101111011100101111...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 4ms
memory: 17220kb
input:
16328
output:
010100101010001010010111000101001100100010100110110001010011101000101001111100010101000110001010100101000101010011100010101010010001010101011000101010110100010101011110001010110011000101011010100010101101110001010111001000101011101100010101111010001010111111000101100011100010110010010001011001011000...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 11ms
memory: 18684kb
input:
32608
output:
001011011001000010110110110000101101110100001011011111000010111000110000101110010100001011100111000010111010010000101110101100001011101101000010111011110000101111000100001011110011000010111101010000101111011100001011111001000010111110110000101111110100001011111111000011000011010000110000111100001100...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 19ms
memory: 19892kb
input:
65141
output:
001011011100100001011011101100001011011110100001011011111100001011100001100001011100010100001011100011100001011100100100001011100101100001011100110100001011100111100001011101000100001011101001100001011101010100001011101011100001011101100100001011101101100001011101110100001011101111100001011110001100...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 20ms
memory: 23936kb
input:
130420
output:
001011010010010000101101001011000010110100110100001011010011110000101101010001000010110101001100001011010101010000101101010111000010110101100100001011010110110000101101011101000010110101111100001011011000110000101101100101000010110110011100001011011010010000101101101011000010110110110100001011011011...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 7ms
memory: 17604kb
input:
8265
output:
000000000001000000000001100000000001010000000000111000000000100100000000010110000000001101000000000111100000000100010000000010011000000001010100000000101110000000011001000000001101100000000111010000000011111000000010000100000001000110000000100101000000010011100000001010010000000101011000000010110100...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 15ms
memory: 18248kb
input:
16508
output:
000000000000100000000000011000000000001010000000000011100000000001001000000000010110000000000110100000000001111000000000100010000000001001100000000010101000000000101110000000001100100000000011011000000000111010000000001111100000000100001000000001000110000000010010100000000100111000000001010010000000...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 16ms
memory: 19612kb
input:
33008
output:
000000000000010000000000000110000000000001010000000000001110000000000010010000000000010110000000000011010000000000011110000000000100010000000000100110000000000101010000000000101110000000000110010000000000110110000000000111010000000000111110000000001000010000000001000110000000001001010000000001001110...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 16ms
memory: 23028kb
input:
65964
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 32ms
memory: 31360kb
input:
131692
output:
000000000000010000000000000001100000000000000101000000000000001110000000000000100100000000000001011000000000000011010000000000000111100000000000010001000000000000100110000000000001010100000000000010111000000000000110010000000000001101100000000000011101000000000000111110000000000010000100000000000100...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 4ms
memory: 16376kb
input:
15843
output:
000010010110000001001101000000100111100000010100010000001010011000000101010100000010101110000001011001000000101101100000010111010000001011111000000110000100000011000110000001100101000000110011100000011010010000001101011000000110110100000011011110000001110001000000111001100000011101010000001110111000...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 7ms
memory: 17744kb
input:
31560
output:
000000101000000000001110011111111000010111111101111010000000100000011111100111110111110110000010000011011110011111001000011000001101110101111100100010100000110111000111110011101101111011000100100001001110100111001100010110001000111000011101101101110000100100011011110100111001000010110001001111000011...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 11ms
memory: 20236kb
input:
64241
output:
000001001001000000001001011000000001001101000000001001111000000001010001000000001010011000000001010101000000001010111000000001011001000000001011011000000001011101000000001011111000000001100001000000001100011000000001100101000000001100111000000001101001000000001101011000000001101101000000001101111000...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 37ms
memory: 23084kb
input:
73307
output:
000000000000100000000000000110000000000000101000000000000011100000000000010010000000000001011000000000000110100000000000011110000000000010001000000000001001100000000000101010000000000010111000000000001100100000000000110110000000000011101000000000001111100000000001000010000000000100011000000000010010...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 11ms
memory: 22748kb
input:
129593
output:
000011110010010000001111001011000000111100110100000011110011110000001111010001000000111101001100000011110101010000001111010111000000111101100100000011110110110000001111011101000000111101111100000011111000010000001111100011000000111110010100000011111001110000001111101001000000111110101100000011111011...
result:
ok meet maximum 8395295323