結果

問題 No.909 たぴの配置
ユーザー lloyzlloyz
提出日時 2022-07-16 21:31:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 352 ms / 3,000 ms
コード長 282 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 44,256 KB
最終ジャッジ日時 2023-09-11 07:30:19
合計ジャッジ時間 8,853 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,752 KB
testcase_01 AC 16 ms
7,732 KB
testcase_02 AC 15 ms
7,728 KB
testcase_03 AC 15 ms
7,740 KB
testcase_04 AC 15 ms
7,764 KB
testcase_05 AC 327 ms
41,280 KB
testcase_06 AC 340 ms
42,364 KB
testcase_07 AC 325 ms
39,660 KB
testcase_08 AC 336 ms
42,356 KB
testcase_09 AC 341 ms
44,256 KB
testcase_10 AC 315 ms
41,960 KB
testcase_11 AC 309 ms
41,860 KB
testcase_12 AC 335 ms
41,192 KB
testcase_13 AC 352 ms
40,952 KB
testcase_14 AC 307 ms
36,812 KB
testcase_15 AC 307 ms
42,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

XY = [X[i] + Y[i] for i in range(n)]
ans = min(XY)
print(ans)

ANS = []
for i in range(n):
    ANS.append(min(X[i], abs(ans - Y[i])))
flag = True
ANS = [0] + ANS + [ans]
print(*ANS, sep='\n')
0