标签:http 排序 image solution alt self tco 题目 def
题目描述:
排序加后缀和
class Solution: def maxSatisfaction(self, satisfaction: List[int]) -> int: satisfaction.sort() t_s = 0 res = 0 for i in satisfaction[::-1]: if t_s + i > 0: t_s += i res += t_s return res
标签:http 排序 image solution alt self tco 题目 def
原文地址:https://www.cnblogs.com/oldby/p/12636141.html