Easy C++ Priority Queue Solution
Intuition\n\n Describe your first thoughts on how to solve this problem. \n\n\n# Code\n\nclass Solution {\npublic:\n    int miceAndCheese(vector<int>&r1, vector
# Intuition\n![IMG20230402090941.jpg](https://assets.leetcode.com/users/images/a9b8b85b-6a50-48a4-8424-d9a066afd7bc_1680408070.6846004.jpeg)\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n\n# Code\n```\nclass Solution {\npublic:\n    int miceAndCheese(vector<int>&r1, vector<int>& r2, int k) {\n       priority_queue<int>pq;\n        long long int ans=0;\n        for(int i=0;i<r1.size();i++){\n           pq.push(r1[i]-r2[i]);\n            ans+=r2[i];\n        }\n        while(k!=0){\n          ans+=pq.top();\n            pq.pop();\n            k--;\n        }\n        return ans;\n    }\n};\n```
['C++']