c++ || easy to understand || using priority_queue || 2ms || clean code
\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int> p;\n        for(auto it: amount) p.push(it);\n        int tota
```\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int> p;\n        for(auto it: amount) p.push(it);\n        int total=0;\n        int a,b;\n        while(1){\n            a=p.top(); p.pop();\n            b=p.top(); p.pop();\n            if(a==0 || b==0){\n                total+=(a+b);\n                return total;\n            }\n            else{\n                total++;\n                a-- , b--;\n                p.push(a);\n                p.push(b);\n            }\n        }\n        return 0;\n    }\n};\n```
['C', 'Heap (Priority Queue)']