Question: Either java or python is OK ! Thank you so much!! The Tortoise is meeting Achilles for lunch, at position X in the coordinate plane.

 Either java or python is OK ! Thank you so much!!The Tortoise is meeting Achilles for lunch, at position X in the

Either java or python is OK ! Thank you so much!!

The Tortoise is meeting Achilles for lunch, at position X in the coordinate plane. The Tortoise starts from his house at position (0, 0) and can travel 1 unit distance per minute, but must travel along one of the axis (i.e directly north/south or east/west) Unfortunately for the Tortoise, who prides himself on his punctuality, Achilles has laid a series of impassable obstacles in the area. Specifically, there are n boulders at positions (i, yi) creating a labyrinth the Tortoise needs to traverse to make it to lunch. A boulder at some position (x, y) means that the Tortoise cannot be in that position, and consequently, cannot travel from (for example) (x -1,y) to (x +1, y) without finding a path that does not contain (, y) Help the Tortoise find the shortest path from (0, 0) to (X, Y), which will allow him to minimize his travel time, and maintain his perfect reputation for punctuality Input Format Three space delimited integers on the first line, X, Y and n representing the -y coordinates for lunch and the number of obstacle locations to follow. The next n lines contain space separated and y coordinates (in that order) x_2 y_2 x.n y_n Constraints 500

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!