CHORKO THE TOP G
Intuition\nThe problem is essentially about selecting the maximum number of integers from the range [1, n] without exceeding a given sum m, while skipping the i
### Intuition\nThe problem is essentially about selecting the maximum number of integers from the range `[1, n]` without exceeding a given sum `m`, while skipping the integers specified in the banned list. The idea is to sequentially add numbers from `1` to `n`, skipping the banned ones, until the sum exceeds the limit.\n\n---\n\n### Approach\n1. **Input Parsing:** Parse the input, separating the `banned` list, maximum number `n`, and maximum sum `m`.\n2. **Skip Banned Numbers:** Use a set for efficient lookup of banned numbers.\n3. **Iterate Through the Range:** Iterate through numbers from `1` to `n`. For each number:\n   - Skip it if it is in the banned set.\n   - Stop adding if including it exceeds the allowed sum `m`.\n   - Otherwise, add it to the current sum and increment the count of included numbers.\n4. **Return the Count:** When the iteration ends or the sum exceeds the limit, return the count of included numbers.\n\n---\n\n### Complexity\n- **Time Complexity:**  \n  - Constructing the set of banned numbers takes $$O(k)$$, where `k` is the size of the banned list.  \n  - Iterating through numbers from `1` to `n` takes $$O(n)$$.  \n  - Overall: $$O(n + k)$$.\n\n- **Space Complexity:**  \n  - The set to store banned numbers takes $$O(k)$$.  \n  - Other variables use constant space.  \n  - Overall: $$O(k)$$.\n# Code\n```python3 []\nclass Solution:\n    def maxCount(self, b: List[int], n: int, m: int) -> int:\n        look = set(b)\n        c = 0\n        cunt = 0\n        for i in range(1, n + 1):\n            if i in look:\n                continue\n            if c + i > m:\n                return cunt\n            c += i#CHORKO IS GAY FRR THAT MONKEY\n            cunt += 1\n        return cunt\n\n```
['Python3']