Bzoj-1934-vote Vote of Goodwill-shoi2007

Source: Internet
Author: User

Describe

There are n children in the kindergarten who are going to vote to decide whether to sleep or not. To them, the problem is not very important, so they decided to carry forward the spirit of humility. Although everyone has their own ideas, but in order to take care of their friends of the idea, they can also vote and their own will be contrary to the vote. We define the number of conflicts in a poll as the total number of conflicts between good friends plus the number of people who have clashed with their own intentions. Our question is, how should each child vote in order to minimize the number of conflicts?


Analysis

    • A conflict corresponds to a cut, the minimum number of conflicts is to seek the minimum cut---do not understand
    • Perceptual analysis, if the edge of S->x (X->t) is in the smallest cut, indicates that X will change. If the edge of the x->y is in the smallest cut, there is a conflict between x and Y to the end.

Code

Bzoj-1934-vote Vote of Goodwill-shoi2007

Related Article

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.