|  | 
|  | 
| вернуться в форум | How to output the path?  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? 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.
 | 
 | 
|