C++ || easy ||pq
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 fillCups(vector<int>& am) \n    {\n        priority_queue<int> pq;\n        for(auto i :am)\n        {\n            pq.push(i);\n        }\n        int count=0;\n        while(pq.top()!=0)\n        {\n            int a=pq.top();\n            pq.pop();\n            int b=pq.top();\n            pq.pop();\n            a--;\n            b--;\n            pq.push(a);\n            pq.push(b);\n            count++;\n        }\n        return count;\n    }\n};\n```
['C++']