comefrom: <awangdev>Russian Doll Envelopes_2.java
code: public int maxEnvelopes(int[][] envelopes) {
          if (envelopes == null || envelopes.length == 0 
             || envelopes[0] == null || envelopes[0].length == 0) {
              return 0;
          }
          int n = 0, m = 0;
          for (int[] envelope : envelopes) {
              n = Math.max(n, envelope[0]);
              m = Math.max(m, envelope[1]);
          }
          int[][] dp = new int[n + 1][m + 1];
          for (int[] envelope : envelopes) {
              dp[envelope[0]][envelope[1]] = 1;
          }
          
          for (int i = 1; i <= n; i++) {
              for (int j = 1; j <= m; j++) {
                  int temp = dp[i][j] == 1 ? dp[i - 1][j - 1] + dp[i][j] : Math.max(dp[i - 1][j], dp[i][j - 1]);
                  dp[i][j] = Math.max(temp, dp[i][j]);
              }
          }
          return dp[n][m];
      }
masked: public int sample_funcname ( int [ ] [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 || var_0 [ 0 ] == null || var_0 [ 0 ] . length == 0 ) {
      return 0 ;
    }
    int var_1 = 0 , var_2 = 0 ;
    for ( int [ ] var_3 : var_0 ) {
      var_1 = Math . max ( var_1 , var_3 [ 0 ] ) ;
      var_2 = Math . max ( var_2 , var_3 [ 1 ] ) ;
    }
    int [ ] [ ] var_4 = new int [ var_1 + 1 ] [ var_2 + 1 ] ;
    for ( int [ ] var_3 : var_0 ) {
      var_4 [ var_3 [ 0 ] ] [ var_3 [ 1 ] ] = 1 ;
    }
    for ( int var_5 = 1 ;
    var_5 <= var_1 ;
    var_5 ++ ) {
      for ( int var_6 = 1 ;
      var_6 <= var_2 ;
      var_6 ++ ) {
        int var_7 = var_4 [ var_5 ] [ var_6 ] == 1 ? var_4 [ var_5 - 1 ] [ var_6 - 1 ] + var_4 [ var_5 ] [ var_6 ] : Math . max ( var_4 [ var_5 - 1 ] [ var_6 ] , var_4 [ var_5 ] [ var_6 - 1 ] ) ;
        var_4 [ var_5 ] [ var_6 ] = Math . max ( var_7 , var_4 [ var_5 ] [ var_6 ] ) ;
      }
    }
    return var_4 [ var_1 ] [ var_2 ] ;
  }
  