Rosetta Problems

Adventurer's Staircase

https://atcoder.jp/contests/awc0096/tasks/awc0096_b