結果

問題 No.2852 Yakitori Optimization Problem
ユーザー 👑 KA37RIKA37RI
提出日時 2024-08-25 13:57:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 82,420 KB
実行使用メモリ 112,996 KB
最終ジャッジ日時 2024-08-25 13:57:32
合計ジャッジ時間 4,035 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
88,860 KB
testcase_01 AC 144 ms
109,968 KB
testcase_02 AC 128 ms
101,672 KB
testcase_03 AC 170 ms
106,172 KB
testcase_04 AC 151 ms
110,784 KB
testcase_05 AC 86 ms
90,280 KB
testcase_06 AC 56 ms
71,616 KB
testcase_07 AC 153 ms
112,996 KB
testcase_08 AC 53 ms
69,432 KB
testcase_09 AC 169 ms
108,356 KB
testcase_10 AC 174 ms
106,372 KB
testcase_11 AC 175 ms
107,408 KB
testcase_12 AC 175 ms
105,952 KB
testcase_13 AC 177 ms
107,344 KB
testcase_14 AC 177 ms
105,816 KB
testcase_15 AC 176 ms
105,708 KB
testcase_16 AC 174 ms
107,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

bmc = [b[i] - c[i] for i in range(n)]
bmc.sort()
bmc = list(reversed(bmc))

print( sum(a) + sum(c) + sum(bmc[:k]) )
0