#include #include #include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int32_t N, i, K; cin >> N >> K; vector A(N), B(N), C(N); for (i = 0; i != N; ++i) cin >> A[i]; for (i = 0; i != N; ++i) cin >> B[i]; for (i = 0; i != N; ++i) cin >> C[i]; int64_t ans = 0; for (i = 0; i != N; ++i) ans += A[i] + C[i], B[i] -= C[i]; sort(B.begin(), B.end(), greater()); for (i = 0; i != K; ++i) ans += B[i]; cout << ans << '\n'; return 0; }