Summary of ACM greedy algorithm

Source: Internet
Author: User

The nature of the greedy algorithm:

is the optimal solution of the current state, which does not consider the global.

What is the optimal solution for the current state?

Cost issues?

    • Https://www.cnblogs.com/xuxiaojin/p/9400892.html (POJ 2393) This involves the cost per week, as long as the cost of the current week is the lowest possible, do not consider the costs behind.
    • Https://www.cnblogs.com/xuxiaojin/p/9401179.html (POJ 3626) The maximum cost of this design to the cow to destroy the flower, as long as the current drag the maximum cost can be

The problem of interval greed?

    • Https://www.cnblogs.com/xuxiaojin/p/9400645.html (POJ 1328) This allows the location of the radar to be installed into an interval on the x-axis, as long as the POS is compared to the current traversing interval.

And so on, it's all about choosing the best of the moment.

Summary of ACM greedy algorithm

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.