c++ using max heap
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int miceAndCheese(vector<int>& r1, vector<int>& r2, int k) {\n        priority_queue<pair<int,pair<int,int>>>p;\n        for(int i=0;i<r1.size();i++){\n            p.push({r1[i]-r2[i],{r1[i],i}});\n        }\n        long long points=0;\n         unordered_set<int>s;\n        while(k--){\n          int a,b;\n          if(!p.empty()){\n              a=p.top().second.first;\n              b=p.top().second.second;\n          }\n          p.pop();\n          points+=a;\n            s.insert(b);\n        }\n       \n            for(int j=0;j<r2.size();j++){\n                if(s.find(j)==s.end())\n                points+=r2[j];\n                \n            }\n        return points;\n    }\n};\n```
['Heap (Priority Queue)', 'C++']