💯Faster✅💯Less Mem✅🧠Detailed Approach🎯Matrix🔥C++😎
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 winningPlayerCount(int n, vector<vector<int>>& pick) {\n        // Create a 2D vector to count the number of balls of each color picked by each player\n        vector<vector<int>> count(n, vector<int>(11, 0)); // There are at most 11 colors (0 to 10)\n        \n        // Fill the count matrix\n        for(auto& pic : pick) {\n            int player = pic[0];\n            int color = pic[1];\n            count[player][color]++;\n        }\n        \n        int won = 0;\n        \n        // Check each player if they win\n        for(int i = 0; i < n; i++) {\n            for(int color = 0; color < 11; color++) {\n                if(count[i][color] > i) {\n                    won++;\n                    break; // No need to check other colors for this player\n                }\n            }\n        }\n        \n        return won;\n    }\n};\n\n\n```
['C++']