Python simple solution
Code\n\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        nums.sort(reverse=True)\n        pre = 0\n        output = 0\n        for i in
# Code\n```\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        nums.sort(reverse=True)\n        pre = 0\n        output = 0\n        for i in range(len(nums)):\n            pre += nums[i]\n            if pre > 0:\n                output += 1\n            else:\n                break\n                \n        return output\n```
['Sorting', 'Prefix Sum', 'Python3']