comefrom: <doocs>2291.Maximum Profit From Trading Stocks_1.py
code: def maximumProfit( present: List[int], future: List[int], budget: int) -> int:
      arr = [(a, b - a) for a, b in zip(present, future) if b > a]
      dp = [0] * (budget + 1)
      for v, w in arr:
          for j in range(budget, v - 1, -1):
              dp[j] = max(dp[j], dp[j - v] + w)
      return dp[-1]
masked: def sample_funcname ( var_0 : List [ int ] , var_1 : List [ int ] , var_2 : int ) -> int :
      var_5 = [ ( var_3 , var_4 - var_3 ) for var_3 , var_4 in zip ( var_0 , var_1 ) if var_4 > var_3 ]
      var_6 = [ 0 ] * ( var_2 + 1 )
      for var_7 , var_8 in var_5 :
          for var_9 in range ( var_2 , var_7 - 1 , - 1 ) :
              var_6 [ var_9 ] = max ( var_6 [ var_9 ] , var_6 [ var_9 - var_7 ] + var_8 )
      return var_6 [ - 1 ]
  