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_3 : List [ int ] , var_4 : int ) -> int :
      var_8 = [ ( var_5 , var_6 - var_5 ) for var_5 , var_6 in zip ( var_0 , var_3 ) if var_6 > var_5 ]
      var_11 = [ 0 ] * ( var_4 + 1 )
      for var_12 , var_13 in var_8 :
          for var_15 in range ( var_4 , var_12 - 1 , - 1 ) :
              var_11 [ var_15 ] = max ( var_11 [ var_15 ] , var_11 [ var_15 - var_12 ] + var_13 )
      return var_11 [ - 1 ]
  