結果

問題 No.2247 01 ZigZag
ユーザー ああいい
提出日時 2023-04-25 11:08:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 82,148 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-11-14 07:14:00
合計ジャッジ時間 3,746 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

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

import sys

if N >= (K + 2) // 2 and M >= (K + 1) // 2:
	n = (K + 2) // 2
	m = (K + 1) // 2
	S = "01" * m
	if n > m:
		ans = "0" *(N - n) + S + "1" * (M - m) + "0"
	else:
		ans = "0" * (N - n) + S + "1" * (M - m)
	print(ans)
elif N >= (K + 1) // 2 and M >= (K + 2) // 2:
	n = (K + 1) // 2
	m = (K + 2) // 2
	S = "10" * n
	if m > n:
		ans = S + "1" * (M - m + 1)
	else:
		ans = S[:-1] + "1" * (M - m) + "0"
	print(ans)
else:
	print(-1)
0