[C++] Naive Brute Force
\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        int n = stones.size();\n        vector<int> freq(3, 0);\n        for (int i = 
```\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        int n = stones.size();\n        vector<int> freq(3, 0);\n        for (int i = 0; i < n; i++)\n            freq[stones[i] % 3]++;\n        for (int i = 1; i <= 2; i++)\n            if (freq[i] != 0)\n            {\n                int sum = i;\n                freq[i]--;\n                if (round(freq, sum, 1) % 2 == 0)\n                    return true;\n                freq[i]++;\n            }\n        return false;\n    }\n    \n    \nprivate:\n    int round(vector<int> freq, int sum, int r)\n    {\n        if (sum == 0)\n            return r;\n        if (freq[0] == 0 && freq[1] == 0 && freq[2] == 0)\n            return 1;\n        if (sum == 1)\n        {\n            if (freq[0] != 0)\n                freq[0]--;\n            else if (freq[1] != 0)\n            {\n                freq[1]--;\n                sum += 1;\n            }\n            else\n                sum = 0;\n        }\n        else if (sum == 2)\n        {\n            if (freq[0] != 0)\n                freq[0]--;\n            else if (freq[2] != 0)\n            {\n                freq[2]--;\n                sum = 1;\n            }\n            else\n                sum = 0;\n        }\n        return round(freq, sum, r + 1);\n    }\n};\n```
[]