Sheldon and the mission

qstn:----

can anyone provide me the Editorial for this question

Thank you

Here is my solution.

Basically for all N vertices, construct a graph with N^2 edges where vertex i represents point (x[i],y[i]).
Weight of the edge between vertex i and j will be distance between the two points.

Source vertex will be (0,0) and destination vertex will be given.

Run dijkstra’s algorithm from the source vertex and determine the minimum distance between the source and the destination.

1 Like

Here’s the editorial : DCL2015D | Editorial - editorial - CodeChef Discuss

1 Like