結果
| 問題 |
No.2247 01 ZigZag
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2023-03-17 21:45:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 384 bytes |
| コンパイル時間 | 614 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 52,864 KB |
| 最終ジャッジ日時 | 2024-09-18 10:33:51 |
| 合計ジャッジ時間 | 3,654 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 45 WA * 5 |
ソースコード
n, m, k = map(int, input().split())
k += 1
if n * m == 0:
if k:
print(-1)
else:
print('0' * n if n else '1' * m)
exit(0)
c0 = (k + 1) // 2
c1 = k // 2
if c0 <= n and c1 <= m:
ans = '0' * (n - c0) + '01' * c1 + '1' * (m - c1) + '0' * (k % 2)
elif c0 <= m and c1 <= n:
assert n == c1
ans = '10' * c1 + '1' * (m - c1)
else:
ans = -1
print(ans)
Kude