PROJECT EULER · #0262
Mountain Range
The following equation represents the continuous topography of a mountainous region, giving the elevationheight above sea level
A mosquito intends to fly from
Because of the intervening mountains, it first rises straight up to a point
First, determine
Then, find the length of the shortest path between
Give that length as your answer, rounded to three decimal places.
Note: For convenience, the elevation function shown above is repeated below, in a form suitable for most programming languages:
h=( 5000-0.005*(x*x+y*y+x*y)+12.5*(x+y) ) * exp( -abs(0.000001*(x*x+y*y)-0.0015*(x+y)+0.7) )
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.