C++ count steps
\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        int cnt[3]{}, steps[2];\n        for (auto s : stones) cnt[s % 3]++;\n        
```\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        int cnt[3]{}, steps[2];\n        for (auto s : stones) cnt[s % 3]++;\n        if (cnt[1] > cnt[2]) swap(cnt[1], cnt[2]);\n        int n = cnt[0] + cnt[1] + cnt[2];\n        if (!cnt[2]) return false;\n        steps[1] = cnt[0] + (cnt[2] == 1 ? 1 : cnt[1] + cnt[1] + (cnt[2] > cnt[1]) + (cnt[2] + 1 > cnt[1]));\n        steps[0] = cnt[0] + (cnt[1] == 1 ? 1 : cnt[1] + cnt[1] - 1);\n        if (!cnt[1]) steps[0] = steps[1];\n        if ((steps[0] & 1) && steps[0] < n) return true;\n        if ((steps[1] & 1) && steps[1] < n) return true;\n        return false;\n    }\n};\n\n\n```
[]