Server Load balancer 10817-Headmaster's headache (status compression DP)

Source: Internet
Author: User

From http://blog.csdn.net/shuangde800

Question link: Click the open link

Theme

A school has n teachers and M job seekers who know the salaries of each person and the set of courses they can teach. The minimum wage is required so that at least two teachers can teach each course. In-service teachers must be recruited.

Ideas

This question is not very good. It took a long time ..

F [S1] [s2]: S1 indicates that at least one instructor teaches the course set {S1.

S2 indicates that the course set {S2} has at least two instructors.

PI of each job seeker, for each job seeker, either or not, is the 01 backpack problem.

For S1 and S2, you can follow the courses of the currently enumerated job seekers to publish the next status:

Nexts1 = P [I] | S1,

Nexts2 = (P [I] & S1) | S2

F [nexts1] [nexts2] = min (F [nexts1] [nexts2], F [S1] [s2] + P [I])

Code

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.