Maximum Reward Allocation

There are two interns and n tasks. For the i-th task, if finished by intern 1, it yields reward1[i]; if finished by intern 2, it yields reward2[i]. Intern 1 must complete exactly k tasks, while intern...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: