結果

問題 No.909 たぴの配置
ユーザー roarisroaris
提出日時 2019-10-21 22:39:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 186 ms / 3,000 ms
コード長 357 bytes
コンパイル時間 592 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 111,288 KB
最終ジャッジ日時 2023-09-15 15:07:18
合計ジャッジ時間 5,233 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,524 KB
testcase_01 AC 71 ms
71,348 KB
testcase_02 AC 70 ms
71,444 KB
testcase_03 AC 70 ms
71,332 KB
testcase_04 AC 71 ms
71,580 KB
testcase_05 AC 186 ms
110,528 KB
testcase_06 AC 175 ms
111,288 KB
testcase_07 AC 166 ms
107,304 KB
testcase_08 AC 181 ms
110,588 KB
testcase_09 AC 182 ms
111,212 KB
testcase_10 AC 170 ms
107,540 KB
testcase_11 AC 169 ms
108,048 KB
testcase_12 AC 180 ms
110,600 KB
testcase_13 AC 180 ms
110,820 KB
testcase_14 AC 167 ms
107,120 KB
testcase_15 AC 166 ms
106,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
max_d = min(Xi+Yi for Xi, Yi in zip(X, Y))
pos = [0] * (N+2)
pos[-1] = max_d

for i in range(1, N+1):
    Xi, Yi = X[i-1], Y[i-1]
    
    if max_d > Yi:
        pos[i] = max_d-Yi

print(max_d)

for pos_i in pos:
    print(pos_i)
0