|Using Hash Map| Sorting|C++
\n\nclass Solution {\npublic:\nstatic bool compare(pair<int,int>p1,pair<int,int>p2)\n{\n    return p1.second>p2.second;\n}\n    int winningPlayerCount(int n, ve
\n```\nclass Solution {\npublic:\nstatic bool compare(pair<int,int>p1,pair<int,int>p2)\n{\n    return p1.second>p2.second;\n}\n    int winningPlayerCount(int n, vector<vector<int>>& pick) {\n        int count=0;\n        unordered_map<int,vector<int>>m1;\n        for(int i=0;i<pick.size();i++)\n        {\n            vector<int>temp=pick[i];\n            m1[temp[0]].push_back(temp[1]);\n        }\n        for(auto x:m1)\n        {\n            unordered_map<int,int>m2;\n            vector<int>t=x.second;\n            for(int y:t)\n            {\n                m2[y]++;\n            }\n            vector<pair<int,int>>p1{m2.begin(),m2.end()};\n            sort(p1.begin(),p1.end(),compare);\n            if(p1[0].second>x.first)\n            count++;\n        }\n        return count;\n    }\n};\n```
['C++']