':type k: int
:type W: int
:type Profits: List[int]
:type Capital: List[int]
:rtype: int'

def findMaximizedCapital(self, k, W, Profits, Capital):

    curr = []
    future = sorted(zip(Capital, Profits), reverse=True)
    for _ in xrange(k):
        while (future and (future[(-1)][0] <= W)):
            heapq.heappush(curr, (- future.pop()[1]))
        if curr:
            W -= heapq.heappop(curr)
    return W
