Problem Statement
A hiker has set out to conquer a hill. The trail guide for the hill lists information known about the hill. First, it lists how tall the hill is, and how far it is to the other side of the hill. Next, it gives a list of landmarks that will be encountered while hiking the hill. The only things that are known about these landmarks are their height, and the order in which they appear along the trail. Finally, on this hill, there are three types of terrain:
Type 1: rising terrain. In this type of terrain, the elevation of the hill rises one meter vertically for every meter that is traveled horizontally.
Type 2: level terrain. In this type of terrain, the elevation of the hill remains constant.
Type 3: falling terrain. This terrain's elevation falls one meter vertically for every meter that is traveled horizontally.
All three types of terrain can last for only multiples of one horizontal meter.
You will be given an int maxHeight (the maximum height of the hill, assuming the hill starts and ends at height 0), an int distance (
A hiker has set out to conquer a hill. The trail guide for the hill lists information known about the hill. First, it lists how tall the hill is, and how far it is to the other side of the hill. Next, it gives a list of landmarks that will be encountered while hiking the hill. The only things that are known about these landmarks are their height, and the order in which they appear along the trail. Finally, on this hill, there are three types of terrain:
Type 1: rising terrain. In this type of terrain, the elevation of the hill rises one meter vertically for every meter that is traveled horizontally.
Type 2: level terrain. In this type of terrain, the elevation of the hill remains constant.
Type 3: falling terrain. This terrain's elevation falls one meter vertically for every meter that is traveled horizontally.
All three types of terrain can last for only multiples of one horizontal meter.
You will be given an int maxHeight (the maximum height of the hill, assuming the hill starts and ends at height 0), an int distance (