(C++) 2029. Stone Game IX
\n\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        unordered_map<int, int> freq; \n        for (auto& x : stones) freq[x % 3]++
\n```\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        unordered_map<int, int> freq; \n        for (auto& x : stones) freq[x % 3]++; \n        if (freq[0] & 1) return abs(freq[1] - freq[2]) >= 3; \n        return freq[1] && freq[2]; \n    }\n};\n```
['C']