結果

問題 No.909 たぴの配置
ユーザー J21blackcat
提出日時 2019-11-19 23:17:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 417 ms / 3,000 ms
コード長 469 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 38,776 KB
最終ジャッジ日時 2024-10-04 13:06:21
合計ジャッジ時間 7,915 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

total = int(input())
dist_top = list(map(int, input().split(" ")))
dist_last = list(map(int, input().split(" ")))

ans = 0

for i in range(total):
    q = dist_top[i] + dist_last[i]
    if ans == 0:
        ans = q
    elif ans > q:
        ans = q

print(ans)
print(0)

for i in range(total):
    if dist_top[i] - ans < dist_last[i]:
        print(dist_top[i])
    elif ans - dist_last[i] >= 0:
        print(ans - dist_last[i])
    else:
        print(0)

print(ans)
0