結果
| 問題 |
No.2852 Yakitori Optimization Problem
|
| コンテスト | |
| ユーザー |
prd_xxx
|
| 提出日時 | 2024-08-25 13:35:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 402 ms / 2,000 ms |
| コード長 | 329 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 81,968 KB |
| 実行使用メモリ | 138,108 KB |
| 最終ジャッジ日時 | 2024-08-25 13:35:55 |
| 合計ジャッジ時間 | 6,396 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
N,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
order = list(range(N))
order.sort(key=lambda i: C[i]-B[i])
ans = 0
for i in range(K):
ans += A[order[i]] + B[order[i]]
for i in range(K,N):
ans += A[order[i]] + C[order[i]]
print(ans)
prd_xxx