結果

問題 No.2247 01 ZigZag
ユーザー okapin
提出日時 2023-03-17 22:49:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 543 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,532 KB
実行使用メモリ 54,808 KB
最終ジャッジ日時 2024-09-18 11:58:37
合計ジャッジ時間 3,684 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 42 WA * 8
権限があれば一括ダウンロードができます

ソースコード

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)
        if res == -1:
            print(-1)
        else:
            res = f(k-1)[1:]+'0'
            if res[0] == '1':
                res = res[1:]+'1'
            print(res)
0