comefrom: <qiyuangong>416_Partition_Equal_Subset_Sum_2.py
code: def canPartition( nums):
      total_sum = sum(nums)
      if total_sum & 1:
          return False
      target = total_sum >> 1
      dp = [0] * (target + 1)
      dp[0] = 1
      for num in nums:
          for i in range(target, num - 1, -1):
              dp[i] = dp[i] | dp[i - num]
      return dp[target] == 1
masked: def sample_funcname ( var_0 ) :
      var_2 = sum ( var_0 )
      if var_2 & 1 :
          return False
      var_5 = var_2 >> 1
      var_7 = [ 0 ] * ( var_5 + 1 )
      var_7 [ 0 ] = 1
      for var_8 in var_0 :
          for var_10 in range ( var_5 , var_8 - 1 , - 1 ) :
              var_7 [ var_10 ] = var_7 [ var_10 ] | var_7 [ var_10 - var_8 ]
      return var_7 [ var_5 ] == 1
  