Today HH becomes a shopper, and he wants to buy a lot. HH has a bag that can carry at most w kilograms things in total, and he has d dollars. Now he wants to buy n items,the ith item weights wi kilogram and costs ci dollars. HHis not good at math so he asks you to tell him whether he can buy all the things and carry them with the bag.
Today HH becomes a shopper, and he wants to buy a lot. HH has a bag that can carry at most w kilograms things in total, and he has d dollars. Now he wants to buy n items,the ith item weights wi kilogram and costs ci dollars. HHis not good at math so he asks you to tell him whether he can buy all the things and carry them with the bag.
(图片来源网络,侵删)