The Titiwangsa Mountains is a mountain range that forms the backbone of the Malay Peninsula. The Malaysian Cable Car (MCC) society has decided to build a cable car ropeway somewhere along the undeveloped mountain range, and has hired Fluffy the Squirrel to help with designing the ropeway.
There are mountains of heights meters. Fluffy has to select two mountains to be the terminal stations. All the mountains in between the two selected mountains must be strictly shorter than both selected mountains, or else it would not be possible to build the ropeway.
To maximise the enjoyment of the ride, Fluffy wants to build the longest possible cable car ropeway. The length of a ropeway formed by selecting the and mountains is defined as . Your task is to help Fluffy determine the length of the longest possible cable car ropeway from the 6 mountains below.
1 |
|
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
No explanations have been posted yet. Check back later!