QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#806981 | #5434. Binary Substrings | zdczdc | AC ✓ | 28ms | 23768kb | C++20 | 2.1kb | 2024-12-09 17:44:49 | 2024-12-09 17:44:50 |
Judging History
answer
#include <bits/stdc++.h>
#define ALL(x) begin(x), end(x)
using namespace std;
void file() {
freopen("1.in", "r", stdin);
freopen("1.out", "w", stdout);
}
using ll = long long;
const int kN = 2e5 + 5;
int n;
array<vector<pair<int, int>>, kN> g;
void add(int u, int v, int w) {
g[u].emplace_back(v, w);
}
vector<pair<int, int>> path;
void dfs(int x) {
for(int to, w; !g[x].empty(); ) {
tie(to, w) = g[x].back(), g[x].pop_back();
dfs(to), path.emplace_back(to, w);
}
}
array<int, kN> nxt, jp;
array<bool, kN> vis;
array<vector<int>, kN> circ;
int main() {
// file();
ios::sync_with_stdio(0); cin.tie(0);
cin >> n;
if(n == 1) return cout << "0\n", 0;
if(n == 2) return cout << "01\n", 0;
int k = 1;
for(; (1 << k) <= n - k + 1; k++) ; k--;
for(int i = 0; i < (1 << k); i++) {
add(i & ((1 << k - 1) - 1), i / 2, i);
}
dfs(0);
int len = (1 << k);
for(int i = 0; i < len; i++) {
nxt[path[i].second] = path[(i + 1) % len].second;
}
int need = n - k - (1 << k) + 1;
for(int i = 0; i < (1 << k + 1); i++) {
int u = i / 2, v = i & ((1 << k) - 1);
if(nxt[u] != v) jp[u] = v;
}
for(int i = 0; i < (1 << k); i++) {
if(vis[i] == 1) continue;
vector<int> buc;
for(int j = i; vis[j] == 0; vis[j] = 1, j = jp[j]) {
buc.push_back(j);
}
if(buc.size() > need) {
string ans;
for(int j = k - 1; j >= 1; j--) {
ans += char(((i >> j) & 1) + '0');
}
for(int j = i, f = 0; f == 0; f |= ((j = nxt[j]) == i)) {
ans += char((j & 1) + '0');
for(int k : circ[j]) ans += char((k & 1) + '0');
}
for(int j = 0; j < need; j++) {
ans += char((buc[j] & 1) + '0');
}
cout << ans << "\n";
exit(0);
}else {
rotate(begin(buc), begin(buc) + 1, end(buc));
circ[i] = buc, need -= buc.size();
}
}
string ans;
for(int i = 1; i < k; i++) ans += "0";
for(int i = 0, f = 0; f == 0; f |= ((i = nxt[i]) == 0)) {
ans += char((i & 1) + '0');
for(int j : circ[i]) ans += char((j & 1) + '0');
}
cout << ans << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3532kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 5692kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 2ms
memory: 5700kb
input:
3
output:
100
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 2ms
memory: 5644kb
input:
4
output:
0011
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 0ms
memory: 5928kb
input:
6
output:
011000
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 2ms
memory: 5644kb
input:
7
output:
0110001
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 1ms
memory: 3656kb
input:
8
output:
11000101
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
9
output:
000101110
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 0ms
memory: 5928kb
input:
10
output:
0001011100
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 2ms
memory: 5712kb
input:
11
output:
00101110000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 1ms
memory: 3832kb
input:
12
output:
001011100001
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 25ms
memory: 22000kb
input:
200000
output:
000000000010110010000000000101100010000000001011010100000000010110011000000000101100001000000001011010010000000010110010100000000101100011000000001011000001000000010110100010000000101100100100000001011000101000000010110101010000000101100110100000001011000011000000010110100110000000101100000010000001...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 0ms
memory: 5928kb
input:
24
output:
000101001101111000001110
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
35
output:
00000111010110010001010011011111000
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 0ms
memory: 5584kb
input:
30
output:
000101001101111000001110101100
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 1ms
memory: 3592kb
input:
45
output:
000010010100011010110011101111100000011110100
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 2ms
memory: 5712kb
input:
66
output:
011010110011101111100000011110100110001011100100001001010100011011
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 0ms
memory: 5644kb
input:
50
output:
00001001010001101011001110111110000001111010011000
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 0ms
memory: 5860kb
input:
80
output:
00000100100010101000011010011001011011000111010111001111011111100000001111101000
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 2ms
memory: 5696kb
input:
107
output:
00000100100010101000011010011001011011000111010111001111011111100000001111101000110000101111001001110001000
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 2ms
memory: 5712kb
input:
81
output:
000001001000101010000110100110010110110001110101110011110111111000000011111010001
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 2ms
memory: 5720kb
input:
147
output:
000000100010010000101001010100000110100011001001100010110101011001101100001110100111001011101101110001111010111100111110111111100000000111111010000
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 2ms
memory: 5704kb
input:
255
output:
000101001010100000110100011001001100010110101011001101100001110100111001011101101110001111010111100111110111111100000000111111010000110000010111110010001110000100111100010000001000100100001010111001100111011101010011010110110100100101100011011110110010100
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 0ms
memory: 5648kb
input:
173
output:
00000010001001000010100101010000011010001100100110001011010101100110110000111010011100101110110111000111101011110011111011111110000000011111101000011000001011111001000111000
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 2ms
memory: 5888kb
input:
288
output:
000000010001000010010000010100100101000101010100000011010000110010001100010011010100110011000010110100101100101011000110110101101100000111010001110010011101100111000101110101011100110111011100001111010011110010111101101111000111110101111100111111011111111000000000111111101000001100000010
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 1ms
memory: 3632kb
input:
407
output:
000010100100101000101010100000011010000110010001100010011010100110011000010110100101100101011000110110101101100000111010001110010011101100111000101110101011100110111011100001111010011110010111101101111000111110101111100111111011111111000000000111111101000001100000010111111001000011100000100111110001...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 1ms
memory: 3892kb
input:
349
output:
000010100100101000101010100000011010000110010001100010011010100110011000010110100101100101011000110110101101100000111010001110010011101100111000101110101011100110111011100001111010011110010111101101111000111110101111100111111011111111000000000111111101000001100000010111111001000011100000100111110001...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 2ms
memory: 5944kb
input:
526
output:
000000001000010001000001001001000000101001000101000100101000010101001010101000000011010000011001000011000100011010100011000010011010010011001010011000110011000001011010001011001001011000101011010101011001101011000011011010011011001011011011000000111010000111001000111011000111000100111010100111001100...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 2ms
memory: 5720kb
input:
1018
output:
001010010001010001001010000101010010101010000000110100111011011010100100101011000110100000110010000110001000110101000110000100110100100110010100110001100110000010110100010110010010110001010110101010110011010110000110110100110110010110110110000001110100001110010001110110001110001001110101001110011001...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 2ms
memory: 5784kb
input:
1017
output:
001010010001010001001010000101010010101010000000110100111011011010100100101011000110100000110010000110001000110101000110000100110100100110010100110001100110000010110100010110010010110001010110101010110011010110000110110100110110010110110110000001110100001110010001110110001110001001110101001110011001...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 2ms
memory: 5812kb
input:
1209
output:
000000101001000010100010001010000100101001010000010101001001010100010101010100000000110100000011001000001100010000110101000011000010001101001000110010100011000110000010011010001001100100100110001010011010101001100001100110100110011000000101101000010110010001011000100101101010010110011001011000010101...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 0ms
memory: 5876kb
input:
1632
output:
000000101001000010100010001010000100101001010000010101001001010100010101010100000000110100000011001000001100010000110101000011000010001101001000110010100011000110000010011010001001100100100110001010011010101001100001100110100110011000000101101000010110010001011000100101101010010110011001011000010101...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 2ms
memory: 5776kb
input:
1829
output:
000001001000100100100000001010111111001100001011011111001010000111001111101011000101010000101010111100110100001101100001001001111000111001011101011010001010010111001110100011001100110111011101100010001001110000111010111101010100011010101110110101000100101011100011010001110110111010100100010101100001...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 2ms
memory: 5928kb
input:
3187
output:
000000010100100000101000100001010000100010100000100101001001001010001010010100000010101001000101010001001010100001010101001010101010000000001101000000011001000000110001000001101010000011000010000110100100001100101000011000001000110100010001100100100011000101000110101010001100001100011000000100110100...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 2ms
memory: 5836kb
input:
2138
output:
000000000010000010000100000010001000000010010001000100100001001001000000001010010000010100010000101000010001010000010010100100100101000101001010000001010100100010101000100101010000101010100101010101000000000110100000001100100000011000100000110101000001100001000011010010000110010100001100000100011010...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 2ms
memory: 6000kb
input:
4030
output:
000010100010000101000010001010000010010100100100101000101001010000001010100100010101000100101010000101010100101010101000000000110100000001100111111101110000100100000110010111110111010000010001011111000011000011111011111010001000001011100000011001000000110001111110111100100010000110001011110111101000...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 2ms
memory: 6520kb
input:
6101
output:
000000001010010000001010001000001010000100001010000010001010010010001010001010000001001010010001001010001001001010000101001010000000101010010000101010001000101010000100101010010100101010000010101010010010101010001010101010100000000001101000000001100100000001100010000001101010000001100001000001101001...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 0ms
memory: 6448kb
input:
5917
output:
000000001010010000001010001000001010000100001010000010001010010010001010001010000001001010010001001010001001001010000101001010000000101010010000101010001000101010000100101010010100101010000010101010010010101010001010101010100000000001101000000001100100000001100010000001101010000001100001000001101001...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 0ms
memory: 6284kb
input:
6635
output:
000000001010010000001010001000001010000100001010000010001010010010001010001010000001001010010001001010001001001010000101001010000000101010010000101010001000101010000100101010010100101010000010101010010010101010001010101010100000000001101000000001100100000001100010000001101010000001100001000001101001...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 0ms
memory: 4908kb
input:
9993
output:
000000000101001000000010100010000001010000100000101000001000010100100100001010000001000101001000100010100010010001010000101000101000000010010100100001001010001000100101000010010010100000101001010010010100101000000001010100100000101010001000010101000010001010100101000101010000010010101001001001010100...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 3ms
memory: 6816kb
input:
14474
output:
000000010100100000001010001000000101000010000010100000100001010010010000101000000100010100100010001010001001000101000010100010100000001001010010000100101000100010010100001001001010000010100101001001010010100000000101010010000010101000100001010100001000101010010100010101000001001010100100100101010001...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 3ms
memory: 6784kb
input:
11534
output:
000000000101001000000010100010000001010000100000101000001000010100100100001010000001000101001000100010100010010001010000101000101000000010010100100001001010001000100101000010010010100000101001010010010100101000000001010100100000101010001000010101000010001010100101000101010000010010101001001001010100...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 3ms
memory: 6220kb
input:
19098
output:
000000000010100100000000101000100000001010000100000010100000100000101001001000001010000001000010100100010000101000100100001010000101000000010001010010000100010100010001000101000010010001010000010100010100000000100101001000001001010001000010010100001000100101000001001001010010010010010100010100100101...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 3ms
memory: 6300kb
input:
31872
output:
000000011110100000000111100100000001111011000000011110001000000111101010000001111001100000011110111000000111100001000001111010010000011110010100000111101101000001111000110000011110101100000111100111000001111000001000011110100010000111100100100001111011001000011110001010000111101010100001111001101000...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 4ms
memory: 7828kb
input:
27626
output:
000000001101000000000011001111111111011100000001001000000001100101111111101110100000000100010111111110000110000001011110111111100100010000000110001011111110111101000000010000101111111000001100000101111101111110010000100000011000010111111011111010000001000001011111100000011000001111111011111101000001...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 0ms
memory: 10148kb
input:
43245
output:
000000000001010010000000001010001000000001010000100000001010000010000001010010010000001010000001000001010010001000001010001001000001010000000100001010010000100001010001000100001010000100100001010000010100001010000000010001010010000010001010001000010001010000100010001010000010010001010010010010001010...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 7ms
memory: 10124kb
input:
34491
output:
000000000001010010000000001010001000000001010000100000001010000010000001010010010000001010000001000001010010001000001010001001000001010000000100001010010000100001010001000100001010000100100001010000010100001010000000010001010010000010001010001000010001010000100010001010000010010001010010010010001010...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 7ms
memory: 9952kb
input:
64535
output:
000001010010000000001010001000000001010000100000001010000010000001010010010000001010000001000001010010001000001010001001000001010000000100001010010000100001010001000100001010000100100001010000010100001010000000010001010010000010001010001000010001010000100010001010000010010001010010010010001010000001...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 9ms
memory: 12460kb
input:
65746
output:
000000000000000100000001000000001000000100000000010000010000000000100001000001000010000100000000000100010000100000010001000001000001000100000010000100010000000100010001000100000000000010010001000000001001000010000000100100000100000010010000001000001001000000010000100100010001000010010000100100000000...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 3ms
memory: 14060kb
input:
65861
output:
000000000000000100000001000000001000000100000000010000010000000000100001000001000010000100000000000100010000100000010001000001000001000100000010000100010000000100010001000100000000000010010001000000001001000010000000100100000100000010010000001000001001000000010000100100010001000010010000100100000000...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 7ms
memory: 14632kb
input:
66725
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 9ms
memory: 14640kb
input:
86349
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 13ms
memory: 12860kb
input:
68454
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 0ms
memory: 14616kb
input:
112260
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 7ms
memory: 14552kb
input:
108023
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 14ms
memory: 14524kb
input:
103787
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 4ms
memory: 14716kb
input:
128710
output:
000000111000100000000011101010000000001110011000000000111000010000000011101001000000001110010100000000111011010000000011100011000000001110101100000000111000001000000011101000100000001110010010000000111011001000000011100010100000001110101010000000111001101000000011100001100000001110100110000000111001...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 9ms
memory: 14696kb
input:
129534
output:
000010110001000000001011010100000000101100110000000010110000100000001011010010000000101100101000000010110001100000001011000001000000101101000100000010110010010000001011000101000000101101010100000010110011010000001011000011000000101101001100000010110000001000001011010000100000101100100010000010110001...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 3ms
memory: 12832kb
input:
128670
output:
000000111000100000000011101010000000001110011000000000111000010000000011101001000000001110010100000000111011010000000011100011000000001110101100000000111000001000000011101000100000001110010010000000111011001000000011100010100000001110101010000000111001101000000011100001100000001110100110000000111001...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 25ms
memory: 23768kb
input:
154721
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 28ms
memory: 23268kb
input:
143149
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 23ms
memory: 22048kb
input:
134065
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 20ms
memory: 23204kb
input:
163454
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 15ms
memory: 23324kb
input:
139150
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 22ms
memory: 23316kb
input:
172380
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 22ms
memory: 23372kb
input:
178166
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 15ms
memory: 23604kb
input:
143651
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 23ms
memory: 23568kb
input:
198199
output:
000000000010110010000000000101100010000000001011010100000000010110011000000000101100001000000001011010010000000010110010100000000101100011000000001011000001000000010110100010000000101100100100000001011000101000000010110101010000000101100110100000001011000011000000010110100110000000101100000010000001...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 27ms
memory: 23120kb
input:
186272
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 23ms
memory: 23084kb
input:
198102
output:
000000000010110010000000000101100010000000001011010100000000010110011000000000101100001000000001011010010000000010110010100000000101100011000000001011000001000000010110100010000000101100100100000001011000101000000010110101010000000101100110100000001011000011000000010110100110000000101100000010000001...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 0ms
memory: 6276kb
input:
8201
output:
010101010101000000000011010000000011001000000011000100000011010100000011000010000011010010000011001010000011000001000011010001000011001001000011000101000011010101000011000011000000100011010000100011001000100011000100100011010100100011000010100011010010100011001010100011000001100011010001100011000000...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 2ms
memory: 6296kb
input:
8202
output:
111111111111000000000000011111111111010000000001100000000001011111111110010000000011100000000010011111111100010000000111100000000100011111111000010000001111100000001000011111110000010000011111100000010000000000010000010000001000010000000100010000111000011111010111100100101000111000110111010111011000...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 0ms
memory: 4232kb
input:
8203
output:
000000000000011111111111010000000001100000000001011111111110010000000011100000000010011111111100010000000111100000000100011111111000010000001111100000001000011111110000010000011111100000010000000000010000010000001000010000000100010000111000011111010111100100101000111000110111010111011000101000100111...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 0ms
memory: 6864kb
input:
8204
output:
000000000000010000001000001000000010000100000000100010000100010001000000000100100010000010010000100001001000001000100100000010010010001001001001000000000010100100000001010001000000101000010000010100000100001010010010000101000000100010100100010001010001001000101000010100010100000001001010010000100101...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 3ms
memory: 6784kb
input:
8205
output:
000000000000100000010000010000000100001000000001000100001000100010000000001001000100000100100001000010010000010001001000000100100100010010010010000000000101001000000010100010000001010000100000101000001000010100100100001010000001000101001000100010100010010001010000101000101000000010010100100001001010...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 2ms
memory: 4880kb
input:
8206
output:
000000000000100000010000010000000100001000000001000100001000100010000000001001000100000100100001000010010000010001001000000100100100010010010010000000000101001000000010100010000001010000100000101000001000010100100100001010000001000101001000100010100010010001010000101000101000000010010100100001001010...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 0ms
memory: 7092kb
input:
16394
output:
010101010101000000000001101000000000110010000000011000100000001101010000000110000111111101111100100001000001100001011111011111010000010000010111110000001100001000000110100100111101101101100101001001001101011000111011010011101010010110011010110100110010100101101110011101001000110011001011101110111010...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 0ms
memory: 6856kb
input:
16395
output:
111111111111100000000000000111111111111010000000000110000000000010111111111110010000000001110000000000100111111111100010000000011110000000001000111111111000010000000111110000000010000111111110000010000001111110000000100000111111100000010000000000001000000100000100000001000010000000010001000111110000...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 3ms
memory: 6908kb
input:
16396
output:
000000000000001111111111110100000000001100000000000101111111111100100000000011100000000001001111111111000100000000111100000000010001111111110000100000001111100000000100001111111100000100000011111100000001000001111111000000100000000000010000001000001000000010000100000000100010001111100001111001001111...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 0ms
memory: 7876kb
input:
16397
output:
000000000000001000000100000001000001000000001000010000000001000100001000010001000001000100010000000000100100010000001001000010000010010000010000100100000010001001000100100000001001001000100010010010000100100100100000000000101001000000001010001000000010100001000000101000001000001010010010000010100000...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 0ms
memory: 5916kb
input:
16398
output:
000000000000010000001000000010000010000000010000100000000010001000010000100010000010001000100000000001001000100000010010000100000100100000100001001000000100010010001001000000010010010001000100100100001001001001000000000001010010000000010100010000000101000010000001010000010000010100100100000101000000...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 0ms
memory: 5920kb
input:
16399
output:
000000000000010000001000000010000010000000010000100000000010001000010000100010000010001000100000000001001000100000010010000100000100100000100001001000000100010010001001000000010010010001000100100100001001001001000000000001010010000000010100010000000101000010000001010000010000010100100100000101000000...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 4ms
memory: 8028kb
input:
32779
output:
011011011011010110110110110000000000011101000000000111001000000001110110000000011100010000000111010100000001110011000000011100001000000111010010000001110010100000011101101000000111000110000001110101100000011100000100000111010001000001110010010011101011011011001101001001001101100011100100100000111011...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 0ms
memory: 8040kb
input:
32780
output:
111111111111110000000000000001111111111111010000000000011000000000000101111111111110010000000000111000000000001001111111111100010000000001111000000000010001111111111000010000000011111000000000100001111111110000010000000111111000000001000001111111100000010000001111111000000010000000000000100000010000...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 4ms
memory: 8140kb
input:
32781
output:
000000000000000111111111111101000000000001100000000000010111111111111001000000000011100000000000100111111111110001000000000111100000000001000111111111100001000000001111100000000010000111111111000001000000011111100000000100000111111110000001000000111111100000001000000000000010000001000000010000010000...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 0ms
memory: 9916kb
input:
32782
output:
000000000000000100000001000000100000000100000100000000010000100001000000000010001000010000010001000001000010001000000100010001000000000001001000100000001001000010000001001000001000001001000000100001001000000010001001000100010001001000010010001001000000001001001000100001001001000010001001001000001001...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 3ms
memory: 10148kb
input:
32783
output:
000000000000001000000010000001000000001000001000000000100001000010000000000100010000100000100010000010000100010000001000100010000000000010010001000000010010000100000010010000010000010010000001000010010000000100010010001000100010010000100100010010000000010010010001000010010010000100010010010000010010...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 6ms
memory: 8076kb
input:
32784
output:
000000000000001000000010000001000000001000001000000000100001000010000000000100010000100000100010000010000100010000001000100010000000000010010001000000010010000100000010010000010000010010000001000010010000000100010010001000100010010000100100010010000000010010010001000010010010000100010010010000010010...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 3ms
memory: 9944kb
input:
65548
output:
010101010101010000000000000110100111111111011011000000010100100111111100111011000000011000100111111101111011000000010000100111111100000111000001011111010111110100000101000001011111001111110100000110000011011111011111101100000100000010011111000000011100010111111101011101000000010100010111111100111101...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 3ms
memory: 10336kb
input:
65549
output:
111111111111111000000000000000011111111111111010000000000001100000000000001011111111111110010000000000011100000000000010011111111111100010000000000111100000000000100011111111111000010000000001111100000000001000011111111110000010000000011111100000000010000011111111100000010000000111111100000000100000...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 3ms
memory: 10168kb
input:
65550
output:
000000000000000011111111111111010000000000001100000000000001011111111111110010000000000011100000000000010011111111111100010000000000111100000000000100011111111111000010000000001111100000000001000011111111110000010000000011111100000000010000011111111100000010000000111111100000000100000011111111000000...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 9ms
memory: 14288kb
input:
65551
output:
000000000000000010000000100000000100000010000000001000001000000000010000100000100001000010000000000010001000010000001000100000100000100010000001000010001000000010001000100010000000000001001000100000000100100001000000010010000010000001001000000100000100100000001000010010001000100001001000010010000000...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 4ms
memory: 14124kb
input:
65552
output:
000000000000000100000001000000001000000100000000010000010000000000100001000001000010000100000000000100010000100000010001000001000001000100000010000100010000000100010001000100000000000010010001000000001001000010000000100100000100000010010000001000001001000000010000100100010001000010010000100100000000...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 8ms
memory: 13988kb
input:
65553
output:
000000000000000100000001000000001000000100000000010000010000000000100001000001000010000100000000000100010000100000010001000001000001000100000010000100010000000100010001000100000000000010010001000000001001000010000000100100000100000010010000001000001001000000010000100100010001000010010000100100000000...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 8ms
memory: 14564kb
input:
131085
output:
010101010101010100000000000000110100000000000011001000000000001100010000000000110101000000000011000010000000001101001000000000110010100000000011000001000000001101000100000000110010010000000011000101000000001101010100000000110000001000000011010000100000001100100010000000110001001000000011010100100000...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 4ms
memory: 14600kb
input:
131086
output:
111111111111111100000000000000000111111111111111010000000000000110000000000000010111111111111110010000000000001110000000000000100111111111111100010000000000011110000000000001000111111111111000010000000000111110000000000010000111111111110000010000000001111110000000000100000111111111100000010000000011...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 9ms
memory: 14724kb
input:
131087
output:
000000000000000001111111111111110100000000000001100000000000000101111111111111100100000000000011100000000000001001111111111111000100000000000111100000000000010001111111111110000100000000001111100000000000100001111111111100000100000000011111100000000001000001111111111000000100000000111111100000000010...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 19ms
memory: 23048kb
input:
131088
output:
000000000000000001000000001000000010000000001000000100000000001000001000000000001000010000010000010000100000010000100001000000000000100010000100000001000100000100000010001000000100000100010000000100001000100000000100010001000010001000100010000000000000100100010000000001001000010000000010010000010000...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 26ms
memory: 22556kb
input:
131089
output:
000000000000000010000000010000000100000000010000001000000000010000010000000000010000100000100000100001000000100001000010000000000001000100001000000010001000001000000100010000001000001000100000001000010001000000001000100010000100010001000100000000000001001000100000000010010000100000000100100000100000...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 28ms
memory: 22412kb
input:
131090
output:
000000000000000010000000010000000100000000010000001000000000010000010000000000010000100000100000100001000000100001000010000000000001000100001000000010001000001000000100010000001000001000100000001000010001000000001000100010000100010001000100000000000001001000100000000010010000100000000100100000100000...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 0ms
memory: 6460kb
input:
8197
output:
010101010101000000000011010000000011001000000011000100000011010100000011000010000011010010000011001010000011000001000011010001000011001001000011000101000011010101000011000011000000100011010000100011001000100011000100100011010100100011000010100011010010100011001010100011000001100011010001100011000000...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 0ms
memory: 6912kb
input:
16328
output:
001010010101000000101010100100010101010001001010101000010101010100101010101010000000000011010000000001100100000000110001000000011010100000001100001111111011111001000010000011000010111110111110100000100000101111100000011000010000001101001001111011011011001010010010011010110001110110100111010100101100...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 0ms
memory: 7940kb
input:
32608
output:
000101101001100001011000000100010110100001000101100100010001011000100100010110101001000101100110010001011000010100010110100101000101100101010001011000110100010110000011000101101000110001011001001100010110001011000000010010110100000100101100100001001011000100010010110101000100101100110001001011000010...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 0ms
memory: 10372kb
input:
65141
output:
000101101001010000101100101010000101100011010000101100000110000101101000110111010010111001000101101000110000101100100110111010011011001000101100100110000101100000001000101101000001000101100100001000101100010001000101101010001000101100110001000101100001001000101101001001000101100101001000101100011001...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 7ms
memory: 14520kb
input:
130420
output:
000101101001001000010110010100101110100110101101000101100101001000010110001100100001011000001010000101101000101000010110010010101110100110110101000101100100101000010110001010100001011010101010000101100110101000010110000110100001011010011010000101100000011000010110100001100001011001000110000101100010...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 0ms
memory: 6964kb
input:
8265
output:
000000000000100000010000010000000100001000000001000100001000100010000000001001000100000100100001000010010000010001001000000100100100010010010010000000000101001000000010100010000001010000100000101000001000010100100100001010000001000101001000100010100010010001010000101000101000000010010100100001001010...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 3ms
memory: 5972kb
input:
16508
output:
000000000000010000001000000010000010000000010000100000000010001000010000100010000010001000100000000001001000100000010010000100000100100000100001001000000100010010001001000000010010010001000100100100001001001001000000000001010010000000010100010000000101000010000001010000010000010100100100000101000000...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 3ms
memory: 9672kb
input:
33008
output:
000000000000001000000010000001000000001000001000000000100001000010000000000100010000100000100010000010000100010000001000100010000000000010010001000000010010000100000010010000010000010010000001000010010000000100010010001000100010010000100100010010000000010010010001000010010010000100010010010000010010...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 8ms
memory: 12916kb
input:
65964
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 22ms
memory: 23460kb
input:
131692
output:
000000000000010100100000000000101000100000000001010000100000000010100000100000000101001001000000001010000001000000010100100010000000101000100100000001010000000100000010100100001000000101000100010000001010000100100000010100000000100000101001000001000001010001000010000010100001000100000101000001001000...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 0ms
memory: 6880kb
input:
15843
output:
000001000100001000100010000000001001000100000100100001000010010000010001001000000100100100010010010010000000000101011111111100110000000101101111111100101000000011100111111110101100000010101000000010101011111110011010000000110110000000100100111111100011100001001110101111000100101000111100011011100101...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 0ms
memory: 8300kb
input:
31560
output:
000000011110100000000111100100000001111011000000011110001000000111101010000001111001100000011110111000000111100001000001111010010000011110010100000111101101000001111000110000011110101100000111100111000001111000001000011110100010000111100100100001111011001000011110001010000111101010100001111001101000...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 0ms
memory: 10200kb
input:
64241
output:
000000100010010001000100010010000100100010010000000010010010001000010010010000100010010010000010010010010010000000000001010111111111110011000000000101101111111111001010000000001110011111111110101100000000101010000000001010101111111110011010000000001101100000000010010011111111100011100000010011101011...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 12ms
memory: 14332kb
input:
73307
output:
000000000000101001000000000010100010000000001010000100000000101000001000000010100100100000001010000001000000101001000100000010100010010000001010000000100000101001000010000010100010001000001010000100100000101000001010000000010000101001000001000010100010000100001010000100010000101000001001000010100100...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 3ms
memory: 14724kb
input:
129593
output:
000010110001000000001011010100000000101100110000000010110000100000001011010010000000101100101000000010110001100000001011000001000000101101000100000010110010010000001011000101000000101101010100000010110011010000001011000011000000101101001100000010110000001000001011010000100000101100100010000010110001...
result:
ok meet maximum 8395295323