結果

問題 No.2247 01 ZigZag
ユーザー okapin
提出日時 2023-03-17 22:40:22
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 462 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 81,628 KB
実行使用メモリ 66,304 KB
最終ジャッジ日時 2024-09-18 11:45:43
合計ジャッジ時間 4,062 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 1
other AC * 37 WA * 8 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())


def f(k):
    c = (k-1)//2
    if c >= n or c >= m:
        return -1
    else:
        return '0'*(n-c)+'10'*c+'1'*(m-c)


if k % 2:
    print(f(k))
else:
    if k == 0:
        if m == 0:
            print('0'*n)
        elif n == 0:
            print('1'*m)
        else:
            print(-1)
    else:
        res = f(k-1)[1:]
        if res == -1:
            print(-1)
        else:
            print(f(k-1)[1:]+'0')
0