C++ Solution || Easy to Understand || 100% Faster
\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int> pq;\n        for(int i=0;i<3;i++)\n        {\n            pq.p
```\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int> pq;\n        for(int i=0;i<3;i++)\n        {\n            pq.push(amount[i]);\n        }\n        \n        int count=0;\n        while(pq.top()!=0)\n        {\n            int num1=pq.top();\n            num1-=1;\n            pq.pop();\n            int num2=pq.top();\n            num2-=1;\n            pq.pop();\n            \n            pq.push(num1);\n            pq.push(num2);\n            \n            count++;\n        }\n        \n        return count;\n    }\n};\n```
['C', 'Heap (Priority Queue)']