comefrom: <awangdev>Backpack III_4.java
code: public int backPackIII(int[] A, int[] V, int m) {
          if (A == null || V == null || A.length != V.length) {
              return 0;
          }
          int n = A.length;
          int[][] dp = new int[n + 1][m + 1]; 
          for (int j = 0; j <= m; j++) {
              dp[0][j] = -1; 
          }
          dp[0][0] = 0;
          
          for (int i = 1; i <= n; i++) {
              for (int j = 0; j <= m; j++) { 
                  for (int k = 0; k * A[i - 1] <= m; k++) { 
                      if (j - k * A[i - 1] >= 0 && dp[i - 1][j - k * A[i - 1]] != -1) {
                          dp[i][j] = Math.max(dp[i][j], dp[i - 1][j - k * A[i - 1]] + k * V[i - 1]);
                      }
                  }
              }
          }
          int rst = 0;
          for (int j = 0; j <= m; j++) {
              rst = Math.max(rst, dp[n][j]);
          }
          return rst;
      }
masked: public int sample_funcname ( int [ ] var_0 , int [ ] var_1 , int var_2 ) {
    if ( var_0 == null || var_1 == null || var_0 . length != var_1 . length ) {
      return 0 ;
    }
    int var_3 = var_0 . length ;
    int [ ] [ ] var_4 = new int [ var_3 + 1 ] [ var_2 + 1 ] ;
    for ( int var_5 = 0 ;
    var_5 <= var_2 ;
    var_5 ++ ) {
      var_4 [ 0 ] [ var_5 ] = - 1 ;
    }
    var_4 [ 0 ] [ 0 ] = 0 ;
    for ( int var_6 = 1 ;
    var_6 <= var_3 ;
    var_6 ++ ) {
      for ( int var_5 = 0 ;
      var_5 <= var_2 ;
      var_5 ++ ) {
        for ( int var_7 = 0 ;
        var_7 * var_0 [ var_6 - 1 ] <= var_2 ;
        var_7 ++ ) {
          if ( var_5 - var_7 * var_0 [ var_6 - 1 ] >= 0 && var_4 [ var_6 - 1 ] [ var_5 - var_7 * var_0 [ var_6 - 1 ] ] != - 1 ) {
            var_4 [ var_6 ] [ var_5 ] = Math . max ( var_4 [ var_6 ] [ var_5 ] , var_4 [ var_6 - 1 ] [ var_5 - var_7 * var_0 [ var_6 - 1 ] ] + var_7 * var_1 [ var_6 - 1 ] ) ;
          }
        }
      }
    }
    int var_8 = 0 ;
    for ( int var_5 = 0 ;
    var_5 <= var_2 ;
    var_5 ++ ) {
      var_8 = Math . max ( var_8 , var_4 [ var_3 ] [ var_5 ] ) ;
    }
    return var_8 ;
  }
  