<awangdev>Backpack III_3.java
public int backPackIII(int[] A, int[] V, int m) {
        if (A == null || A.length == 0 || V == null || V.length == 0 || m <= 0) {
            return 0;
        }
        int n = A.length;
        int[] dp = new int[m + 1]; 
        dp[0] = 0; 
        
        for (int i = 1; i <= n; i++) {
            for (int j = A[i - 1]; j <= m && j >= A[i - 1]; j++) {
                dp[j] = Math.max(dp[j], dp[j - A[i - 1]] + V[i - 1]);
            }
        }
        return dp[m];
    }
public int sample_funcname ( int [ ] var_0 , int [ ] var_1 , int var_2 ) {
  if ( var_0 == null || var_0 . length == 0 || var_1 == null || var_1 . length == 0 || var_2 <= 0 ) {
    return 0 ;
  }
  int var_6 = var_0 . length ;
  int [ ] var_8 = new int [ var_2 + 1 ] ;
  var_8 [ 0 ] = 0 ;
  for ( int var_9 = 1 ;
  var_9 <= var_6 ;
  var_9 ++ ) {
    for ( int var_10 = var_0 [ var_9 - 1 ] ;
    var_10 <= var_2 && var_10 >= var_0 [ var_9 - 1 ] ;
    var_10 ++ ) {
      var_8 [ var_10 ] = Math . max ( var_8 [ var_10 ] , var_8 [ var_10 - var_0 [ var_9 - 1 ] ] + var_1 [ var_9 - 1 ] ) ;
    }
  }
  return var_8 [ var_2 ] ;
}
