[C++] Sort and check, O(m*logm)
Complexity\n- Time complexity: O(m \cdot \log m)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(\max(pick[i][1]))\n Add your space complex
# Complexity\n- Time complexity: $$O(m \\cdot \\log m)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(\\max(pick[i][1]))$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int winningPlayerCount(int n, vector<vector<int>>& pick) {\n        ranges::sort(pick);\n\n        int i = 0, size = pick.size(), res = 0;\n\n        while (i < size) {\n            int maxVal = 0;\n            int freq[11] {};\n\n            while (i + 1 < size && pick[i][0] == pick[i + 1][0]) {\n                maxVal = max(maxVal, ++freq[pick[i++][1]]);\n            }\n\n            maxVal = max(maxVal, ++freq[pick[i][1]]);\n\n            res += (maxVal > pick[i][0]);\n            i++;\n        }\n\n        return res;\n    }\n};\n```
['C++']