comefrom: <awangdev>Backpack II_4.java
code: public int backPackII(int m, int[] A, int V[]) {
          if (A == null || V == null || A.length != V.length) {
              return 0;
          }
          int n = A.length;
          int[][] dp = new int[2][m + 1];
          for (int j = 0; j <= m; j++) {
              dp[0][j] = -1; 
          }
  		dp[0][0] = 0; 
  		int curr = 0, prev;
      
          for (int i = 1; i <= n; i++) {
  			prev = curr;
  			curr = 1 - prev;
              for (int j = 1; j <= m; j++) {
                  dp[curr][j] = dp[prev][j]; 
                  if (j - A[i - 1] >= 0 && dp[prev][j - A[i - 1]] != -1) {
                     dp[curr][j] = Math.max(dp[curr][j], dp[prev][j - A[i - 1]] + V[i - 1]); 
                  }
              }
          }
  		
  		int rst = 0;
          for (int j = 0; j <= m; j++) {
              if (dp[curr][j] != -1) {
                  rst = Math.max(rst, dp[curr][j]);
              }
          }
          return rst;
      }
masked: public int sample_funcname ( int var_0 , int [ ] var_1 , int var_2 [ ] ) {
    if ( var_1 == null || var_2 == null || var_1 . length != var_2 . length ) {
      return 0 ;
    }
    int var_6 = var_1 . length ;
    int [ ] [ ] var_9 = new int [ 2 ] [ var_0 + 1 ] ;
    for ( int var_10 = 0 ;
    var_10 <= var_0 ;
    var_10 ++ ) {
      var_9 [ 0 ] [ var_10 ] = - 1 ;
    }
    var_9 [ 0 ] [ 0 ] = 0 ;
    int var_11 = 0 , var_12 ;
    for ( int var_13 = 1 ;
    var_13 <= var_6 ;
    var_13 ++ ) {
      var_12 = var_11 ;
      var_11 = 1 - var_12 ;
      for ( int var_10 = 1 ;
      var_10 <= var_0 ;
      var_10 ++ ) {
        var_9 [ var_11 ] [ var_10 ] = var_9 [ var_12 ] [ var_10 ] ;
        if ( var_10 - var_1 [ var_13 - 1 ] >= 0 && var_9 [ var_12 ] [ var_10 - var_1 [ var_13 - 1 ] ] != - 1 ) {
          var_9 [ var_11 ] [ var_10 ] = Math . max ( var_9 [ var_11 ] [ var_10 ] , var_9 [ var_12 ] [ var_10 - var_1 [ var_13 - 1 ] ] + var_2 [ var_13 - 1 ] ) ;
        }
      }
    }
    int var_16 = 0 ;
    for ( int var_10 = 0 ;
    var_10 <= var_0 ;
    var_10 ++ ) {
      if ( var_9 [ var_11 ] [ var_10 ] != - 1 ) {
        var_16 = Math . max ( var_16 , var_9 [ var_11 ] [ var_10 ] ) ;
      }
    }
    return var_16 ;
  }
  