comefrom: <awangdev>265. Paint House II_1.java
code: public int minCostII(int[][] costs) {
          if (costs == null || costs.length == 0) return 0;
          if (costs.length == 1 && costs[0].length == 1) return costs[0][0];
  
          int n = costs.length, k = costs[0].length;
          int[][] dp = new int[n + 1][k]; 
          
          for (int i = 1; i <= n; i++) {
              for (int j = 0; j < k; j++) {
                  dp[i][j] = Integer.MAX_VALUE;
                  for (int m = 0; m < k; m++) {
                      if (j == m) continue; 
                      dp[i][j] = Math.min(dp[i][j], dp[i - 1][m] + costs[i - 1][j]);
                  }
              }
          }
          
          int min = Integer.MAX_VALUE;
          for (int j = 0; j < k; j++) min = Math.min(min, dp[n][j]);
          return min;
      }
masked: public int sample_funcname ( int [ ] [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) return 0 ;
    if ( var_0 . length == 1 && var_0 [ 0 ] . length == 1 ) return var_0 [ 0 ] [ 0 ] ;
    int var_1 = var_0 . length , var_2 = var_0 [ 0 ] . length ;
    int [ ] [ ] var_3 = new int [ var_1 + 1 ] [ var_2 ] ;
    for ( int var_4 = 1 ;
    var_4 <= var_1 ;
    var_4 ++ ) {
      for ( int var_5 = 0 ;
      var_5 < var_2 ;
      var_5 ++ ) {
        var_3 [ var_4 ] [ var_5 ] = Integer . MAX_VALUE ;
        for ( int var_6 = 0 ;
        var_6 < var_2 ;
        var_6 ++ ) {
          if ( var_5 == var_6 ) continue ;
          var_3 [ var_4 ] [ var_5 ] = Math . min ( var_3 [ var_4 ] [ var_5 ] , var_3 [ var_4 - 1 ] [ var_6 ] + var_0 [ var_4 - 1 ] [ var_5 ] ) ;
        }
      }
    }
    int min = Integer . MAX_VALUE ;
    for ( int var_5 = 0 ;
    var_5 < var_2 ;
    var_5 ++ ) min = Math . min ( min , var_3 [ var_1 ] [ var_5 ] ) ;
    return min ;
  }
  