Luo Gu $ P2598 \ [ZJOI2009] $ wolves and sheep stories network flow

Positive Solutions: Network Flow

Report problem solving:

Portal!

Aung apparently considered minimal cut duck $ QwQ $, consider each of said land belonging to either the sheep or the wolf belongs to, then if one edge is different on both sides of the fence must be adjacent belongs.

So consider giving all the sheep to the $ S $ even $ inf $, all wolves to $ T $ even $ inf $, then the adjacent land between four and even China Unicom 1 on the Eau?

Hu mouth, if there is enough to point out the pot $ QwQ $

Guess you like

Origin www.cnblogs.com/lqsukida/p/11306336.html