simple c++ solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int mod=1e9+7;\n    int maxScore(vector<int>& nums1) {\n        \n        int cnt=0;\n        int n=nums1.size();\n        sort(nums1.begin(),nums1.end());\n        reverse(nums1.begin(),nums1.end());\n        vector<long long>nums(n+1);\n        nums[0]=nums1[0];\n       for(long long i=1;i<n;i++){\n           nums[i]=(nums[i-1]+nums1[i]);\n       }\n        for(long long i=0;i<n;i++){\n           if(nums[i]>0)cnt++;\n       }\n       return cnt;\n        \n        \n        \n    }\n};\n```
['C++']