C++ | Easy Solution | Priority queue
\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int>pq;\n        \n        for(int i=0;i<amount.size();i++){\n     
```\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int>pq;\n        \n        for(int i=0;i<amount.size();i++){\n            pq.push(amount[i]);\n        }\n        int ans=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            ans++;\n          \n        }\n        return ans;\n    }\n};\n```
['C']