comefrom: <awangdev>1267. Count Servers that Communicate_1.java
code: public int countServers(int[][] grid) {
          
          int total = 0;
          int m = grid.length, n = grid[0].length;
          int[] row = new int[m], col = new int[n];
          for (int i = 0; i < m; i++) {
              for (int j = 0; j < n; j++) {
                  if (grid[i][j] == 1) {
                      total++;
                      row[i]++;
                      col[j]++;
                  }
              }
          }
          
          for (int i = 0; i < m; i++) {
              for (int j = 0; j < n; j++) {
                  if (grid[i][j] == 1 && row[i] == 1 && col[j] == 1) { 
                      total--;
                  }
              }
          }
          
          return total;
      }
masked: public int sample_funcname ( int [ ] [ ] var_0 ) {
    int var_1 = 0 ;
    int var_2 = var_0 . length , var_3 = var_0 [ 0 ] . length ;
    int [ ] var_4 = new int [ var_2 ] , var_5 = new int [ var_3 ] ;
    for ( int var_6 = 0 ;
    var_6 < var_2 ;
    var_6 ++ ) {
      for ( int var_7 = 0 ;
      var_7 < var_3 ;
      var_7 ++ ) {
        if ( var_0 [ var_6 ] [ var_7 ] == 1 ) {
          var_1 ++ ;
          var_4 [ var_6 ] ++ ;
          var_5 [ var_7 ] ++ ;
        }
      }
    }
    for ( int var_6 = 0 ;
    var_6 < var_2 ;
    var_6 ++ ) {
      for ( int var_7 = 0 ;
      var_7 < var_3 ;
      var_7 ++ ) {
        if ( var_0 [ var_6 ] [ var_7 ] == 1 && var_4 [ var_6 ] == 1 && var_5 [ var_7 ] == 1 ) {
          var_1 -- ;
        }
      }
    }
    return var_1 ;
  }
  