結果

問題 No.2852 Yakitori Optimization Problem
ユーザー tassei903tassei903
提出日時 2024-08-25 13:33:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 498 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,284 KB
実行使用メモリ 137,948 KB
最終ジャッジ日時 2024-08-25 13:33:33
合計ジャッジ時間 4,230 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
92,620 KB
testcase_01 AC 164 ms
124,780 KB
testcase_02 AC 150 ms
114,952 KB
testcase_03 AC 199 ms
137,948 KB
testcase_04 AC 171 ms
124,064 KB
testcase_05 AC 90 ms
93,340 KB
testcase_06 AC 56 ms
74,656 KB
testcase_07 AC 172 ms
124,900 KB
testcase_08 AC 51 ms
71,060 KB
testcase_09 AC 199 ms
117,232 KB
testcase_10 AC 198 ms
133,188 KB
testcase_11 AC 198 ms
133,160 KB
testcase_12 AC 198 ms
133,188 KB
testcase_13 AC 199 ms
133,152 KB
testcase_14 AC 199 ms
133,188 KB
testcase_15 AC 197 ms
133,028 KB
testcase_16 AC 198 ms
133,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################


n, k = na()
a = na()
b = na()
c = na()
d = [b[i]-c[i] for i in range(n)]
d.sort(reverse=True)

ans = sum(a) + sum(c) + sum(d[:k])

print(ans)

0