100% Beat runtime easy soln
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>& amount) \n    {\n        priority_queue<int>q;\n        for(int a:amount)\n            q.push(a);\n        bool flag=true;\n        int sum=0;\n        while(flag)\n        {\n            int a=q.top();\n            q.pop();\n            int b=q.top();\n            q.pop();\n            if(b==0)\n            {\n                sum=sum+a;\n                flag=false;\n            }\n            else\n            {\n                sum++;\n                a--;b--;\n                q.push(a);\n                q.push(b);\n            }\n        }\n        return sum;\n    }\n};\n```
['C++']