Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The intended solution uses greedy approach.
Imagine at first that the second mouse eats all the cheese, then we should choose k types of cheese with the maximum sum of - reward2[i] + reward1[i].