P7067 [NWRRC 2014] Hiking in the Hills

Description

Helen is hiking with her friends in a highland. Their plan is to hike from their camp $A$ to a beautiful showplace $B$ . Unfortunately, Helen started feeling dizzy due to altitude sickness. Help her group find a route such that the topmost height on that route is as small as possible. ![](https://cdn.luogu.com.cn/upload/image_hosting/o2199eky.png)

Input Format

N/A

Output Format

N/A

Explanation/Hint

Time limit: 2 s, Memory limit: 256 MB.