結果

問題 No.2247 01 ZigZag
ユーザー shakayamishakayami
提出日時 2023-03-17 21:31:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 462 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 81,660 KB
実行使用メモリ 77,604 KB
最終ジャッジ日時 2023-10-18 13:59:28
合計ジャッジ時間 4,174 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,428 KB
testcase_01 AC 38 ms
53,428 KB
testcase_02 AC 43 ms
60,064 KB
testcase_03 AC 65 ms
77,240 KB
testcase_04 AC 42 ms
59,744 KB
testcase_05 AC 53 ms
64,392 KB
testcase_06 AC 56 ms
69,160 KB
testcase_07 AC 44 ms
59,644 KB
testcase_08 AC 59 ms
73,860 KB
testcase_09 AC 62 ms
75,884 KB
testcase_10 AC 44 ms
59,936 KB
testcase_11 AC 56 ms
69,160 KB
testcase_12 AC 53 ms
66,580 KB
testcase_13 AC 55 ms
66,896 KB
testcase_14 AC 42 ms
59,688 KB
testcase_15 AC 53 ms
64,392 KB
testcase_16 AC 54 ms
66,876 KB
testcase_17 AC 67 ms
77,604 KB
testcase_18 AC 44 ms
59,996 KB
testcase_19 AC 42 ms
60,168 KB
testcase_20 AC 42 ms
59,808 KB
testcase_21 AC 55 ms
66,580 KB
testcase_22 AC 57 ms
73,660 KB
testcase_23 AC 55 ms
69,156 KB
testcase_24 AC 43 ms
60,008 KB
testcase_25 AC 58 ms
73,860 KB
testcase_26 AC 55 ms
69,308 KB
testcase_27 AC 50 ms
62,296 KB
testcase_28 AC 65 ms
77,328 KB
testcase_29 AC 66 ms
77,404 KB
testcase_30 AC 64 ms
77,392 KB
testcase_31 AC 42 ms
59,620 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 55 ms
66,880 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 44 ms
60,192 KB
testcase_41 AC 37 ms
53,428 KB
testcase_42 WA -
testcase_43 AC 38 ms
53,428 KB
testcase_44 AC 37 ms
53,428 KB
testcase_45 AC 67 ms
77,560 KB
testcase_46 AC 66 ms
77,564 KB
testcase_47 WA -
testcase_48 AC 38 ms
53,428 KB
testcase_49 AC 37 ms
53,428 KB
testcase_50 AC 38 ms
53,428 KB
testcase_51 WA -
権限があれば一括ダウンロードができます

ソースコード

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
'''
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