9ms dictionary solution | beats 100% runtime
\n\n\n# Code\ncsharp []\npublic class Solution {\n    public int WinningPlayerCount(int n, int[][] pick) {\n        var dic = new Dictionary<int,Dictionary<int,
![image.png](https://assets.leetcode.com/users/images/94ffa932-684f-483e-8473-582b7591ff20_1730314090.283244.png)\n\n\n# Code\n```csharp []\npublic class Solution {\n    public int WinningPlayerCount(int n, int[][] pick) {\n        var dic = new Dictionary<int,Dictionary<int,int>>();\n        for(int i=0;i<pick.Length;i++){\n            if(!dic.ContainsKey(pick[i][0])){\n                dic[pick[i][0]]=new Dictionary<int,int>();\n            }\n            if(!dic[pick[i][0]].ContainsKey(pick[i][1])){\n                dic[pick[i][0]][pick[i][1]]=1;\n            }\n            else{\n                dic[pick[i][0]][pick[i][1]]++;\n            }\n        }\n        return dic.Where(d=>d.Value.Any(p=>p.Value>d.Key)).Count();\n    }\n}\n```
['C#']