結果

問題 No.909 たぴの配置
ユーザー stngstng
提出日時 2022-08-08 20:47:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 153 ms / 3,000 ms
コード長 371 bytes
コンパイル時間 791 ms
コンパイル使用メモリ 81,716 KB
実行使用メモリ 100,044 KB
最終ジャッジ日時 2023-10-19 09:13:09
合計ジャッジ時間 4,766 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,420 KB
testcase_01 AC 39 ms
53,420 KB
testcase_02 AC 38 ms
53,420 KB
testcase_03 AC 39 ms
53,420 KB
testcase_04 AC 38 ms
53,420 KB
testcase_05 AC 130 ms
96,372 KB
testcase_06 AC 134 ms
96,556 KB
testcase_07 AC 135 ms
97,876 KB
testcase_08 AC 153 ms
100,044 KB
testcase_09 AC 147 ms
96,600 KB
testcase_10 AC 153 ms
98,148 KB
testcase_11 AC 148 ms
97,768 KB
testcase_12 AC 136 ms
100,032 KB
testcase_13 AC 131 ms
96,440 KB
testcase_14 AC 142 ms
97,904 KB
testcase_15 AC 138 ms
97,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

ans = 10**8
ctr = -1

for i in range(n):
    if ans > x[i]+y[i]:
        ans = x[i]+y[i]
        ctr = x[i]

print(ans)
print(0)
for i in range(n):
    if ctr > x[i]:
        print(x[i])
    elif ans - ctr > y[i]:
        print(ans-y[i])
    else:
        print(ctr)
print(ans)
0