HomeStone Game IX1 2 3 4 5 6 class Solution: def stoneGameIX(self, stones: List[int]) -> bool: count = Counter(a % 3 for a in stones) if count[0] % 2 == 0: return count[1] > 0 and count[2] > 0 return abs(count[1] - count[2]) > 2
1 2 3 4 5 6
class Solution: def stoneGameIX(self, stones: List[int]) -> bool: count = Counter(a % 3 for a in stones) if count[0] % 2 == 0: return count[1] > 0 and count[2] > 0 return abs(count[1] - count[2]) > 2