construct a graph as followsvertices: from 0 to n, n+1 vertices, where 0 is outside
edges: weight of edge = number of tunnel connecting the two vertices
perform standard max-flow algorithm
is that right?
agree
本帖共有 20 楼,当前显示第 5 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>