Simple Java Solution
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int miceAndCheese(int[] reward1, int[] reward2, int k) {
        int res =0, n = reward1.length, diff[] = new int[n];
        for(int i=0; i<n; i++) {
            diff[i] = reward1[i]- reward2[i];
            res += reward2[i];
        }

        Arrays.sort(diff);
        for(int i =0 ;i < k;  i++) {
            res += diff[n - i - 1];
        }

        return res;
    }
}
```
['Java']