Python: MaxHeap
IntuitionWe need the top 2 cups at any timeApproachUse a max heap to keep track of the top 2 types of cup at any secondCode
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
We need the top 2 cups at any time

# Approach
<!-- Describe your approach to solving the problem. -->
Use a max heap to keep track of the top 2 types of cup at any second


# Code
```python3 []
class Solution:
    def fillCups(self, amount: List[int]) -> int:
        heap = []
        for i in amount:
            if i != 0:
                heapq.heappush(heap, -i)
        
        resp = 0
        while heap:
            print(heap)
            if len(heap) >= 2:
                x1 = -heapq.heappop(heap)
                x2 = -heapq.heappop(heap)
                x1 -= 1
                x2 -= 1
                if x1 != 0:
                    heapq.heappush(heap, -x1)
                if x2 != 0:
                    heapq.heappush(heap, -x2)
                resp += 1
            else:
                x1 = -heapq.heappop(heap)
                resp += x1
        return resp
        
```
['Python3']