22SP - 04 Widest Mountain
CodeChefOpen on judge ↗
Sasha arrives at her next travel location, Switzerland! However, all her prior traveling has made her tired (she hasn’t been going to the gym lately). Since she still has a lot of traveling to do, she wants to get back into shape. She has a map of a trail in the Alps, which includes a list of the elevations at each mile of the trail. To maximize her gains, she wants to find the longest segment of
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start