The dummy way - Case by case
\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        int n = stones.size(), zero = 0, one = 0, two = 0;\n        for (int stone : s
```\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        int n = stones.size(), zero = 0, one = 0, two = 0;\n        for (int stone : stones) {\n            switch (stone % 3) {\n                case 0: ++zero; break;\n                case 1: ++one; break;\n                case 2: ++two; break;\n            }\n        }\n        if (one == 0) {\n            if (two < 3) {\n                return false;\n            } else if (zero % 2) {\n                return true;\n            } else {\n                return false;\n            }\n        }\n        if (two == 0) {\n            if (one < 3) {\n                return false;\n            } else if (zero % 2) {\n                return true;\n            } else {\n                return false;\n            }\n        }\n        if (one == 1 && two == 1) {\n            return zero % 2 == 0;\n        }\n        if (one == 1 && two == 2) {\n            return zero % 2 == 0;\n        }\n        if (one == 2 && two == 1) {\n            return zero % 2 == 0;\n        }\n        if (zero % 2 == 0) {\n            return true;\n        }\n        if (abs(one - two) <= 2) {\n            return false;\n        } else {\n            return true;\n        }\n    }\n};\n```
[]