結果
| 問題 |
No.2247 01 ZigZag
|
| コンテスト | |
| ユーザー |
もちふわゆるゆる
|
| 提出日時 | 2023-03-17 21:51:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 583 bytes |
| コンパイル時間 | 378 ms |
| コンパイル使用メモリ | 81,948 KB |
| 実行使用メモリ | 69,760 KB |
| 最終ジャッジ日時 | 2024-09-18 10:41:29 |
| 合計ジャッジ時間 | 3,619 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 42 WA * 7 RE * 1 |
ソースコード
import sys, math
input = lambda: sys.stdin.readline()[:-1]
def MI(): return map(int, input().split())
inf = 10**18
n,m,k = MI()
if n==0:
if k==0:
print('1'*m)
else:
print(-1)
exit()
if m==0:
if k==0:
print('0'*n)
else:
print(-1)
exit()
cnt = [0,0]
ans = []
for i in range(k+1):
cnt[i%2] += 1
ans.append(str(i%2))
# print(ans)
# print(cnt)
if cnt[0] > n or cnt[1] > m:
print(-1); exit()
ans[0] += '0'*(n-cnt[0])
if (k+1)%2==0:
ans[-1] += '1'*(m-cnt[1])
else:
ans[-2] += '1'*(m-cnt[1])
print("".join(ans))
もちふわゆるゆる