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 output the path?
Posted by Fu Jieyun 8 Jun 2003 15:45

I tried to use Floyd to find a shortest path, but I don't know how to
output the path! I know a recursion way to output the path, But it
wastes time and memory. And it cannot be used in such ring problem .
Re: How to output the path?
Posted by Punkrocker 19 Sep 2003 00:23
IF YOU CAN'T - YOU MUSTN'T DO!
If you can't use Floyd, you can use Dijkstra with references to
previous vertices - it is easier and doesn't cause the TIME LIMIT.