c++ | easy to understand | step by step
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n     bool stoneGameIX(vector<int>& stones) {\n        int cnt[3] = {};\n        for (int a: stones)\n            cnt[a % 3]++;\n        if (min(cnt[1], cnt[2]) == 0)\n            return max(cnt[1], cnt[2]) > 2 && cnt[0] % 2 > 0;\n        return abs(cnt[1] - cnt[2]) > 2 || cnt[0] % 2 == 0;\n    }\n};\n```
['C++']