c++ || Heap || easy
\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        int n=amount.size();\n        int cnt=0;\n        priority_queue<int>pq;\n        
```\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        int n=amount.size();\n        int cnt=0;\n        priority_queue<int>pq;\n        if(amount[0]!=0)\n        pq.push(amount[0]);\n        if(amount[1]!=0)\n        pq.push(amount[1]);\n        if(amount[2]!=0)\n        pq.push(amount[2]);\n        while(pq.size()>0)\n        {\n            cnt++;\n            cout<<cnt<<endl;\n            int a=0,b=0;\n            if(pq.size()!=0)\n            { a=pq.top();\n            pq.pop(); a=a-1;}\n            if(pq.size()!=0)\n            { b=pq.top();\n            pq.pop(); b=b-1;}\n            if(a>0)\n            {\n                pq.push(a);\n                \n            }\n            if(b>0)\n            {\n                pq.push(b);\n            }\n        }\n        return cnt;\n    }\n};\n```
['C', 'Heap (Priority Queue)']