結果

問題 No.2247 01 ZigZag
ユーザー shobonvipshobonvip
提出日時 2023-03-17 22:37:21
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 763 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 81,692 KB
実行使用メモリ 76,916 KB
最終ジャッジ日時 2023-10-18 15:33:53
合計ジャッジ時間 4,266 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,440 KB
testcase_01 AC 38 ms
53,440 KB
testcase_02 AC 37 ms
53,440 KB
testcase_03 AC 53 ms
68,028 KB
testcase_04 AC 37 ms
53,440 KB
testcase_05 AC 52 ms
66,760 KB
testcase_06 AC 51 ms
65,300 KB
testcase_07 AC 37 ms
53,440 KB
testcase_08 AC 56 ms
70,644 KB
testcase_09 AC 54 ms
68,824 KB
testcase_10 AC 37 ms
53,440 KB
testcase_11 AC 51 ms
67,012 KB
testcase_12 AC 51 ms
66,760 KB
testcase_13 AC 49 ms
64,380 KB
testcase_14 AC 37 ms
53,440 KB
testcase_15 AC 53 ms
67,476 KB
testcase_16 AC 57 ms
70,364 KB
testcase_17 AC 57 ms
72,140 KB
testcase_18 AC 37 ms
53,440 KB
testcase_19 AC 37 ms
53,440 KB
testcase_20 AC 36 ms
53,440 KB
testcase_21 AC 47 ms
62,996 KB
testcase_22 AC 58 ms
72,016 KB
testcase_23 AC 50 ms
64,848 KB
testcase_24 AC 37 ms
53,440 KB
testcase_25 AC 57 ms
70,644 KB
testcase_26 AC 54 ms
68,544 KB
testcase_27 AC 52 ms
68,276 KB
testcase_28 AC 55 ms
72,076 KB
testcase_29 AC 54 ms
68,976 KB
testcase_30 AC 59 ms
73,524 KB
testcase_31 AC 37 ms
53,440 KB
testcase_32 AC 57 ms
73,848 KB
testcase_33 AC 52 ms
69,012 KB
testcase_34 AC 52 ms
67,568 KB
testcase_35 AC 50 ms
65,432 KB
testcase_36 AC 53 ms
69,104 KB
testcase_37 AC 45 ms
62,616 KB
testcase_38 AC 45 ms
62,616 KB
testcase_39 AC 47 ms
64,028 KB
testcase_40 AC 37 ms
53,440 KB
testcase_41 RE -
testcase_42 RE -
testcase_43 AC 37 ms
53,440 KB
testcase_44 AC 38 ms
53,440 KB
testcase_45 AC 63 ms
76,916 KB
testcase_46 AC 64 ms
76,916 KB
testcase_47 RE -
testcase_48 RE -
testcase_49 AC 37 ms
53,440 KB
testcase_50 AC 37 ms
53,440 KB
testcase_51 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k = map(int,input().split())
# zero 先頭
zero = k // 2 + 1
one = (k + 1) // 2
if zero <= n and one <= m:
	v = [1] * (k + 1)
	if k % 2 == 1:
		v[0] = n - zero + 1
		v[-1] = m - one + 1
	else:
		v[0] = n - zero + 1
		v[-2] = m - one + 1
	ans = []
	for i in range(k+1):
		for j in range(v[i]):
			if i % 2 == 0:
				ans.append("0")
			else:
				ans.append("1")
	print("".join(ans))
	exit()

# one 先頭
zero = (k + 1) // 2
one = k // 2 + 1
if zero <= n and one <= m:
	v = [1] * (k + 1)
	if k % 2 == 1:
		v[1] = n - zero + 1
		v[-2] = m - one + 1
	else:
		v[1] = n - zero + 1
		v[-1] = m - one + 1
	ans = []
	for i in range(k+1):
		for j in range(v[i]):
			if i % 2 == 1:
				ans.append("0")
			else:
				ans.append("1")
	print("".join(ans))
	exit()

print(-1)
0