comefrom: <qiyuangong>463_Island_Perimeter_1.java
code: public int islandPerimeter(int[][] grid) {
          int islands = 0, neighbours = 0;
          for (int i = 0; i < grid.length; i++) {
              for (int j = 0; j < grid[i].length; j++) {
                  if (grid[i][j] == 1) {
                      islands++; // count islands
                      if (i < grid.length - 1 && grid[i + 1][j] == 1) neighbours++; // count down neighbours
                      if (j < grid[i].length - 1 && grid[i][j + 1] == 1) neighbours++; // count right neighbours
                  }
              }
          }
          return islands * 4 - neighbours * 2;
      }
masked: public int sample_funcname ( int [ ] [ ] var_0 ) {
    int var_1 = 0 , var_2 = 0 ;
    for ( int var_3 = 0 ;
    var_3 < var_0 . length ;
    var_3 ++ ) {
      for ( int var_4 = 0 ;
      var_4 < var_0 [ var_3 ] . length ;
      var_4 ++ ) {
        if ( var_0 [ var_3 ] [ var_4 ] == 1 ) {
          var_1 ++ ;
          if ( var_3 < var_0 . length - 1 && var_0 [ var_3 + 1 ] [ var_4 ] == 1 ) var_2 ++ ;
          if ( var_4 < var_0 [ var_3 ] . length - 1 && var_0 [ var_3 ] [ var_4 + 1 ] == 1 ) var_2 ++ ;
        }
      }
    }
    return var_1 * 4 - var_2 * 2 ;
  }
  