QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#429792 | #5434. Binary Substrings | cmnx | AC ✓ | 202ms | 22416kb | Python3 | 3.2kb | 2024-06-02 20:53:42 | 2024-06-02 20:53:43 |
Judging History
answer
from typing import List, Tuple
def max2(a: int, b: int) -> int:
return a if a > b else b
def maxNumDistinctNonemptySubstrings(n: int) -> str:
n0 = n
n = 1
while (1 << n) + (n - 1) < n0:
n += 1
def cal() -> str:
if n == 1:
return "01"
if n == 2:
return "00110"
def shift(x: str, y: str) -> str:
m = len(x)
x += x
for i in range(m, m + m):
if x[i - len(y) : i] == y:
return x[i - m : i]
return ""
def oplus(x: str, y: str) -> str:
m = len(y).bit_length() - 1
return x + shift(y, x[len(x) - m :])
def no(x: str) -> str:
return "".join("0" if s == "1" else "1" for s in x)
def psi(x: str) -> str:
res = []
a = 0
for v in x:
a ^= int(v)
res.append(str(a))
return "".join(res)
def nxt(x: str) -> str:
x = psi(x)
return oplus(x, no(x))
def otimes(x: str, y: str) -> str:
t = ["0"] * (len(x).bit_length() - 1)
x = shift(x, "".join(t))
y = shift(y, "".join(t))
x = x[-len(t) :] + x[: len(x) - len(t)]
y = y[-len(t) :] + y[: len(y) - len(t)]
x0, x1, y0, y1 = 0, 0, 0, 1
for k, v in runLength(x):
if k == "0":
x0 = max2(x0, v)
if k == "1":
x1 = max2(x1, v)
for k, v in runLength(y):
if k == "0":
y0 = max2(y0, v)
if k == "1":
y1 = max2(y1, v)
sbX, sbY = [], []
for k, v in runLength(x):
if k == "0" and v < x0:
sbX.append(k * v)
if k == "0" and v == x0:
sbX.append(k * (v - 1))
if k == "1" and v < x1:
sbX.append(k * v)
if k == "1" and v == x1:
sbX.append(k * (v + 1))
for k, v in runLength(y):
if k == "0" and v < y0:
sbY.append(k * v)
if k == "0" and v == y0:
sbY.append(k * (v + 1))
if k == "1" and v < y1:
sbY.append(k * v)
if k == "1" and v == y1:
sbY.append(k * (v - 1))
return "".join(sbX) + "".join(sbY)
x, y = "0011", "0011"
for i in range(2, n - 1):
t = ["1"] * i
x = shift(x, "".join(t))
x = nxt(x)
y = shift(y, "".join(t))
y = no(nxt(y))
x = otimes(x, y)
for i in range(n - 1):
x += x[i]
return x
return cal()[:n0]
def runLength(s: str) -> List[Tuple[str, int]]:
res = []
for x in s:
if not res or res[-1][0] != x:
res.append([x, 0])
res[-1][1] += 1
return res
if __name__ == "__main__":
n = int(input())
print(maxNumDistinctNonemptySubstrings(n))
详细
Test #1:
score: 100
Accepted
time: 18ms
memory: 11900kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 23ms
memory: 11780kb
input:
5
output:
00110
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 16ms
memory: 11800kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 22ms
memory: 11728kb
input:
3
output:
001
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 14ms
memory: 11844kb
input:
4
output:
0011
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 15ms
memory: 11796kb
input:
6
output:
011100
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 15ms
memory: 11836kb
input:
7
output:
0111000
result:
ok meet maximum 21
Test #8:
score: 0
Accepted
time: 22ms
memory: 11884kb
input:
8
output:
01110001
result:
ok meet maximum 27
Test #9:
score: 0
Accepted
time: 16ms
memory: 11832kb
input:
9
output:
011100010
result:
ok meet maximum 34
Test #10:
score: 0
Accepted
time: 22ms
memory: 11732kb
input:
10
output:
0111000101
result:
ok meet maximum 42
Test #11:
score: 0
Accepted
time: 18ms
memory: 11808kb
input:
11
output:
00101111000
result:
ok meet maximum 50
Test #12:
score: 0
Accepted
time: 14ms
memory: 11776kb
input:
12
output:
001011110000
result:
ok meet maximum 59
Test #13:
score: 0
Accepted
time: 183ms
memory: 22260kb
input:
200000
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 19996962278
Test #14:
score: 0
Accepted
time: 23ms
memory: 11732kb
input:
24
output:
000110101111100100000101
result:
ok meet maximum 240
Test #15:
score: 0
Accepted
time: 14ms
memory: 11808kb
input:
35
output:
00011010111110010000010100111011000
result:
ok meet maximum 526
Test #16:
score: 0
Accepted
time: 16ms
memory: 11732kb
input:
30
output:
000110101111100100000101001110
result:
ok meet maximum 381
Test #17:
score: 0
Accepted
time: 12ms
memory: 11848kb
input:
45
output:
000010011010001111110110010101110000001100010
result:
ok meet maximum 882
Test #18:
score: 0
Accepted
time: 19ms
memory: 11884kb
input:
66
output:
000010011010001111110110010101110000001100010110111100111010100100
result:
ok meet maximum 1953
Test #19:
score: 0
Accepted
time: 22ms
memory: 11788kb
input:
50
output:
00001001101000111111011001010111000000110001011011
result:
ok meet maximum 1097
Test #20:
score: 0
Accepted
time: 22ms
memory: 11852kb
input:
80
output:
00000111011000010100100011001011111110001001111010101101110011010000000100001101
result:
ok meet maximum 2901
Test #21:
score: 0
Accepted
time: 14ms
memory: 11904kb
input:
107
output:
00000111011000010100100011001011111110001001111010101101110011010000000100001101101011101001100011111011110
result:
ok meet maximum 5277
Test #22:
score: 0
Accepted
time: 16ms
memory: 11740kb
input:
81
output:
000001110110000101001000110010111111100010011110101011011100110100000001000011011
result:
ok meet maximum 2976
Test #23:
score: 0
Accepted
time: 18ms
memory: 11752kb
input:
147
output:
000000101101111100111000010001101010000111010110011011010001001111111101001000001100011110111001010101111000101001100100101110110000000011111011011
result:
ok meet maximum 10124
Test #24:
score: 0
Accepted
time: 18ms
memory: 11788kb
input:
255
output:
000000101101111100111000010001101010000111010110011011010001001111111101001000001100011110111001010101111000101001100100101110110000000011111011011001011000100001010110101110001100111100100010111111000001001001101001110111101010100101000111001100001101110
result:
ok meet maximum 31130
Test #25:
score: 0
Accepted
time: 20ms
memory: 11736kb
input:
173
output:
00000010110111110011100001000110101000011101011001101101000100111111110100100000110001111011100101010111100010100110010010111011000000001111101101100101100010000101011010111
result:
ok meet maximum 14115
Test #26:
score: 0
Accepted
time: 19ms
memory: 11912kb
input:
288
output:
000000011011010100010111110000100110000010110010001001001111000101010011100000010000101001011100110010100001100010001110010110111111111001001010111010000011110110011111010011011101101100001110101010110001111110111101011010001100110101111001110111000110100100000000010101101101110010000111
result:
ok meet maximum 39850
Test #27:
score: 0
Accepted
time: 23ms
memory: 11800kb
input:
407
output:
000000011011010100010111110000100110000010110010001001001111000101010011100000010000101001011100110010100001100010001110010110111111111001001010111010000011110110011111010011011101101100001110101010110001111110111101011010001100110101111001110111000110100100000000010101101101110010000111110011011001...
result:
ok meet maximum 80310
Test #28:
score: 0
Accepted
time: 19ms
memory: 11864kb
input:
349
output:
000000011011010100010111110000100110000010110010001001001111000101010011100000010000101001011100110010100001100010001110010110111111111001001010111010000011110110011111010011011101101100001110101010110001111110111101011010001100110101111001110111000110100100000000010101101101110010000111110011011001...
result:
ok meet maximum 58821
Test #29:
score: 0
Accepted
time: 23ms
memory: 11876kb
input:
526
output:
000000001001001100001101010000011101111110010001111000111010111100110001011111110000011000110100010001100000100001111010001101101010100011100110100111111010110111010100111011010010010000010110011001000010101001010011011000010001001101011101001011110110001111111111011011001111001010111110001000000110...
result:
ok meet maximum 134925
Test #30:
score: 0
Accepted
time: 22ms
memory: 11944kb
input:
1018
output:
000000001001001100001101010000011101111110010001111000111010111100110001011111110000011000110100010001100000100001111010001101101010100011100110100111111010110111010100111011010010010000010110011001000010101001010011011000010001001101011101001011110110001111111111011011001111001010111110001000000110...
result:
ok meet maximum 510567
Test #31:
score: 0
Accepted
time: 22ms
memory: 11916kb
input:
1017
output:
000000001001001100001101010000011101111110010001111000111010111100110001011111110000011000110100010001100000100001111010001101101010100011100110100111111010110111010100111011010010010000010110011001000010101001010011011000010001001101011101001011110110001111111111011011001111001010111110001000000110...
result:
ok meet maximum 509558
Test #32:
score: 0
Accepted
time: 16ms
memory: 11988kb
input:
1209
output:
000000000111000100000100110000001011010101110000101000010110010100010000110101010000001000010011110000100000011111010110000100100110011110100010011101010110010010110011101001001110001111110010001000111110011000110001001000001111000100110100111001010010000101010100100100010100011001010111100000001001...
result:
ok meet maximum 721446
Test #33:
score: 0
Accepted
time: 23ms
memory: 11936kb
input:
1632
output:
000000000111000100000100110000001011010101110000101000010110010100010000110101010000001000010011110000100000011111010110000100100110011110100010011101010110010010110011101001001110001111110010001000111110011000110001001000001111000100110100111001010010000101010100100100010100011001010111100000001001...
result:
ok meet maximum 1318299
Test #34:
score: 0
Accepted
time: 19ms
memory: 11860kb
input:
1829
output:
000000000111000100000100110000001011010101110000101000010110010100010000110101010000001000010011110000100000011111010110000100100110011110100010011101010110010010110011101001001110001111110010001000111110011000110001001000001111000100110100111001010010000101010100100100010100011001010111100000001001...
result:
ok meet maximum 1657336
Test #35:
score: 0
Accepted
time: 24ms
memory: 11976kb
input:
3187
output:
000000000010111100000011101111111001001100101111100111110010001100001111101100110000000111110001010000011111110101001101111100011101110101100001110100110010001110010001011000111010000101010001111000010101110111101111000111111010111100010011101000110001111100110011100011110011110111001101011111111000...
result:
ok meet maximum 5049170
Test #36:
score: 0
Accepted
time: 20ms
memory: 12024kb
input:
2138
output:
000000000010111100000011101111111001001100101111100111110010001100001111101100110000000111110001010000011111110101001101111100011101110101100001110100110010001110010001011000111010000101010001111000010101110111101111000111111010111100010011101000110001111100110011100011110011110111001101011111111000...
result:
ok meet maximum 2267222
Test #37:
score: 0
Accepted
time: 16ms
memory: 12028kb
input:
4030
output:
000000000010111100000011101111111001001100101111100111110010001100001111101100110000000111110001010000011111110101001101111100011101110101100001110100110010001110010001011000111010000101010001111000010101110111101111000111111010111100010011101000110001111100110011100011110011110111001101011111111000...
result:
ok meet maximum 8082284
Test #38:
score: 0
Accepted
time: 18ms
memory: 12192kb
input:
6101
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 18549195
Test #39:
score: 0
Accepted
time: 20ms
memory: 12084kb
input:
5917
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 17445655
Test #40:
score: 0
Accepted
time: 26ms
memory: 12256kb
input:
6635
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 21943566
Test #41:
score: 0
Accepted
time: 32ms
memory: 12424kb
input:
9993
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 49821572
Test #42:
score: 0
Accepted
time: 25ms
memory: 12584kb
input:
14474
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 104583873
Test #43:
score: 0
Accepted
time: 21ms
memory: 12556kb
input:
11534
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 66388863
Test #44:
score: 0
Accepted
time: 38ms
memory: 13164kb
input:
19098
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 182141836
Test #45:
score: 0
Accepted
time: 44ms
memory: 13200kb
input:
31872
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 507514777
Test #46:
score: 0
Accepted
time: 37ms
memory: 13248kb
input:
27626
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 381257844
Test #47:
score: 0
Accepted
time: 59ms
memory: 14524kb
input:
43245
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 934503599
Test #48:
score: 0
Accepted
time: 61ms
memory: 14396kb
input:
34491
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 594380060
Test #49:
score: 0
Accepted
time: 63ms
memory: 14460kb
input:
64535
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 2081512994
Test #50:
score: 0
Accepted
time: 92ms
memory: 17220kb
input:
65746
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2160380385
Test #51:
score: 0
Accepted
time: 107ms
memory: 17116kb
input:
65861
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2167946005
Test #52:
score: 0
Accepted
time: 119ms
memory: 17056kb
input:
66725
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2225209765
Test #53:
score: 0
Accepted
time: 101ms
memory: 17160kb
input:
86349
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 3726867681
Test #54:
score: 0
Accepted
time: 104ms
memory: 17204kb
input:
68454
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2342045211
Test #55:
score: 0
Accepted
time: 109ms
memory: 17124kb
input:
112260
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 6299544960
Test #56:
score: 0
Accepted
time: 100ms
memory: 17132kb
input:
108023
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 5832941098
Test #57:
score: 0
Accepted
time: 99ms
memory: 17204kb
input:
103787
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 5384393176
Test #58:
score: 0
Accepted
time: 104ms
memory: 17120kb
input:
128710
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8281268235
Test #59:
score: 0
Accepted
time: 92ms
memory: 17140kb
input:
129534
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8387651991
Test #60:
score: 0
Accepted
time: 100ms
memory: 17044kb
input:
128670
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8276121255
Test #61:
score: 0
Accepted
time: 198ms
memory: 22252kb
input:
154721
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 11967003302
Test #62:
score: 0
Accepted
time: 182ms
memory: 22392kb
input:
143149
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 10243718420
Test #63:
score: 0
Accepted
time: 181ms
memory: 22308kb
input:
134065
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 8984762318
Test #64:
score: 0
Accepted
time: 181ms
memory: 22364kb
input:
163454
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 13356170345
Test #65:
score: 0
Accepted
time: 179ms
memory: 22388kb
input:
139150
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 9679327553
Test #66:
score: 0
Accepted
time: 202ms
memory: 22300kb
input:
172380
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 14854850208
Test #67:
score: 0
Accepted
time: 186ms
memory: 22300kb
input:
178166
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 15868884317
Test #68:
score: 0
Accepted
time: 190ms
memory: 22272kb
input:
143651
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 10315696937
Test #69:
score: 0
Accepted
time: 186ms
memory: 22272kb
input:
198199
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 19638413795
Test #70:
score: 0
Accepted
time: 178ms
memory: 22304kb
input:
186272
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 17345817782
Test #71:
score: 0
Accepted
time: 189ms
memory: 22272kb
input:
198102
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 19619194797
Test #72:
score: 0
Accepted
time: 20ms
memory: 12260kb
input:
8201
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 33542145
Test #73:
score: 0
Accepted
time: 27ms
memory: 12168kb
input:
8202
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 33550335
Test #74:
score: 0
Accepted
time: 25ms
memory: 12140kb
input:
8203
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 33558526
Test #75:
score: 0
Accepted
time: 27ms
memory: 12300kb
input:
8204
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 33566718
Test #76:
score: 0
Accepted
time: 32ms
memory: 12516kb
input:
8205
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 33574910
Test #77:
score: 0
Accepted
time: 25ms
memory: 12504kb
input:
8206
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 33583103
Test #78:
score: 0
Accepted
time: 28ms
memory: 12544kb
input:
16394
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 134193153
Test #79:
score: 0
Accepted
time: 32ms
memory: 12600kb
input:
16395
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 134209535
Test #80:
score: 0
Accepted
time: 23ms
memory: 12452kb
input:
16396
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 134225918
Test #81:
score: 0
Accepted
time: 27ms
memory: 12432kb
input:
16397
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 134242302
Test #82:
score: 0
Accepted
time: 35ms
memory: 13092kb
input:
16398
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 134258686
Test #83:
score: 0
Accepted
time: 39ms
memory: 13156kb
input:
16399
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 134275071
Test #84:
score: 0
Accepted
time: 34ms
memory: 13148kb
input:
32779
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 536821761
Test #85:
score: 0
Accepted
time: 38ms
memory: 13164kb
input:
32780
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 536854527
Test #86:
score: 0
Accepted
time: 43ms
memory: 13168kb
input:
32781
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 536887294
Test #87:
score: 0
Accepted
time: 36ms
memory: 13268kb
input:
32782
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 536920062
Test #88:
score: 0
Accepted
time: 59ms
memory: 14460kb
input:
32783
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 536952830
Test #89:
score: 0
Accepted
time: 59ms
memory: 14464kb
input:
32784
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 536985599
Test #90:
score: 0
Accepted
time: 60ms
memory: 14528kb
input:
65548
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 2147385345
Test #91:
score: 0
Accepted
time: 59ms
memory: 14536kb
input:
65549
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 2147450879
Test #92:
score: 0
Accepted
time: 56ms
memory: 14540kb
input:
65550
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 2147516414
Test #93:
score: 0
Accepted
time: 59ms
memory: 14552kb
input:
65551
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 2147581950
Test #94:
score: 0
Accepted
time: 100ms
memory: 17120kb
input:
65552
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2147647486
Test #95:
score: 0
Accepted
time: 84ms
memory: 17212kb
input:
65553
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2147713023
Test #96:
score: 0
Accepted
time: 100ms
memory: 17124kb
input:
131085
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8589737985
Test #97:
score: 0
Accepted
time: 105ms
memory: 17116kb
input:
131086
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8589869055
Test #98:
score: 0
Accepted
time: 108ms
memory: 17120kb
input:
131087
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8590000126
Test #99:
score: 0
Accepted
time: 96ms
memory: 17188kb
input:
131088
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8590131198
Test #100:
score: 0
Accepted
time: 180ms
memory: 22396kb
input:
131089
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 8590262270
Test #101:
score: 0
Accepted
time: 180ms
memory: 22316kb
input:
131090
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 8590393343
Test #102:
score: 0
Accepted
time: 23ms
memory: 12144kb
input:
8197
output:
000000000001101011111110100101010111000100011010100010101110000100000101011011101111111101010000110000001010101100111011010100001011010011011111010011101110000101110000110111101001111100110000101000001100101101011010111101010110010100001110100111101111010100010001011110101110101101000100110101010111...
result:
ok meet maximum 33509395
Test #103:
score: 0
Accepted
time: 32ms
memory: 12532kb
input:
16328
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 133114152
Test #104:
score: 0
Accepted
time: 35ms
memory: 13140kb
input:
32608
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 531233481
Test #105:
score: 0
Accepted
time: 56ms
memory: 14540kb
input:
65141
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 2120796035
Test #106:
score: 0
Accepted
time: 103ms
memory: 17200kb
input:
130420
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8502797880
Test #107:
score: 0
Accepted
time: 21ms
memory: 12536kb
input:
8265
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 34068260
Test #108:
score: 0
Accepted
time: 38ms
memory: 13168kb
input:
16508
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 136067031
Test #109:
score: 0
Accepted
time: 61ms
memory: 14448kb
input:
33008
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 544351055
Test #110:
score: 0
Accepted
time: 103ms
memory: 17144kb
input:
65964
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2174733396
Test #111:
score: 0
Accepted
time: 184ms
memory: 22416kb
input:
131692
output:
000000000000000010010011100111101101111100000000100100010111001011011101111011001001001110010101101000011110011111101111100101011010001100001011111011010111001011011111000010111110011011000010110101001011000010011010110010011010100010111011111001101100100110101010010101111110010000101110110101100101...
result:
ok meet maximum 8669480792
Test #112:
score: 0
Accepted
time: 19ms
memory: 12488kb
input:
15843
output:
000000000000100110101010011100110010111100001001100001100101111100000011001001011010101011001111101111111001100100010110110011111001001110110101001110100101111100101111101101011000101011101111100111111011100100110110010100110010001100000101100010100101001100001111001010011010011011000011101100110010...
result:
ok meet maximum 125318747
Test #113:
score: 0
Accepted
time: 42ms
memory: 13312kb
input:
31560
output:
000000000000011101100110001011101110010100000111011111011100101011111110111000110110011001000101011010101000100011110010010001010111000101101100111010011100101011100101011011001000011001011010100010101001011100010010001100010001111011111100100001100011000100000101000110001001110110111110100100010001...
result:
ok meet maximum 497623597
Test #114:
score: 0
Accepted
time: 55ms
memory: 14528kb
input:
64241
output:
000000000000001011011101111001011010001100000010110101001011100110101010010111101101110111000011001001100111100001010001110000110010111100100100010110001011100110100011001001000111110111001001100001100111001011110001111011110000101001010100011111011110111100000011000010000111010010010101100011110000...
result:
ok meet maximum 2062587185
Test #115:
score: 0
Accepted
time: 102ms
memory: 17208kb
input:
73307
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 2685953056
Test #116:
score: 0
Accepted
time: 99ms
memory: 17136kb
input:
129593
output:
000000000000000110110100101000110110000100000001101100111001011101100110001101011011010010111110111000100010100000110000101111101110010100011100001101111001011101100001000111000010101101000111011111011101000110101111010110101111100111001100001010110101101011111110111110000010110001110011011110101111...
result:
ok meet maximum 8395295323