結果
| 問題 |
No.909 たぴの配置
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-18 22:07:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 458 ms / 3,000 ms |
| コード長 | 345 bytes |
| コンパイル時間 | 481 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 38,684 KB |
| 最終ジャッジ日時 | 2024-06-25 17:01:41 |
| 合計ジャッジ時間 | 7,384 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
n=int(input())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
d=10**18
for i in range(n):
d=min(d,arr1[i]+arr2[i])
print(d)
pos=[0]*(n+2)
pos[-1]=d
for i in range(1,n+1):
l0=0
r0=arr1[i-1]
ln=d-arr2[i-1]
rn=d
if r0<=rn:
pos[i]=r0
else:
pos[i]=rn
for val in pos:
print(val)