QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#73839#5434. Binary SubstringsdnialhAC ✓314ms36808kbPython32.3kb2023-01-29 07:34:502023-01-29 07:34:52

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-29 07:34:52]
  • 评测
  • 测评结果:AC
  • 用时:314ms
  • 内存:36808kb
  • [2023-01-29 07:34:50]
  • 提交

answer

rprint = print

#def print(*x):
#    pass
dbg = False

def construct(z, v):
    if z == 1:
        return [0, 1]

    pref = z - 1
    
    base = construct(z - 1, (1 << (z - 1)) + z - 2)
    base.append(base[0])

    if dbg: print(z, v)
    
    rs = len(base)

    seen = [0] * (1 << z)
    mask = (1 << z) - 1
    nexl = [-1 for _ in range(1 << pref)]
    curr = 0

    st0 = []
    
    for i in range(rs):
        
        curr = 2 * curr | base[i]
        curr &= mask

        if i >= pref:
            assert seen[curr] == 0
            
            seen[curr] = 1
            st0.append(curr >> 1)

            #nexl[curr >> 1] = base[i]

    assert len(st0) == 1 << pref
    for i in range(1 << pref):
        nexl[st0[i - 1]] = st0[i] % 2
    
    if dbg: print(nexl, st0)
            
    cyc = [[] for _ in range(1 << pref)]

    rem = v - (1 << pref) - (pref - 1)

    for i in range(1 << pref):
        st = []
        if nexl[i] == -1:
            continue

        st.append(i)
        while nexl[st[-1]] != -1 and rem:
            u = nexl[st[-1]] ^ 1
            nexl[st[-1]] = -1
            
            nn = (2 * st[-1] + u) & (mask >> 1)

            #print(st[-1], u, nn)
            
            st.append(nn)
            rem -= 1

        if dbg:
            print(i, st)
            print(cyc, nexl)

        assert rem == 0 or st[-1] == i
        cyc[i] = st[1:]

        if rem == 0:
            break

    #assert rem == 0

    #st0.reverse()
    #print(st0)
    
    lst0 = []
    while st0[-1] != i:
        lst0.append(st0.pop())

    st0 = lst0[::-1] + st0

    #print(st0)

    out = []
    #print(cyc)

    for v in st0:
        out.append(v)
        out.extend(cyc[v])
    
    #print(out)

    res = []
    v = out[0]
    for _ in range(pref):
        res.append(v % 2)
        v //= 2
    res.reverse()

    for v in out[1:]:
        res.append(v % 2)

    zz = 0
    while rem:
        rem -= 1
        res.append(out[zz] % 2)
        zz += 1

    return res

n = int(input())
if n == 1:
    print(0)
else:    
    for i in range(2, 100):
        if n <= pow(2, i) + i - 1:
            rprint(''.join(map(str, construct(i, n))))
            break

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 9ms
memory: 8004kb

input:

2

output:

10

result:

ok meet maximum 3

Test #2:

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

input:

5

output:

00110

result:

ok meet maximum 12

Test #3:

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

input:

1

output:

0

result:

ok meet maximum 1

Test #4:

score: 0
Accepted
time: 16ms
memory: 8088kb

input:

3

output:

100

result:

ok meet maximum 5

Test #5:

score: 0
Accepted
time: 16ms
memory: 8008kb

input:

4

output:

0011

result:

ok meet maximum 8

Test #6:

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

input:

6

output:

011000

result:

ok meet maximum 16

Test #7:

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

input:

7

output:

1100010

result:

ok meet maximum 21

Test #8:

score: 0
Accepted
time: 14ms
memory: 8048kb

input:

8

output:

11000101

result:

ok meet maximum 27

Test #9:

score: 0
Accepted
time: 12ms
memory: 8000kb

input:

9

output:

100010111

result:

ok meet maximum 34

Test #10:

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

input:

10

output:

1000101110

result:

ok meet maximum 42

Test #11:

score: 0
Accepted
time: 12ms
memory: 8000kb

input:

11

output:

00101110000

result:

ok meet maximum 50

Test #12:

score: 0
Accepted
time: 11ms
memory: 7996kb

input:

12

output:

010111000011

result:

ok meet maximum 59

Test #13:

score: 0
Accepted
time: 314ms
memory: 36808kb

input:

200000

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 19996962278

Test #14:

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

input:

24

output:

001101001011110000010001

result:

ok meet maximum 240

Test #15:

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

input:

35

output:

11100000100011101100110100101011111

result:

ok meet maximum 526

Test #16:

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

input:

30

output:

011010010111100000100011101100

result:

ok meet maximum 381

Test #17:

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

input:

45

output:

000100011101100110100101011111000000110001011

result:

ok meet maximum 882

Test #18:

score: 0
Accepted
time: 16ms
memory: 8108kb

input:

66

output:

000100011101100110100101011111000000110001011011100100111101010000

result:

ok meet maximum 1953

Test #19:

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

input:

50

output:

00010001110110011010010101111100000011000101101110

result:

ok meet maximum 1097

Test #20:

score: 0
Accepted
time: 11ms
memory: 7932kb

input:

80

output:

00001100010110111001001111010100001000111011001101001010111111000000010100110010

result:

ok meet maximum 2901

Test #21:

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

input:

107

output:

00011000101101110010011110101000010001110110011010010101111110000000101001100101110100010010000011111011110

result:

ok meet maximum 5277

Test #22:

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

input:

81

output:

000011000101101110010011110101000010001110110011010010101111110000000101001100101

result:

ok meet maximum 2976

Test #23:

score: 0
Accepted
time: 11ms
memory: 7940kb

input:

147

output:

000001010011001011101000100100000111110111100111000110110101100001100010110111001001111010100001000111011001101001010101111111000000001101010100100

result:

ok meet maximum 10124

Test #24:

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

input:

255

output:

000010100110010111010001001000001111101111001110001101101011000011000101101110010011110101000010001110110011010010101011111110000000011010101001001011001000101011010000001001101111100101000110011111101001110101110000101111011011000111100010000111001100000

result:

ok meet maximum 31130

Test #25:

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

input:

173

output:

00001010011001011101000100100000111110111100111000110110101100001100010110111001001111010100001000111011001101001010101111111000000001101010100100101100100010101101000000100

result:

ok meet maximum 14115

Test #26:

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

input:

288

output:

000000110101010010010110010001010110100000010011011111001010001100111111010011101011100001011110110110001111000100001110011000001010011001011101000100100000111110111100111000110110101100001100010110111001001111010100001000111011101100110100101010111111110000000001011000100111001011010100

result:

ok meet maximum 39850

Test #27:

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

input:

407

output:

000000110101010010010110010001010110100000010011011111001010001100111111010011101011100001011110110110001111000100001110011000001010011001011101000100100000111110111100111000110110101100001100010110111001001111010100001000111011101100110100101010111111110000000001011000100111001011010100111110001110...

result:

ok meet maximum 80310

Test #28:

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

input:

349

output:

000000110101010010010110010001010110100000010011011111001010001100111111010011101011100001011110110110001111000100001110011000001010011001011101000100100000111110111100111000110110101100001100010110111001001111010100001000111011101100110100101010111111110000000001011000100111001011010100111110001110...

result:

ok meet maximum 58821

Test #29:

score: 0
Accepted
time: 18ms
memory: 8144kb

input:

526

output:

000000010110001001110010110101001111100011100000110010010011000110000100101001011111010110110111101000011011101010110011101101001101011110000111101110001010000010000000111010010001101000111111101100000011010101001001011001000101011101111110011011001010110100000010011011111001010001100110011111101001...

result:

ok meet maximum 134925

Test #30:

score: 0
Accepted
time: 18ms
memory: 8144kb

input:

1018

output:

001000100011101110110011010010101010111111111000000000011000000010001100011101010010100001111110001011111101110100110000111011000101010110111111100100101011110101111100001000010011111111010101010000000010100010000010111011011101110011010100011100100011110100101101100111101100100110100001011010010011...

result:

ok meet maximum 510567

Test #31:

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

input:

1017

output:

001000100011101110110011010010101010111111111000000000011000000010001100011101010010100001111110001011111101110100110000111011000101010110111111100100101011110101111100001000010011111111010101010000000010100010000010111011011101110011010100011100100011110100101101100111101100100110100001011010010011...

result:

ok meet maximum 509558

Test #32:

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

input:

1209

output:

000000001100000001000110001110101001010000111111000101111110111010011000011101100010101011011111110010010101111010111110000100001001111111101010101000000001010001000001011101101110111001101010001110010001111010010110110011110110010011010000101101001001110111101111101101010111001010100110110110100010...

result:

ok meet maximum 721446

Test #33:

score: 0
Accepted
time: 14ms
memory: 8400kb

input:

1632

output:

000001000110001110101001010000111111000101111110111010011000011101100010101011011111110010010101111010111110000100001001111111101010101000000001010001000001011101101110111001101010001110010001111010010110110011110110010011010000101101001001110111101111101101010111001010100110110110100010100100001100...

result:

ok meet maximum 1318299

Test #34:

score: 0
Accepted
time: 12ms
memory: 8212kb

input:

1829

output:

000100011000111010100101000011111100010111111011101001100001110110001010101101111111001001010111101011111000010000100111111110101010100000000101000100000101110110111011100110101000111001000111101001011011001111011001001101000010110100100111011110111110110101011100101010011011011010001010010000110011...

result:

ok meet maximum 1657336

Test #35:

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

input:

3187

output:

000000011100101001001101100010000001010111110111001011100100000100111010011111100101100111110010001000010111000001011011010100000111011111000100110101011010101011000000001100011011100111001001000010000011000000010000110101110011001100001011001010000001100110101100110110100101110111010111101110111100...

result:

ok meet maximum 5049170

Test #36:

score: 0
Accepted
time: 19ms
memory: 8364kb

input:

2138

output:

000000000100101101000110000011010000010100101011001001011110001010110110000010001001010100001100001101101110001100010010011111011001110000000110111111010111011000011111000001111010110001011101010001001111001111010001011010110111010000100100011100011101101101100100001111000010100001010101001110110010...

result:

ok meet maximum 2267222

Test #37:

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

input:

4030

output:

001011100000101101101010000011101111100010011010101101010101100000000110001101110011100100100001000001100000001000011010111001100110000101100101000000110011010110011011010010111011101011110111011110000001111111110111111110011101110000111000010011000100110000001000111110101001100010100111101111010101...

result:

ok meet maximum 8082284

Test #38:

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

input:

6101

output:

000000000011010010110011010101010100101010010000010101101011001000001101011000111110110110101110001101010111110010011101010000001011100101100010100010110001100011001000010010111111001000000010011110110111001100010111100000110111000100111110011010111011100011100101111100011000000111000000110000101001...

result:

ok meet maximum 18549195

Test #39:

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

input:

5917

output:

000000000011010010110011010101010100101010010000010101101011001000001101011000111110110110101110001101010111110010011101010000001011100101100010100010110001100011001000010010111111001000000010011110110111001100010111100000110111000100111110011010111011100011100101111100011000000111000000110000101001...

result:

ok meet maximum 17445655

Test #40:

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

input:

6635

output:

000000000011010010110011010101010100101010010000010101101011001000001101011000111110110110101110001101010111110010011101010000001011100101100010100010110001100011001000010010111111001000000010011110110111001100010111100000110111000100111110011010111011100011100101111100011000000111000000110000101001...

result:

ok meet maximum 21943566

Test #41:

score: 0
Accepted
time: 19ms
memory: 9692kb

input:

9993

output:

000000000001001100001101000010011101110011101010011011100011110100011000110101000100001001001010110001010110000011011011011010101101110111101100101100110010001111100100100010110000010010111011010101010011010000011000111001001010000101100110111011101001011000000010110010000101111010110010011001100010...

result:

ok meet maximum 49821572

Test #42:

score: 0
Accepted
time: 18ms
memory: 10080kb

input:

14474

output:

000000000001001100001101000010011101110011101010011011100011110100011000110101000100001001001010110001010110000011011011011010101101110111101100101100110010001111100100100010110000010010111011010101010011010000011000111001001010000101100110111011101001011000000010110010000101111010110010011001100010...

result:

ok meet maximum 104583873

Test #43:

score: 0
Accepted
time: 25ms
memory: 9712kb

input:

11534

output:

000000000001001100001101000010011101110011101010011011100011110100011000110101000100001001001010110001010110000011011011011010101101110111101100101100110010001111100100100010110000010010111011010101010011010000011000111001001010000101100110111011101001011000000010110010000101111010110010011001100010...

result:

ok meet maximum 66388863

Test #44:

score: 0
Accepted
time: 44ms
memory: 11412kb

input:

19098

output:

000000000000111100010010110010110010000001001111110100011001101110101001011111101100001010011011010110101100000111110100010010111010000011111001110001001000000111100100000011010110100000110101011100001000011100010000110011001110011000011100110101010011011111011011000010111101101010100101000110001111...

result:

ok meet maximum 182141836

Test #45:

score: 0
Accepted
time: 42ms
memory: 12076kb

input:

31872

output:

000000010010001100101101000100011011100101111111100101101111101010010001110011110100100011110111001101100111100100101001000010100010010001001000011000101010101011011100101010101001111011010010110001011110101011010110110000111100000011001111001111111010001011110111010111011010110111100110101100010100...

result:

ok meet maximum 507514777

Test #46:

score: 0
Accepted
time: 37ms
memory: 11724kb

input:

27626

output:

000000000110100101100110101010101001010100100000101011010110010000011010110001111101101101011100011010101111100100111010100000010111001011000101000101100011000110010000100101111110010000000100111101101110011000101111000001101110001001111100110101110111000111001011111000110000001110000011100000011000...

result:

ok meet maximum 381257844

Test #47:

score: 0
Accepted
time: 68ms
memory: 14764kb

input:

43245

output:

000000000000101000010110101101011111101110010101000011111111100000111110110011010001001000111011100001011100011010000100000011110100001010111010100111100110110111010100110101101111010110011100100001001001100111000111101010010000011010010100010010010101010001111110010000110100011010111101001000100000...

result:

ok meet maximum 934503599

Test #48:

score: 0
Accepted
time: 65ms
memory: 14156kb

input:

34491

output:

000000000000101000010110101101011111101110010101000011111111100000111110110011010001001000111011100001011100011010000100000011110100001010111010100111100110110111010100110101101111010110011100100001001001100111000111101010010000011010010100010010010101010001111110010000110100011010111101001000100000...

result:

ok meet maximum 594380060

Test #49:

score: 0
Accepted
time: 92ms
memory: 16336kb

input:

64535

output:

000000011100100111010001000010001000011001001010000010110101000100011110011100110100100100000101000001100010011001010111100010010100011100001010111000000110010100010110010010001010000111000000100101011101000001001100101100110100000111111011110001011011000011001101100111001011111100111101110011101101...

result:

ok meet maximum 2081512994

Test #50:

score: 0
Accepted
time: 133ms
memory: 19524kb

input:

65746

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 2160380385

Test #51:

score: 0
Accepted
time: 137ms
memory: 19568kb

input:

65861

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 2167946005

Test #52:

score: 0
Accepted
time: 133ms
memory: 19540kb

input:

66725

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 2225209765

Test #53:

score: 0
Accepted
time: 138ms
memory: 21560kb

input:

86349

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 3726867681

Test #54:

score: 0
Accepted
time: 136ms
memory: 19588kb

input:

68454

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 2342045211

Test #55:

score: 0
Accepted
time: 151ms
memory: 23044kb

input:

112260

output:

000000000000100000000001110001101001110100110010101001001101001011100001001111010001100111101110010101101100110101101000011111011001000100000111101001010001000010000100001100110110110110110100100001101000010101111010010011100000010101010101111011011001101001001011001101001011001000111011101000100101...

result:

ok meet maximum 6299544960

Test #56:

score: 0
Accepted
time: 142ms
memory: 22628kb

input:

108023

output:

000000000000100000000001110001101001110100110010101001001101001011100001001111010001100111101110010101101100110101101000011111011001000100000111101001010001000010000100001100110110110110110100100001101000010101111010010011100000010101010101111011011001101001001011001101001011001000111011101000100101...

result:

ok meet maximum 5832941098

Test #57:

score: 0
Accepted
time: 139ms
memory: 22424kb

input:

103787

output:

000000000000100000000001110001101001110100110010101001001101001011100001001111010001100111101110010101101100110101101000011111011001000100000111101001010001000010000100001100110110110110110100100001101000010101111010010011100000010101010101111011011001101001001011001101001011001000111011101000100101...

result:

ok meet maximum 5384393176

Test #58:

score: 0
Accepted
time: 154ms
memory: 24020kb

input:

128710

output:

000000001000101100100110100100111010100101010011011110001101111000100101110101100100000011110111000001100101011010010101010001011101111110001110000111101111110011001111110000000001000010010011101100001010001110011100111001101010111101010100000011111011000111101111001101111100011011011111001000001111...

result:

ok meet maximum 8281268235

Test #59:

score: 0
Accepted
time: 154ms
memory: 24112kb

input:

129534

output:

000001001010000101001000101010111011100101101100000010111111001110100100100011011000100110010010001011100001000001111001010000110001000110100111001010101111100010000010011010001001011110010000010110000110010010111001110011110001100001101000110001100010001110001000010110111010011101100011111100000011...

result:

ok meet maximum 8387651991

Test #60:

score: 0
Accepted
time: 152ms
memory: 24112kb

input:

128670

output:

000000001000101100100110100100111010100101010011011110001101111000100101110101100100000011110111000001100101011010010101010001011101111110001110000111101111110011001111110000000001000010010011101100001010001110011100111001101010111101010100000011111011000111101111001101111100011011011111001000001111...

result:

ok meet maximum 8276121255

Test #61:

score: 0
Accepted
time: 271ms
memory: 33580kb

input:

154721

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 11967003302

Test #62:

score: 0
Accepted
time: 279ms
memory: 32668kb

input:

143149

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 10243718420

Test #63:

score: 0
Accepted
time: 267ms
memory: 30996kb

input:

134065

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 8984762318

Test #64:

score: 0
Accepted
time: 272ms
memory: 34064kb

input:

163454

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 13356170345

Test #65:

score: 0
Accepted
time: 256ms
memory: 32036kb

input:

139150

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 9679327553

Test #66:

score: 0
Accepted
time: 302ms
memory: 34820kb

input:

172380

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 14854850208

Test #67:

score: 0
Accepted
time: 278ms
memory: 35120kb

input:

178166

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 15868884317

Test #68:

score: 0
Accepted
time: 283ms
memory: 32776kb

input:

143651

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 10315696937

Test #69:

score: 0
Accepted
time: 311ms
memory: 36656kb

input:

198199

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 19638413795

Test #70:

score: 0
Accepted
time: 299ms
memory: 35680kb

input:

186272

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 17345817782

Test #71:

score: 0
Accepted
time: 284ms
memory: 36676kb

input:

198102

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 19619194797

Test #72:

score: 0
Accepted
time: 19ms
memory: 9144kb

input:

8201

output:

110111101100011001111000111101101000011101000111010010001101000111111101100000011010101001001011001000101011101111110011011001010110100000010011011111001010001100110011001111110100111010111000010111100101111011011000111100010000111001100000101010001011100111100100001010011001011101000100100000111110...

result:

ok meet maximum 33542145

Test #73:

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

input:

8202

output:

110111101100011001111000111101101000011101000111010010001101000111111101100000011010101001001011001000101011101111110011011001010110100000010011011111001010001100110011001111110100111010111000010111100101111011011000111100010000111001100000101010001011100111100100001010011001011101000100100000111110...

result:

ok meet maximum 33550335

Test #74:

score: 0
Accepted
time: 14ms
memory: 9032kb

input:

8203

output:

111111111110000000000000100110000110100001001110111001110101001101110001111010001100011010100010000100100101011000101011000001101101101101010110111011110110010110011001000111110010010001011000001001011101101010101001101000001100011100100101000010110011011101110100101100000001011001000010111101011001...

result:

ok meet maximum 33558526

Test #75:

score: 0
Accepted
time: 23ms
memory: 9028kb

input:

8204

output:

111111111110000000000000100110000110100001001110111001110101001101110001111010001100011010100010000100100101011000101011000001101101101101010110111011110110010110011001000111110010010001011000001001011101101010101001101000001100011100100101000010110011011101110100101100000001011001000010111101011001...

result:

ok meet maximum 33566718

Test #76:

score: 0
Accepted
time: 21ms
memory: 9468kb

input:

8205

output:

000000000000100110000110100001001110111001110101001101110001111010001100011010100010000100100101011000101011000001101101101101010110111011110110010110011001000111110010010001011000001001011101101010101001101000001100011100100101000010110011011101110100101100000001011001000010111101011001001100110001...

result:

ok meet maximum 33574910

Test #77:

score: 0
Accepted
time: 23ms
memory: 9600kb

input:

8206

output:

000000000001001100001101000010011101110011101010011011100011110100011000110101000100001001001010110001010110000011011011011010101101110111101100101100110010001111100100100010110000010010111011010101010011010000011000111001001010000101100110111011101001011000000010110010000101111010110010011001100010...

result:

ok meet maximum 33583103

Test #78:

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

input:

16394

output:

101111101011011011110100001101110111110101011011010011111010111100100011011101010110011101101001101011110000111101110001010000010000000111100110010000001110101101001110011011110110111101100011001111000111101101000011101000111010010001101000111111101100000011010101001001011001000101011101111110011011...

result:

ok meet maximum 134193153

Test #79:

score: 0
Accepted
time: 28ms
memory: 10084kb

input:

16395

output:

101111101011011011110100001101110111110101011011010011111010111100100011011101010110011101101001101011110000111101110001010000010000000111100110010000001110101101001110011011110110111101100011001111000111101101000011101000111010010001101000111111101100000011010101001001011001000101011101111110011011...

result:

ok meet maximum 134209535

Test #80:

score: 0
Accepted
time: 32ms
memory: 10168kb

input:

16396

output:

111111111111000000000000001111000100101100101100100000010011111101000110011011101010010111111011000010100110110101101011000001111101000100101110100000111110011100010010000001111001000000110101101000001101010111000010000111000100001100110011100110000111001101010100110111110110110000101111011010101001...

result:

ok meet maximum 134225918

Test #81:

score: 0
Accepted
time: 36ms
memory: 10088kb

input:

16397

output:

111111111111000000000000001111000100101100101100100000010011111101000110011011101010010111111011000010100110110101101011000001111101000100101110100000111110011100010010000001111001000000110101101000001101010111000010000111000100001100110011100110000111001101010100110111110110110000101111011010101001...

result:

ok meet maximum 134242302

Test #82:

score: 0
Accepted
time: 35ms
memory: 11188kb

input:

16398

output:

000000000000011110001001011001011001000000100111111010001100110111010100101111110110000101001101101011010110000011111010001001011101000001111100111000100100000011110010000001101011010000011010101110000100001110001000011001100111001100001110011010101001101111101101100001011110110101010010100011000111...

result:

ok meet maximum 134258686

Test #83:

score: 0
Accepted
time: 38ms
memory: 10988kb

input:

16399

output:

000000000000111100010010110010110010000001001111110100011001101110101001011111101100001010011011010110101100000111110100010010111010000011111001110001001000000111100100000011010110100000110101011100001000011100010000110011001110011000011100110101010011011111011011000010111101101010100101000110001111...

result:

ok meet maximum 134275071

Test #84:

score: 0
Accepted
time: 45ms
memory: 12040kb

input:

32779

output:

101011101010101110000000010010110100011000001101000001010010101100100101111000101011011000001000100101010000110000110110111000110001001001111011100100100111110110011100000001101111110101110110000111110000011110101001111010110111001111010101100001111010110001011101010001001111001111010001011010110111...

result:

ok meet maximum 536821761

Test #85:

score: 0
Accepted
time: 44ms
memory: 12036kb

input:

32780

output:

101011101010101110000000010010110100011000001101000001010010101100100101111000101011011000001000100101010000110000110110111000110001001001111011100100100111110110011100000001101111110101110110000111110000011110101001111010110111001111010101100001111010110001011101010001001111001111010001011010110111...

result:

ok meet maximum 536854527

Test #86:

score: 0
Accepted
time: 45ms
memory: 11816kb

input:

32781

output:

111111111111100000000000000010100001011010110101111110111001010100001111111110000011111011001101000100100011101110000101110001101000010000001111010000101011101010011110011011011101010011010110111101011001110010000100100110011100011110101001000001101001010001001001010101000111111001000011010001101011...

result:

ok meet maximum 536887294

Test #87:

score: 0
Accepted
time: 40ms
memory: 11948kb

input:

32782

output:

111111111111100000000000000010100001011010110101111110111001010100001111111110000011111011001101000100100011101110000101110001101000010000001111010000101011101010011110011011011101010011010110111101011001110010000100100110011100011110101001000001101001010001001001010101000111111001000011010001101011...

result:

ok meet maximum 536920062

Test #88:

score: 0
Accepted
time: 66ms
memory: 13808kb

input:

32783

output:

000000000000001010000101101011010111111011100101010000111111111000001111101100110100010010001110111000010111000110100001000000111101000010101110101001111001101101110101001101011011110101100111001000010010011001110001111010100100000110100101000100100101010100011111100100001101000110101111010010001000...

result:

ok meet maximum 536952830

Test #89:

score: 0
Accepted
time: 74ms
memory: 13920kb

input:

32784

output:

000000000000010100001011010110101111110111001010100001111111110000011111011001101000100100011101110000101110001101000010000001111010000101011101010011110011011011101010011010110111101011001110010000100100110011100011110101001000001101001010001001001010101000111111001000011010001101011110100100010000...

result:

ok meet maximum 536985599

Test #90:

score: 0
Accepted
time: 75ms
memory: 15876kb

input:

65548

output:

111111101111110011101101000011011111100110001100000110010010110001000011011111000111100001110011110001001110101101100011000001011000010110000110111001000010001001101000101010111001101000011111001100101001000000110001010000100000000000110110101010101011000011001011101010000100100000110000110100110011...

result:

ok meet maximum 2147385345

Test #91:

score: 0
Accepted
time: 88ms
memory: 15924kb

input:

65549

output:

111111101111110011101101000011011111100110001100000110010010110001000011011111000111100001110011110001001110101101100011000001011000010110000110111001000010001001101000101010111001101000011111001100101001000000110001010000100000000000110110101010101011000011001011101010000100100000110000110100110011...

result:

ok meet maximum 2147450879

Test #92:

score: 0
Accepted
time: 74ms
memory: 15892kb

input:

65550

output:

111111111111110000000000000000110101010101010100100101010101011001000100010110000000100100010010110110000111011110001101010001101100011100100111000010110011010001010111110001111010000100111001101011111101100011010001000000010110011011001111100010110001010110100100000110111110000110001110011001001111...

result:

ok meet maximum 2147516414

Test #93:

score: 0
Accepted
time: 82ms
memory: 15736kb

input:

65551

output:

111111111111110000000000000000110101010101010100100101010101011001000100010110000000100100010010110110000111011110001101010001101100011100100111000010110011010001010111110001111010000100111001101011111101100011010001000000010110011011001111100010110001010110100100000110111110000110001110011001001111...

result:

ok meet maximum 2147581950

Test #94:

score: 0
Accepted
time: 136ms
memory: 19604kb

input:

65552

output:

000000000000000110101010101010100100101010101011001000100010110000000100100010010110110000111011110001101010001101100011100100111000010110011010001010111110001111010000100111001101011111101100011010001000000010110011011001111100010110001010110100100000110111110000110001110011001001111000010111011101...

result:

ok meet maximum 2147647486

Test #95:

score: 0
Accepted
time: 142ms
memory: 19424kb

input:

65553

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 2147713023

Test #96:

score: 0
Accepted
time: 151ms
memory: 23668kb

input:

131085

output:

101010101010101111111111111111000000000000000001011100010000110000100111010111111001100110011011001011001000111111101001010100011111101010000010110000100110101010111010000111010100001001110010001110110001001100110011100101101100011111000110000010111101011010101111100111100001000100001111101011001111...

result:

ok meet maximum 8589737985

Test #97:

score: 0
Accepted
time: 141ms
memory: 23696kb

input:

131086

output:

101010101010101111111111111111000000000000000001011100010000110000100111010111111001100110011011001011001000111111101001010100011111101010000010110000100110101010111010000111010100001001110010001110110001001100110011100101101100011111000110000010111101011010101111100111100001000100001111101011001111...

result:

ok meet maximum 8589869055

Test #98:

score: 0
Accepted
time: 176ms
memory: 23836kb

input:

131087

output:

111111111111111000000000000000001011100010000110000100111010111111001100110011011001011001000111111101001010100011111101010000010110000100110101010111010000111010100001001110010001110110001001100110011100101101100011111000110000010111101011010101111100111100001000100001111101011001111110000011000100...

result:

ok meet maximum 8590000126

Test #99:

score: 0
Accepted
time: 174ms
memory: 23676kb

input:

131088

output:

111111111111111000000000000000001011100010000110000100111010111111001100110011011001011001000111111101001010100011111101010000010110000100110101010111010000111010100001001110010001110110001001100110011100101101100011111000110000010111101011010101111100111100001000100001111101011001111110000011000100...

result:

ok meet maximum 8590131198

Test #100:

score: 0
Accepted
time: 287ms
memory: 30900kb

input:

131089

output:

000000000000000010111000100001100001001110101111110011001100110110010110010001111111010010101000111111010100000101100001001101010101110100001110101000010011100100011101100010011001100111001011011000111110001100000101111010110101011111001111000010001000011111010110011111100000110001000110011100001010...

result:

ok meet maximum 8590262270

Test #101:

score: 0
Accepted
time: 268ms
memory: 30772kb

input:

131090

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 8590393343

Test #102:

score: 0
Accepted
time: 26ms
memory: 9144kb

input:

8197

output:

110111101100011001111000111101101000011101000111010010001101000111111101100000011010101001001011001000101011101111110011011001010110100000010011011111001010001100110011001111110100111010111000010111100101111011011000111100010000111001100000101010001011100111100100001010011001011101000100100000111110...

result:

ok meet maximum 33509395

Test #103:

score: 0
Accepted
time: 33ms
memory: 9976kb

input:

16328

output:

001111100011011001011101111100100001110000010101110100011111011100011011101100101010101110111011111111110011010010001110110100000001110001111110000100111100001000111101100111100000010101001001100000100000111101111001000001110101000111101011110101010110110011000111011000010110101110010111100001011100...

result:

ok meet maximum 133114152

Test #104:

score: 0
Accepted
time: 41ms
memory: 11996kb

input:

32608

output:

000011001001011000100001101111100011110000111001111000100111010110110001100000101100001011000011011100100001000100110100010101011100110100001111100110010100100000011000101000010000000000011011010101010101100001100101110101000010010000011000011010011001101111011111000101111010000111010110110110010101...

result:

ok meet maximum 531233481

Test #105:

score: 0
Accepted
time: 88ms
memory: 15832kb

input:

65141

output:

000011011111101011101100001111100000111101010011110101101110011110101011000011110101100010111010100010011110011110100010110101101110100001001000111000111011011011001000011110000101000010101010011101100101111111010000000101111100110001111110110111110100100100101000101010010110001110011111110001101001...

result:

ok meet maximum 2120796035

Test #106:

score: 0
Accepted
time: 160ms
memory: 24140kb

input:

130420

output:

000011010110100000110101011100001000011100010000110011001110011000011100110101110001110011010101001101111101101100001011110110101010010100011000111100000101010110100001011110000110100011100101101100101010011111010000110011111100010000100110111000010110100000000100111011110000010011101100111001001100...

result:

ok meet maximum 8502797880

Test #107:

score: 0
Accepted
time: 32ms
memory: 9468kb

input:

8265

output:

000000000001001100001101000010011101110011101010011011100011110100011000110101000100001001001010110001010110000011011011011010101101110111101100101100110010001111100100100010110000010010111011010101010011010000011000111001001010000101100110111011101001011000000010110010000101111010110010011001100010...

result:

ok meet maximum 34068260

Test #108:

score: 0
Accepted
time: 42ms
memory: 11188kb

input:

16508

output:

000000000000111100010010110010110010000001001111110100011001101110101001011111101100001010011011010110101100000111110100010010111010000011111001110001001000000111100100000011010110100000110101011100001000011100010000110011001110011000011100110101010011011111011011000010111101101010100101000110001111...

result:

ok meet maximum 136067031

Test #109:

score: 0
Accepted
time: 65ms
memory: 13860kb

input:

33008

output:

000000000000010100001011010110101111110111001010100001111111110000011111011001101000100100011101110000101110001101000010000001111010000101011101010011110011011011101010011010110111101011001110010000100100110011100011110101001000001101001010001001001010101000111111001000011010001101011110100100010000...

result:

ok meet maximum 544351055

Test #110:

score: 0
Accepted
time: 136ms
memory: 19636kb

input:

65964

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 2174733396

Test #111:

score: 0
Accepted
time: 247ms
memory: 30776kb

input:

131692

output:

000000000000000101110001000011000010011101011111100110011001101100101100100011111110100101010001111110101000001011000010011010101011101000011101010000100111001000111011000100110011001110010110110001111100011000001011110101101010111110011110000100010000111110101100111111000001100010001100111000010101...

result:

ok meet maximum 8669480792

Test #112:

score: 0
Accepted
time: 25ms
memory: 10172kb

input:

15843

output:

000000000001001100001101000010011101110011101010011011100011110100011000110101000100001001001010110001010110000011011011011010101101110111101100101100110010001111100100100010110000010010111011010101010011010000011000111001001010000101100110111011101001011000000010110010000101111010110010011001100010...

result:

ok meet maximum 125318747

Test #113:

score: 0
Accepted
time: 46ms
memory: 11876kb

input:

31560

output:

000000010010001100101101000100011011100101111111100101101111101010010001110011110100100011110111001101100111100100101001000010100010010001001000011000101010101011011100101010101001111011010010110001011110101011010110110000111100000011001111001111111010001011110111010111011010110111100110101100010100...

result:

ok meet maximum 497623597

Test #114:

score: 0
Accepted
time: 94ms
memory: 16228kb

input:

64241

output:

000000011100100111010001000010001000011001001010000010110101000100011110011100110100100100000101000001100010011001010111100010010100011100001010111000000110010100010110010010001010000111000000100101011101000001001100101100110100000111111011110001011011000011001101100111001011111100111101110011101101...

result:

ok meet maximum 2062587185

Test #115:

score: 0
Accepted
time: 124ms
memory: 20608kb

input:

73307

output:

000000000000001101010101010101001001010101010110010001000101100000001001000100101101100001110111100011010100011011000111001001110000101100110100010101111100011110100001001110011010111111011000110100010000000101100110110011111000101100010101101001000001101111100001100011100110010011110000101110111011...

result:

ok meet maximum 2685953056

Test #116:

score: 0
Accepted
time: 155ms
memory: 24184kb

input:

129593

output:

000001001010000101001000101010111011100101101100000010111111001110100100100011011000100110010010001011100001000001111001010000110001000110100111001010101111100010000010011010001001011110010000010110000110010010111001110011110001100001101000110001100010001110001000010110111010011101100011111100000011...

result:

ok meet maximum 8395295323