結果

問題 No.1376 Simple LPS Problem
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-02-05 22:54:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,311 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 86,148 KB
最終ジャッジ日時 2023-09-15 09:45:13
合計ジャッジ時間 8,478 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,560 KB
testcase_01 AC 70 ms
71,504 KB
testcase_02 AC 69 ms
71,456 KB
testcase_03 AC 70 ms
71,324 KB
testcase_04 AC 70 ms
71,592 KB
testcase_05 AC 71 ms
71,252 KB
testcase_06 AC 71 ms
71,500 KB
testcase_07 AC 71 ms
71,400 KB
testcase_08 AC 72 ms
71,256 KB
testcase_09 AC 72 ms
71,404 KB
testcase_10 AC 71 ms
71,612 KB
testcase_11 AC 72 ms
71,436 KB
testcase_12 AC 71 ms
71,460 KB
testcase_13 AC 72 ms
71,108 KB
testcase_14 AC 72 ms
71,320 KB
testcase_15 AC 71 ms
71,280 KB
testcase_16 AC 71 ms
71,456 KB
testcase_17 AC 70 ms
71,412 KB
testcase_18 AC 71 ms
71,420 KB
testcase_19 AC 71 ms
71,480 KB
testcase_20 AC 71 ms
71,496 KB
testcase_21 AC 70 ms
71,528 KB
testcase_22 AC 71 ms
71,548 KB
testcase_23 AC 70 ms
71,352 KB
testcase_24 AC 70 ms
71,516 KB
testcase_25 AC 71 ms
71,456 KB
testcase_26 AC 70 ms
71,324 KB
testcase_27 AC 70 ms
71,432 KB
testcase_28 AC 70 ms
71,520 KB
testcase_29 AC 71 ms
71,148 KB
testcase_30 AC 70 ms
71,204 KB
testcase_31 AC 70 ms
71,336 KB
testcase_32 AC 71 ms
71,460 KB
testcase_33 AC 70 ms
71,436 KB
testcase_34 AC 71 ms
71,264 KB
testcase_35 AC 71 ms
71,384 KB
testcase_36 AC 70 ms
71,268 KB
testcase_37 AC 71 ms
71,100 KB
testcase_38 AC 71 ms
71,312 KB
testcase_39 AC 72 ms
71,436 KB
testcase_40 AC 70 ms
71,572 KB
testcase_41 AC 70 ms
71,328 KB
testcase_42 WA -
testcase_43 AC 82 ms
86,148 KB
testcase_44 AC 72 ms
71,524 KB
testcase_45 AC 75 ms
76,196 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 78 ms
79,860 KB
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 81 ms
83,700 KB
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 71 ms
71,216 KB
testcase_56 AC 71 ms
71,160 KB
testcase_57 AC 71 ms
71,152 KB
testcase_58 AC 76 ms
78,628 KB
testcase_59 AC 79 ms
81,644 KB
testcase_60 AC 70 ms
71,220 KB
testcase_61 AC 71 ms
71,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

001101

K = 1の場合
S = 2以下じゃないと無理

dpで解く?
dpi = 現状回文になる可能性のある最長のi
偶数長と奇数長がある
両方に気を配る

K = 5の時 6にも注意する必要がある

長さ3と4を同時に潰せる?
0110 → 無理


4と5は?
0XX11X0X0

長さ5と6は?

9,4はあるか?

11110010110010
やっぱりdp?

1111001010


11111000100 11011100000

1*K , 0*(K-2) , 1 , 0*((K-1)//2)

0*K , 1*(K-1)//2 , 0*

K = 4
1111010000

K = 5
111110100000

K = 6
1111110011000000


"""

import sys
from sys import stdin

N,K = map(int,stdin.readline().split())

ans = [1] * K + [0] * (K//3) + [1] * (K//3) + [0] * K
if len(ans) < N:
    print (-1)
else:
    print ("".join(map(str,ans[:N])))


"""
if K == 1:
    if N == 1:
        print ("0")
    elif N == 2:
        print ("10")
    else:
        print (-1)
    sys.exit()
elif N == K:
    print ("0"*K)
    sys.exit()

ans = [None] * N
for i in range(K):
    ans[i] = 0
ans[K] = 1

for i in range(K+1,N):

    a1 = ans[i-K] ^ 1
    a2 = ans[i-(K+1)] ^ 1

    if a1 != a2:
        print (-1)
        sys.exit()

    ans[i] = a1

print ("".join(map(str,ans)))
"""

"""
if K == 1:
    if N == 1:
        print ("0")
    elif N == 2:
        print ("10")
    else:
        print (-1)

elif K == 2:
"""
0