Skip to content

hothike

bradendubois edited this page Nov 11, 2021 · 10 revisions

Hot Hike

ID: hothike

Difficulty: 1.9

CPU Time: 2 seconds

Memory: 1024 MB

Solution

For this, one can read in all n temperatues, and loop through from the first to 3rd last day, and take the bigger of that day and the day 2 ahead, and if it is smaller then any day so far (start with a value larger than the known range, which goes up to 40), mark the temperature and day.

Clone this wiki locally