L562 Backpack IV
Given n items with sizenums[i]
which an integer array and all positive numbers, no duplicates. An integertarget
denotes the size of a backpack. Find the number of possible fill the backpack.
Each item may be chosen unlimited number of times
Example
Given candidate items[2,3,6,7]
and target7
,
return2
每个元素无限取,形式跟背包III很像,就把max换成+。
Last updated