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