Neutral Ground

From programming_contest
Revision as of 17:21, 20 October 2021 by Kmk21 (talk | contribs) (Created page with "This problem gives us an ASCII map of two armies and asks us how to deploy forces to prevent the two from being able to access one another. It should be clear from the descri...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This problem gives us an ASCII map of two armies and asks us how to deploy forces to prevent the two from being able to access one another.

It should be clear from the description of the problem that this is a Min-Cut problem. We have to split each node, as the cost is for node traversal, as well as have a source edge with infinite capacity going to each numbered node bordering an A, and as well a sink edge coming from each node bordering a B. The run of maxflow is 100% standard.