You are not logged in. Please login at www.codechef.com to post your questions!

×

Sheldon and the mission

qstn:----

http://www.codechef.com/DCL1501/problems/DCL2015D

can anyone provide me the Editorial for this question

Thank you

asked 09 Mar '15, 21:20

nil96's gravatar image

3★nil96
18071845
accept rate: 5%


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.

link

answered 09 Mar '15, 22:26

ironmandhruv's gravatar image

4★ironmandhruv
333239
accept rate: 20%

link

answered 10 Mar '15, 02:38

pratku123's gravatar image

4★pratku123
1.8k4932
accept rate: 14%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×110

question asked: 09 Mar '15, 21:20

question was seen: 493 times

last updated: 10 Mar '15, 02:38