<awangdev>Nim Game_4.java
public boolean canWinNim(int n) {
        if (n <= 3) {
            return true;
        }
        boolean[] dp = new boolean[3];
        dp[0] = dp[1] = dp[2] = true;
        for (int i = 3; i < n; i++) {
            dp[i % 3] = !dp[(i - 1) % 3] || !dp[(i - 2) % 3] || !dp[(i - 3) % 3];
        }
        return dp[(n - 1) % 3];
    }
public boolean var_0 ( int var_1 ) {
  if ( var_1 <= 3 ) {
    return true ;
  }
  boolean [ ] var_4 = new boolean [ 3 ] ;
  var_4 [ 0 ] = var_4 [ 1 ] = var_4 [ 2 ] = true ;
  for ( int var_8 = 3 ;
  var_8 < var_1 ;
  var_8 ++ ) {
    var_4 [ var_8 % 3 ] = ! var_4 [ ( var_8 - 1 ) % 3 ] || ! var_4 [ ( var_8 - 2 ) % 3 ] || ! var_4 [ ( var_8 - 3 ) % 3 ] ;
  }
  return var_4 [ ( var_1 - 1 ) % 3 ] ;
}
