C++ || Easy Solution
Upvote toh banta hai\n\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        //basic cases\n        if(amount[1]+amount[2]+amount[3]==1)r
***Upvote toh banta hai***\n```\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        //basic cases\n        if(amount[1]+amount[2]+amount[3]==1)return 1;\n        if(amount[1]+amount[2]+amount[3]==0)return 0;\n\t\t\n        priority_queue<int>pq;\n        \n\t\t//pushing element in queue\n        for(int i=0;i<3;i++)\n        {\n            pq.push(amount[i]);\n        }\n\t\t//initializing return variable;\n        int count=0;\n\t\t\n        while(pq.top()!=0)\n        {\n               //for cases [5,4,4] then n=5 and m=4\n                int n=pq.top();  pq.pop();  int m=pq.top();\n\t\t\t\t//for cases [5,0,0] n=5 and m=0 so we add 5 to final answer\n                if(m==0){   \n                    count+=n;\n                    break;}\n                else{\n                   pq.pop();\n\t\t\t\t   //reducing each by 1 and pushing in priority queue\n                   pq.push(n-1);\n                   pq.push(m-1);\n                  }\n\t\t\t\t  //and adding the repetitions to the answer\n            count++;\n        }\n        return count;\n    }\n};\n```
['Heap (Priority Queue)']