easy c++ code beats 24.43%
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:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int maxCount(vector<int>& banned, int n, int maxSum) {\n        set<int>b(banned.begin(),banned.end());\n        int mc=0;\n        int sum=0;\n        for(int i=1;i<=n;i++){\n            if(b.count(i)==0){\n                sum +=i;\n                if(sum>maxSum) break;\n                mc++;\n            }\n        }\n        return mc;\n    }\n};\n```
['C++']