comefrom: <awangdev>Backpack_6.java
code: public int backPack(int m, int[] A) {
          if (A == null || m == 0) {
              return 0;
          }
  
          boolean[] DP = new boolean[m + 1];
          DP[0] = true;
          for (int i = 1; i <= A.length; i++) {
              for (int j = m; j >= 0; j--) {
                  if (j - A[i - 1] >= 0 && DP[j - A[i - 1]]) {
                      DP[j] = true;
                  }
              }
          }
  
          for (int j = m; j >= 0; j--) {
              if (DP[j]) {
                  return j;
              }
          }
          return 0;
      }
masked: public int sample_funcname ( int var_0 , int [ ] var_1 ) {
    if ( var_1 == null || var_0 == 0 ) {
      return 0 ;
    }
    boolean [ ] var_6 = new boolean [ var_0 + 1 ] ;
    var_6 [ 0 ] = true ;
    for ( int var_7 = 1 ;
    var_7 <= var_1 . length ;
    var_7 ++ ) {
      for ( int var_9 = var_0 ;
      var_9 >= 0 ;
      var_9 -- ) {
        if ( var_9 - var_1 [ var_7 - 1 ] >= 0 && var_6 [ var_9 - var_1 [ var_7 - 1 ] ] ) {
          var_6 [ var_9 ] = true ;
        }
      }
    }
    for ( int var_9 = var_0 ;
    var_9 >= 0 ;
    var_9 -- ) {
      if ( var_6 [ var_9 ] ) {
        return var_9 ;
      }
    }
    return 0 ;
  }
  