Hmm.. This problem looked so simple ( Just to make Dijkstra on the graph with 2 times more edges and verticles...) but I can't get it Accepted...
Please help.. ( there is propably a stupid mistake
![:(](./images/smilies/icon_frown.gif)
[pascal]
Sorry
![:wink:](./images/smilies/icon_wink.gif)
[/pascal]
Moderator: Board moderators
The problem is to find the shortest path consisting of an even number of edges, so you can't use the original edges, at least in my solution I couldn't.Just to make Dijkstra on the graph with 2 times more edges and verticles...
Code: Select all
3 3
0 1
10 0 2 10
1
2
10
There is two way to reach grand father's home from gate .4 4
0 3 1
0 1 1
1 2 1
2 0 1
He also decided to start his journey by carrying the cycle on his back, not by riding it.