package leetcode;

/**
 * https://leetcode.com/problems/stone-game-ii/
 */
public class Problem1140 {
    public int stoneGameII(int[] piles) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1140 prob = new Problem1140();
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/stone-game-ii/
 */
public class Problem1140 {
    public int stoneGameII(int[] piles) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1140 prob = new Problem1140();
        System.out.println(prob.stoneGameII(new int[]{2, 7, 9, 4, 4})); // 10
        System.out.println(prob.stoneGameII(new int[]{2})); // 2
        System.out.println(prob.stoneGameII(new int[]{2, 3})); // 5
    }
}

Update problem 1140