Dynamic Planning (Knapsack Problem)

Source: Internet
Author: User

Full backpack

HDU 1248 frozen throne

HDU 1284 coin exchange

HDU 3732 ahui writes word: converts a 01 backpack into multiple backpacks, that is, a full backpack.


0-1 backpack

HDU 2546 meal card: Because it takes up the largest advantage, leave 5 yuan to buy the most expensive dish, because each dish can only be bought once, with a 0-1 backpack

Find the maximum expenditure for food purchase

HDU 3466 proud merchants

Pi-qi is sorted, and small ones are ranked first. Then we use a 0-1 backpack to solve the problem. The constraint is that we have less than Qi, that is, j> = Qi.

HDU 2955 robberies: maximum probability of a thief not being caught

When the robbery amount is Mi, the corresponding risk is Pi (the probability of being caught), and the probability of not being caught is 1-Pi, and

The probability of being captured is less than P, that is, the probability of not being captured is greater than 1-P, and the maximum amount that can be robbed is obtained.

Multiple backpacks

HUD 2191 mourn the victims of the 512 Wenchuan earthquake-Cherish the present and live a grateful life: Apply the Template

HDU 2844 coins:

Then calculate how many prices (Form 1 to m) Tony can pay use these coins.

The maximum number of values within 1-m

Calculate all the values with multiple backpacks, and then determine whether the values can be grouped.

When there are already too many threads, there are already too many threads

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.