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 1004. Sightseeing Trip

Help me!
Posted by Vokin Andrei (vokin_andrei@mail.ru) 8 Mar 2002 22:07
Could anybody give me any hint?
(I know algoritm with O(n^4), but I always receive Time Limit
Exceeded.)E-mail me to vok@sbor.ru

Thanks!
Isn't difficult (+)
Posted by Miguel Angel 8 Mar 2002 23:57
Facts:
 1.You must find the minimal ring
 2.Traveling in DFS let you see rings
 3. The minimum ring is related to the minimum distance
In fact this is a just a minimum distance problem, which can be
solved in O(n log n), but with a fast algorithm in O(n^2).
Doubts: miguelangelhdz@hotmail.com