|
|
back to boardMethod You can consider that the cost of the tunnel is 1, and the bridge is 24000. Then it becomes a MST problem. Re: Method would be better to make weight tunnel 0, the weight of the bridge 1, and the answer is weight of minimal spanning tree Re: Method Your idea is interesting, but weird a bit. :) It can be solved with DFS easily. Moreover, you even don't need to know anything about bridges. |
|
|