comefrom: <doocs>0416.Partition Equal Subset Sum_1.py
code: def canPartition( nums: List[int]) -> bool:
      s = sum(nums)
      if s % 2 != 0:
          return False
      n = s >> 1
      dp = [False] * (n + 1)
      dp[0] = True
      for v in nums:
          for j in range(n, v - 1, -1):
              dp[j] = dp[j] or dp[j - v]
      return dp[-1]
masked: def sample_funcname ( var_0 : List [ int ] ) -> bool :
      var_1 = sum ( var_0 )
      if var_1 % 2 != 0 :
          return False
      var_2 = var_1 >> 1
      var_3 = [ False ] * ( var_2 + 1 )
      var_3 [ 0 ] = True
      for var_4 in var_0 :
          for var_5 in range ( var_2 , var_4 - 1 , - 1 ) :
              var_3 [ var_5 ] = var_3 [ var_5 ] or var_3 [ var_5 - var_4 ]
      return var_3 [ - 1 ]
  