comefrom: <doocs>0123.Best Time to Buy and Sell Stock III_1.py
code: def maxProfit( prices: List[int]) -> int:
      f1, f2, f3, f4 = -prices[0], 0, -prices[0], 0
      for price in prices[1:]:
          f1 = max(f1, -price)
          f2 = max(f2, f1 + price)
          f3 = max(f3, f2 - price)
          f4 = max(f4, f3 + price)
      return f4
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_1 , var_2 , var_3 , var_4 = - var_0 [ 0 ] , 0 , - var_0 [ 0 ] , 0
      for var_5 in var_0 [ 1 : ] :
          var_1 = max ( var_1 , - var_5 )
          var_2 = max ( var_2 , var_1 + var_5 )
          var_3 = max ( var_3 , var_2 - var_5 )
          var_4 = max ( var_4 , var_3 + var_5 )
      return var_4
  