結果

問題 No.2247 01 ZigZag
ユーザー 👑 KazunKazun
提出日時 2023-03-17 21:42:54
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 803 bytes
コンパイル時間 1,151 ms
コンパイル使用メモリ 81,600 KB
実行使用メモリ 65,788 KB
最終ジャッジ日時 2023-10-18 14:14:28
合計ジャッジ時間 3,954 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,380 KB
testcase_01 AC 38 ms
53,380 KB
testcase_02 AC 38 ms
53,380 KB
testcase_03 AC 47 ms
60,172 KB
testcase_04 AC 38 ms
53,380 KB
testcase_05 AC 42 ms
59,064 KB
testcase_06 AC 45 ms
59,572 KB
testcase_07 AC 38 ms
53,380 KB
testcase_08 AC 43 ms
59,496 KB
testcase_09 AC 44 ms
59,604 KB
testcase_10 AC 38 ms
53,380 KB
testcase_11 AC 44 ms
59,572 KB
testcase_12 AC 43 ms
59,068 KB
testcase_13 AC 44 ms
59,416 KB
testcase_14 AC 38 ms
53,380 KB
testcase_15 AC 43 ms
59,064 KB
testcase_16 AC 43 ms
59,376 KB
testcase_17 AC 43 ms
59,844 KB
testcase_18 AC 38 ms
53,380 KB
testcase_19 AC 38 ms
53,380 KB
testcase_20 AC 37 ms
53,380 KB
testcase_21 AC 43 ms
59,068 KB
testcase_22 AC 45 ms
60,240 KB
testcase_23 AC 43 ms
59,564 KB
testcase_24 AC 37 ms
53,380 KB
testcase_25 AC 42 ms
59,496 KB
testcase_26 AC 44 ms
59,588 KB
testcase_27 AC 41 ms
59,060 KB
testcase_28 AC 47 ms
60,672 KB
testcase_29 AC 47 ms
60,452 KB
testcase_30 AC 46 ms
60,664 KB
testcase_31 AC 37 ms
53,380 KB
testcase_32 AC 42 ms
59,624 KB
testcase_33 AC 42 ms
59,388 KB
testcase_34 AC 41 ms
59,276 KB
testcase_35 AC 42 ms
59,064 KB
testcase_36 AC 43 ms
59,480 KB
testcase_37 AC 42 ms
59,224 KB
testcase_38 AC 42 ms
59,224 KB
testcase_39 AC 43 ms
59,380 KB
testcase_40 AC 37 ms
53,380 KB
testcase_41 RE -
testcase_42 RE -
testcase_43 AC 38 ms
53,380 KB
testcase_44 AC 38 ms
53,380 KB
testcase_45 AC 48 ms
61,224 KB
testcase_46 AC 44 ms
60,240 KB
testcase_47 RE -
testcase_48 RE -
testcase_49 AC 38 ms
53,380 KB
testcase_50 AC 38 ms
53,380 KB
testcase_51 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N,M,K=map(int,input().split())

    Ans="2"
    if K%2==0:
        if (N>=K//2+1) and (M>=K//2):
            X=["0" if k%2==0 else "1" for k in range(K+1)]
            X[0]+="0"*(N-(K//2+1))
            X[-2]+="1"*(M-K//2)
            Ans=min(Ans, "".join(X))
        if (N>=K//2) and (M>=K//2+1):
            X=["1" if k%2==0 else "0" for k in range(K+1)]
            X[1]+="0"*(N-K//2)
            X[-1]+="1"*(M-(K//2+1))
            Ans=min(Ans, "".join(X))
    else:
        if (N>=(K+1)//2) and (M>=(K+1)//2):
            X=["0" if k%2==0 else "1" for k in range(K+1)]
            X[0]+="0"*(N-(K+1)//2)
            X[-2]+="1"*(M-(K+1)//2)
            Ans=min(Ans, "".join(X))
    return Ans if Ans!="2" else -1


#==================================================
print(solve())
0