orz zrf
First of all, the classic multi backpack solution, is putting an item into the total number of copies of the article, and then do 01 backpack
The first method is to optimize it into an item , for example:
If there are items th, split into , so that if it is not. , to find the greatest , such that , and then divided into these parts. Backpack and then again 01
The second queue is monotonic
May first be found that for a fixed items i, and a fixed current capacity j, can be found can be transferred to j forms an arithmetic sequence, tolerances are individual volumes vi I article then can the volume according to vi modulo remainder classification, and then can be transferred to the equivalent for class i, the number of which is assumed , each of the first position to a different weight value of i, but the observation that if the number of subtracting each , then proceeds to transfer the weight of the i on the same, can be obtained directly monotonically queue.