<awangdev>Coins in a Line II_1.java
public boolean firstWillWin(int[] values) {
        if (values == null || values.length == 0) {
            return false;
        }
        if (values.length <= 2) {
            return true;
        }
        int n = values.length;
        int[] dp = new int[n + 1]; 
        int[] sum = new int[n + 1]; 
        dp[n] = 0;
        dp[n - 1] = values[n - 1]; 
        dp[n - 2] = values[n - 1] + values[n - 2]; 
        
        sum[n] = 0;
        sum[n - 1] = values[n - 1];
        
        for (int i = n - 2; i >= 0; i--) {
            sum[i] = sum[i + 1] + values[i];
            dp[i] = Math.max(sum[i] - dp[i + 1], sum[i] - dp[i + 2]); 
        }
        
        return sum[0] - dp[0] < dp[0];
    }
public boolean var_0 ( int [ ] var_1 ) {
  if ( var_1 == null || var_1 . length == 0 ) {
    return false ;
  }
  if ( var_1 . length <= 2 ) {
    return true ;
  }
  int var_6 = var_1 . length ;
  int [ ] var_8 = new int [ var_6 + 1 ] ;
  int [ ] var_9 = new int [ var_6 + 1 ] ;
  var_8 [ var_6 ] = 0 ;
  var_8 [ var_6 - 1 ] = var_1 [ var_6 - 1 ] ;
  var_8 [ var_6 - 2 ] = var_1 [ var_6 - 1 ] + var_1 [ var_6 - 2 ] ;
  var_9 [ var_6 ] = 0 ;
  var_9 [ var_6 - 1 ] = var_1 [ var_6 - 1 ] ;
  for ( int var_10 = var_6 - 2 ;
  var_10 >= 0 ;
  var_10 -- ) {
    var_9 [ var_10 ] = var_9 [ var_10 + 1 ] + var_1 [ var_10 ] ;
    var_8 [ var_10 ] = Math . max ( var_9 [ var_10 ] - var_8 [ var_10 + 1 ] , var_9 [ var_10 ] - var_8 [ var_10 + 2 ] ) ;
  }
  return var_9 [ 0 ] - var_8 [ 0 ] < var_8 [ 0 ] ;
}
