← Back to topics
Topic

z-cycle

m
matijazzz
I' m interested if this idea solves the problem .. We find shortest path from vertex 1 to vertex n, then ignore those vertexes we used in that shortest path and then without using them we find the shortest path from vertex n to vertex 1. is the sum of those two paths the result?
m
matijazzz
here's my code:
http://www.z-trening.com/submit.php?submit=7100145408&subm_code=1
1
1010011010
i think no.. my solution was min-cost-flow