parameters: (self, scores, ages)
return_statement: return max(dp.itervalues())
docstring: :type scores: List[int]
          :type ages: List[int]
          :rtype: int
docstring_summary: :type scores: List[int]
          :type ages: List[int]
          :rtype: int
docstring_tokens: : type scores : List [ int ] : type ages : List [ int ] : rtype : int
function: def bestTeamScore(self, scores, ages):
          """
          :type scores: List[int]
          :type ages: List[int]
          :rtype: int
          """
          players = sorted(zip(scores, ages))
          sorted_ages = sorted(set(ages))
          dp = collections.defaultdict(int)
          result = 0
          for score, age in players:
              dp[age] = max(dp[a] for a in sorted_ages if a <= age) + score
          return max(dp.itervalues())
function_tokens: def bestTeamScore ( self , scores , ages ) : players = sorted ( zip ( scores , ages ) ) sorted_ages = sorted ( set ( ages ) ) dp = collections . defaultdict ( int ) result = 0 for score , age in players : dp [ age ] = max ( dp [ a ] for a in sorted_ages if a <= age ) + score return max ( dp . itervalues ( ) )