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

How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by TheBlaNK 6 Feb 2003 23:09
How to find minimal ring in the graph,(I got AC but it's very slow)
Mine is
 for(from=0;from<n;from++)
  for(to=from+1;to<n;to++)
    {
      delete path(from,to)
      find m=the shortest path(from,to)
      ringpath=m+dis(from,to);
      if( ringpath < minring ) minring=ringpath;
    }
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by Saber 10 Mar 2003 20:03
you should use N dijkestra to find it ...
if u cant mail me : SSF_DIGI@hotmail.com i'll help u !!! :p
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by zhanghe 15 Jun 2003 09:08
why? i use pascal and i also use n dijkstra but it's time out???
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by liuzhiyu 17 Apr 2004 21:43
yes!I use dijkstra for every edge!tle!!!
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by felicia2 8 May 2004 14:31
mine is tle....
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by somebody 17 May 2004 20:28
but why u use it for edges? u can just use it for every points.
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by somebody 17 May 2004 20:29
sorry, points->point
Re: How to find minimal ring in the graph,(I got AC but it's very slow)
Posted by YingShanMingZhi 10 Aug 2004 22:09
I tle on test1,why?????????????????????????????