結果

問題 No.909 たぴの配置
ユーザー 👑 KazunKazun
提出日時 2020-10-14 16:31:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 251 bytes
コンパイル時間 1,663 ms
コンパイル使用メモリ 85,176 KB
実行使用メモリ 119,816 KB
最終ジャッジ日時 2023-09-28 00:39:30
合計ジャッジ時間 9,984 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
71,184 KB
testcase_01 AC 75 ms
71,320 KB
testcase_02 WA -
testcase_03 AC 66 ms
71,276 KB
testcase_04 AC 64 ms
71,000 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 172 ms
115,316 KB
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))

T=[0]*(N+2)

r=X[0]+Y[0]
for i in range(N):
    if r>X[i]+Y[i]:
        r=X[i]+Y[i]

T[-1]=r
for i in range(N):
    T[i+1]=max(r-Y[i],-X[i])

print(r)
print(*T,sep="\n")
0