<awangdev>Backpack II_1.java
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[n + 1][m + 1];

        for (int i = 1; i <= n; i++) {
            for (int j = 0; j <= m; j++) {
                dp[i][j] = dp[i - 1][j];
                if (j - A[i - 1] >= 0) {
                   dp[i][j] = Math.max(dp[i][j], dp[i - 1][j - A[i - 1]] + V[i - 1]); 
                }
                
            }
        }
        
        return dp[n][m];
    }
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_8 = new int [ var_6 + 1 ] [ var_0 + 1 ] ;
  for ( int var_9 = 1 ;
  var_9 <= var_6 ;
  var_9 ++ ) {
    for ( int var_10 = 0 ;
    var_10 <= var_0 ;
    var_10 ++ ) {
      var_8 [ var_9 ] [ var_10 ] = var_8 [ var_9 - 1 ] [ var_10 ] ;
      if ( var_10 - var_1 [ var_9 - 1 ] >= 0 ) {
        var_8 [ var_9 ] [ var_10 ] = Math . max ( var_8 [ var_9 ] [ var_10 ] , var_8 [ var_9 - 1 ] [ var_10 - var_1 [ var_9 - 1 ] ] + var_2 [ var_9 - 1 ] ) ;
      }
    }
  }
  return var_8 [ var_6 ] [ var_0 ] ;
}
