結果

問題 No.2247 01 ZigZag
ユーザー shakayamishakayami
提出日時 2023-03-17 21:34:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 551 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 81,624 KB
実行使用メモリ 77,616 KB
最終ジャッジ日時 2023-10-18 14:03:30
合計ジャッジ時間 4,148 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,420 KB
testcase_01 AC 38 ms
53,420 KB
testcase_02 AC 43 ms
60,056 KB
testcase_03 AC 66 ms
77,216 KB
testcase_04 AC 42 ms
59,732 KB
testcase_05 AC 54 ms
64,376 KB
testcase_06 AC 57 ms
69,144 KB
testcase_07 AC 42 ms
59,632 KB
testcase_08 AC 60 ms
73,844 KB
testcase_09 AC 61 ms
75,900 KB
testcase_10 AC 44 ms
59,924 KB
testcase_11 AC 55 ms
69,144 KB
testcase_12 AC 54 ms
66,564 KB
testcase_13 AC 55 ms
66,880 KB
testcase_14 AC 41 ms
59,676 KB
testcase_15 AC 53 ms
64,376 KB
testcase_16 AC 54 ms
66,860 KB
testcase_17 AC 66 ms
77,616 KB
testcase_18 AC 44 ms
59,984 KB
testcase_19 AC 42 ms
60,156 KB
testcase_20 AC 42 ms
59,796 KB
testcase_21 AC 54 ms
66,564 KB
testcase_22 AC 57 ms
73,644 KB
testcase_23 AC 56 ms
69,140 KB
testcase_24 AC 42 ms
59,996 KB
testcase_25 AC 58 ms
73,844 KB
testcase_26 AC 56 ms
69,292 KB
testcase_27 AC 50 ms
62,280 KB
testcase_28 AC 65 ms
77,300 KB
testcase_29 AC 64 ms
77,392 KB
testcase_30 AC 62 ms
77,408 KB
testcase_31 AC 40 ms
59,608 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 57 ms
66,864 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 44 ms
60,180 KB
testcase_41 AC 38 ms
53,420 KB
testcase_42 AC 39 ms
53,420 KB
testcase_43 AC 39 ms
53,420 KB
testcase_44 AC 38 ms
53,420 KB
testcase_45 AC 69 ms
77,580 KB
testcase_46 AC 68 ms
77,576 KB
testcase_47 AC 38 ms
53,420 KB
testcase_48 AC 39 ms
53,420 KB
testcase_49 AC 39 ms
53,420 KB
testcase_50 AC 39 ms
53,420 KB
testcase_51 AC 38 ms
53,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
'''
K+1個のブロック
a_0,...,a_K
a_i>=1

a_{2i}個の0
a_{2i+1}個の1
辞書順最小にするためには
a_0を極力大きく
a_2,a_4,...,a_{2i}を1
'''
if K==0:
    if N*M>0:
        print(-1)
    else:
        print("0"*N+"1"*M)
    exit()
A=[0 for i in range(K+1)]
for i in range(0,K+1,2):
    A[i]+=1
    N-=1
if N<0:
    print(-1)
    exit()
A[0]+=N
for i in range(1,K+1,2):
    A[i]+=1
    M-=1
if M<0:
    print(-1)
    exit()
A[K-(K+1)%2]+=M
for i in range(K+1):
    print(str(i%2)*A[i],end="")
print()
0