結果

問題 No.909 たぴの配置
ユーザー stng
提出日時 2022-08-08 20:47:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 3,000 ms
コード長 371 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 100,708 KB
最終ジャッジ日時 2024-09-19 05:25:08
合計ジャッジ時間 3,996 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

ans = 10**8
ctr = -1

for i in range(n):
    if ans > x[i]+y[i]:
        ans = x[i]+y[i]
        ctr = x[i]

print(ans)
print(0)
for i in range(n):
    if ctr > x[i]:
        print(x[i])
    elif ans - ctr > y[i]:
        print(ans-y[i])
    else:
        print(ctr)
print(ans)
0