ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1272. Non-Yekaterinburg Subway

Method
Posted by SerailHydra 10 Nov 2007 17:57
You can consider that the cost of the tunnel is 1, and the bridge is 24000. Then it becomes a MST problem.
Re: Method
Posted by Erop [USU] 6 Apr 2010 20:22
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
Posted by Artem Khizha [DNU] 22 Jul 2010 00:00
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.