Rosetta Problems

Hiker Descending the Mountain

https://atcoder.jp/contests/awc0162/tasks/awc0162_b