結果

問題 No.2247 01 ZigZag
ユーザー ShirotsumeShirotsume
提出日時 2023-03-08 14:13:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,020 bytes
コンパイル時間 636 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 71,260 KB
最終ジャッジ日時 2023-10-18 10:26:28
合計ジャッジ時間 4,677 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
55,520 KB
testcase_01 AC 41 ms
55,520 KB
testcase_02 AC 56 ms
63,912 KB
testcase_03 WA -
testcase_04 AC 52 ms
63,912 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 52 ms
63,912 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 52 ms
63,912 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 54 ms
63,912 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 53 ms
63,912 KB
testcase_19 AC 53 ms
65,960 KB
testcase_20 AC 54 ms
63,912 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 53 ms
63,912 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 52 ms
63,912 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 54 ms
64,164 KB
testcase_38 AC 55 ms
64,164 KB
testcase_39 WA -
testcase_40 AC 55 ms
65,960 KB
testcase_41 AC 49 ms
61,992 KB
testcase_42 AC 49 ms
61,992 KB
testcase_43 AC 42 ms
55,520 KB
testcase_44 AC 43 ms
55,520 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 43 ms
55,520 KB
testcase_48 AC 43 ms
55,520 KB
testcase_49 AC 43 ms
55,520 KB
testcase_50 AC 42 ms
55,520 KB
testcase_51 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
INF = 2**63-1
mod = 998244353
n, m, k = mi()
ans = '2'
#0101...型

s1 = deque(['0'])
cnt0 = 1
cnt1 = 0
for i in range(k):
    if  i % 2 == 0:
        cnt1 += 1
        s1.append('1')
    else:
        cnt0 += 1
        s1.append('0')
if cnt0 <= n and cnt1 <= m:
    while cnt0 < n:
        s1.appendleft('0')
        cnt0 += 1
    while cnt1 < m:
        s1.appendleft('1')
        cnt1 += 1
    ans = min(ans, ''.join(s1))
#1010...型

s1 = deque(['1'])
cnt0 = 0
cnt1 = 1
for i in range(k):
    if  i % 2:
        cnt1 += 1
        s1.append('1')
    else:
        cnt0 += 1
        s1.append('0')
if cnt0 <= n and cnt1 <= m:
    while cnt0 < n:
        s1.appendleft('0')
        cnt0 += 1
    while cnt1 < m:
        s1.appendleft('1')
        cnt1 += 1
    ans = min(ans, ''.join(s1))

if ans == '2':
    print(-1)
else:
    print(ans)



0