結果
問題 | No.2247 01 ZigZag |
ユーザー |
![]() |
提出日時 | 2023-03-18 19:51:54 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 530 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,992 KB |
最終ジャッジ日時 | 2024-09-18 13:28:41 |
合計ジャッジ時間 | 3,262 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 42 WA * 8 |
ソースコード
N, M, K = map(int, input().split())a = min(N, M)b = max(N, M)if a == b and 2 * a - 1 < K:print(-1)exit()if a != b and 2 * a < K:print(-1)exit()if N <= M and 2 * N == K:print("10" * N + "1" * (M - N))exit()if N >= M and 2 * M == K:print("0" * (N - M) + "10" * (M))exit()if K % 2 == 0:print("0" * (N - K // 2) + "10" * (K // 2 - 1) + "1" * (M - K // 2 + 1) + "0")exit()else:print("0" * (N - (2 * K - 1) // 2) + "01" * ((2 * K - 1) // 2) + "1" * (M - (2 * K - 1) // 2))