Solution in c++
IntuitionMy first thought was to include or to exclude a specific reward point from mouse 1.After that i thought to sort based on reward points  creating a pair
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
My first thought was to include or to exclude a specific reward point from mouse 1.After that i thought to sort based on reward points  creating a pair like this (reward1[i], reward2[i]).The sort would be based on the first member of the pair in descending order.So after the sort i would take the k maximums of reward1 and after i would take the n-k reward2 points

# Approach
<!-- Describe your approach to solving the problem. -->
In the process i realized that if i have in input something like this 
   reward1 = [7,5,4] reward2 = [1000,6,2] and k=1 for example my initial strategy would not work.So i decided to have a DS like this {reward1[i], reward2[i], reward1[i]-reward2[i]} and to sort based on the third member(reward1[i]-reward2[i]) in descending order . 

# Complexity
- Time complexity:
 188 ms

- Space complexity:
  164.43 MB

# Code
```cpp []
class Solution {
public:
    static bool sortByThirdDescending(const std::vector<int>& a, const std::vector<int>& b) {
                 return a[2] > b[2]; // Compare the third elements
      }
             
    int miceAndCheese(vector<int>& reward1, vector<int>& reward2, int k) {
        int n = reward1.size();
        vector<vector<int>> v;
        int maxPoints = 0;
        for (int i=0;i<n;i++){
            vector<int> v1 = {reward1[i], reward2[i], reward1[i]-reward2[i]};
            v.push_back(v1);
        }
        sort(v.begin(), v.end(), sortByThirdDescending);

        for (int i=0;i<k;i++)
             maxPoints += v[i][0];
        for (int i=k;i<n;i++)
            maxPoints += v[i][1];
        
        return maxPoints;
    }
};
```
['C++']