結果

問題 No.909 たぴの配置
ユーザー tanon710tanon710
提出日時 2019-10-18 22:07:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 432 ms / 3,000 ms
コード長 345 bytes
コンパイル時間 216 ms
コンパイル使用メモリ 10,428 KB
実行使用メモリ 39,260 KB
最終ジャッジ日時 2023-09-07 23:35:12
合計ジャッジ時間 7,402 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,712 KB
testcase_01 AC 14 ms
7,836 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 14 ms
7,760 KB
testcase_04 AC 15 ms
7,716 KB
testcase_05 AC 394 ms
37,784 KB
testcase_06 AC 415 ms
39,260 KB
testcase_07 AC 392 ms
37,508 KB
testcase_08 AC 417 ms
37,844 KB
testcase_09 AC 432 ms
38,524 KB
testcase_10 AC 403 ms
36,504 KB
testcase_11 AC 398 ms
37,428 KB
testcase_12 AC 402 ms
37,936 KB
testcase_13 AC 419 ms
37,852 KB
testcase_14 AC 392 ms
37,748 KB
testcase_15 AC 385 ms
36,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0