Neutral Ground
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.