comefrom: <doocs>0309.Best Time to Buy and Sell Stock with Cooldown_1.py
code: def maxProfit( prices: List[int]) -> int:
      f1, f2, f3 = -prices[0], 0, 0
      for price in prices[1:]:
          pf1, pf2, pf3 = f1, f2, f3
          f1 = max(pf1, pf3 - price)
          f2 = max(pf2, pf1 + price)
          f3 = max(pf3, pf2)
      return f2
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_4 , var_5 , var_6 = - var_0 [ 0 ] , 0 , 0
      for var_8 in var_0 [ 1 : ] :
          var_9 , var_10 , var_11 = var_4 , var_5 , var_6
          var_4 = max ( var_9 , var_11 - var_8 )
          var_5 = max ( var_10 , var_9 + var_8 )
          var_6 = max ( var_11 , var_10 )
      return var_5
  