3767. Maximize Points After Choosing K Tasks
You are given two integer arrays,
technique1andtechnique2, each of lengthn, wherenrepresents the number of tasks to complete.
- If the
i^thtask is completed using technique 1, you earntechnique1[i]points.- If it is completed using technique 2, you earn
technique2[i]points.You are also given an integer
k, representing the minimum number of tasks that must be completed using technique 1.You must complete at least
ktasks using technique 1 (they do not need to be the firstktasks).The remaining tasks may be completed using either technique.
Return an integer denoting the maximum total points you can earn.
1 | class Solution { |