Company: Agoda_27july
Difficulty: medium
Maximize Intern Reward Points Problem Two interns are assigned a total of n tasks. Every task must be completed by exactly one of them. Intern 1 earns reward_1[i] points for completing task i , and intern 2 earns reward_2[i] points for completing that same task. Intern 1 must complete exactly k of the n tasks - any k of them - and intern 2 completes the remaining n - k tasks. Determine the largest possible total number of reward points the two interns can earn together. Input Format Line 1: a single integer k , the number of tasks intern 1 must complete. Line 2: a single integer n , the number of elements in reward_1 . The next n lines: reward_1[0] , reward_1[1] , ..., reward_1[n-1] , one integer per line. The next line: a single integer n , the number of elements in reward_2 . (inferred - the source's custom-testing format repeats the array size before each array; this value is always equal to the n on line 2.) The next n lines: reward_2[0] , reward_2[1] , ..., reward_2[n-1] , one int