public boolean firstWillWin_v2(int[] values) {
        // write your code here
        int n = values.length;
        // dp[i][j] means the value can get from i to j
        // dp[i][j] = max(v[i] + min(dp[i+2][j],dp[i+3][j]),
        //                v[i] + v[i+1] + min(dp[i+3][j], dp[i+4][j]))
        int sum = 0;
        for (int i : values)
            sum += i;
        int[][] dp = new int[n][n];
        return  helper(dp, values, 0, n - 1) * 2 > sum;
    }