C++ || Sort then count
\nclass Solution {\npublic:\n    int maxScore(vector<int>& nums) {\n        sort(nums.begin(),nums.end(),[](int a,int b){\n           return a>b; \n        });\
```\nclass Solution {\npublic:\n    int maxScore(vector<int>& nums) {\n        sort(nums.begin(),nums.end(),[](int a,int b){\n           return a>b; \n        });\n        long long ans=0,cnt=0;\n        for(int i=0;i<nums.size();i++){\n            ans += nums[i];\n            if(ans > 0) cnt+=1;\n        }\n        return cnt;\n    }\n};\n```
['C', 'Sorting', 'C++']