結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
tktk_snsn
|
| 提出日時 | 2021-01-22 10:40:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 218 ms / 3,000 ms |
| コード長 | 323 bytes |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 125,160 KB |
| 最終ジャッジ日時 | 2024-12-26 05:17:36 |
| 合計ジャッジ時間 | 5,889 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
n = int(input())
X = tuple(map(int, input().split()))
Y = tuple(map(int, input().split()))
ans = min(x + y for x, y in zip(X, Y))
pos = [0] * (n + 2)
pos[n + 1] = ans
for i, (x, y) in enumerate(zip(X, Y), 1):
if x < y:
pos[i] = min(ans, x)
else:
pos[i] = max(0, ans - y)
print(ans, *pos, sep="\n")
tktk_snsn