<awangdev>Coins in a Line III_1.java
public boolean firstWillWin(int[] values) {
        if (values == null || values.length == 0) {
            return false;
        }

        int n = values.length;
        int[][] dp = new int[n][n];

        for (int i = 0; i < n; i++) {
            dp[i][i] = values[i];
        }
        
        for (int len = 2; len <= n; len++) {
            for (int i = 0; i <= n - len; i++) {
                int j = len + i - 1;
                dp[i][j] = Math.max(values[i] - dp[i + 1][j], values[j] - dp[i][j - 1]);
            }
        }
        return dp[0][n - 1] >= 0;
    }
public boolean var_0 ( int [ ] var_1 ) {
  if ( var_1 == null || var_1 . length == 0 ) {
    return false ;
  }
  int var_5 = var_1 . length ;
  int [ ] [ ] var_6 = new int [ var_5 ] [ var_5 ] ;
  for ( int var_7 = 0 ;
  var_7 < var_5 ;
  var_7 ++ ) {
    var_6 [ var_7 ] [ var_7 ] = var_1 [ var_7 ] ;
  }
  for ( int var_9 = 2 ;
  var_9 <= var_5 ;
  var_9 ++ ) {
    for ( int var_7 = 0 ;
    var_7 <= var_5 - var_9 ;
    var_7 ++ ) {
      int var_11 = var_9 + var_7 - 1 ;
      var_6 [ var_7 ] [ var_11 ] = Math . max ( var_1 [ var_7 ] - var_6 [ var_7 + 1 ] [ var_11 ] , var_1 [ var_11 ] - var_6 [ var_7 ] [ var_11 - 1 ] ) ;
    }
  }
  return var_6 [ 0 ] [ var_5 - 1 ] >= 0 ;
}
