comefrom: <doocs>1626.Best Team With No Conflicts_1.py
code: def bestTeamScore( scores: List[int], ages: List[int]) -> int:
      nums = list(zip(ages, scores))
      nums.sort()
      n = len(nums)
      dp = [num[1] for num in nums]
      for i in range(n):
          for j in range(i):
              if nums[i][1] >= nums[j][1]:
                  dp[i] = max(dp[i], dp[j] + nums[i][1])
      return max(dp)
masked: def sample_funcname ( var_0 : List [ int ] , var_3 : List [ int ] ) -> int :
      var_6 = list ( zip ( var_3 , var_0 ) )
      var_6.sort ( )
      var_9 = len ( var_6 )
      var_12 = [ var_10 [ 1 ] for var_10 in var_6 ]
      for var_14 in range ( var_9 ) :
          for var_15 in range ( var_14 ) :
              if var_6 [ var_14 ] [ 1 ] >= var_6 [ var_15 ] [ 1 ] :
                  var_12 [ var_14 ] = max ( var_12 [ var_14 ] , var_12 [ var_15 ] + var_6 [ var_14 ] [ 1 ] )
      return max ( var_12 )
  