UVALive 3972 March of the Penguins (maximum flow split point +)

Meaning of the questions: a group of penguins, n piece of ice, which gives the maximum distance of each jump penguins, penguin existing number and then give the coordinates and ice above and the number of permitted jump, and asked what ice is all you can penguin coming together in

Analysis: For each split point for pieces of ice, the capacity to allow the number of hops, the source is connected to one side of a piece of ice, the capacity is the number of ice penguin. And n ^ 2 enumeration ice and ice, if the distance between them is less than the maximum jump distance, even an edge, infinite capacity, because they do not limit the number of hops between the ice and the ice, single nuggets that limits the number of hops. Finally, you can run a maximum flow covers a maximum flow, enumerate every point, because each point can be a meeting point, a point at least as long as this flow, it shows penguin ice can gather in this piece. Construction Plan is as follows.

Summary:
Code: To be completed. Reference https://blog.csdn.net/qq_37943488/article/details/83503814 .

Guess you like

Origin blog.csdn.net/tianwei0822/article/details/92795621