lengthy questions but simple solution.
\n# Code\n\nclass Solution {\n    public boolean stoneGameIX(int[] stones) {\n\t    int[] count = new int[3];\n\t    for(int stone:stones){\n            count[s
\n# Code\n```\nclass Solution {\n    public boolean stoneGameIX(int[] stones) {\n\t    int[] count = new int[3];\n\t    for(int stone:stones){\n            count[stone%3]++;\n        }\n\t    if(count[0] % 2 == 0 && (count[1] == 0 || count[2] == 0)) return false;\n\t    return count[0] % 2 == 1 && Math.abs(count[1] - count[2]) < 3 ? false : true;\n    }\n}\n```
['Java']