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_1 , var_2 , var_3 = - var_0 [ 0 ] , 0 , 0
      for var_4 in var_0 [ 1 : ] :
          var_5 , var_6 , var_7 = var_1 , var_2 , var_3
          var_1 = max ( var_5 , var_7 - var_4 )
          var_2 = max ( var_6 , var_5 + var_4 )
          var_3 = max ( var_7 , var_6 )
      return var_2
  