Rosetta Problems

Adventurer and a Row of Monsters

https://atcoder.jp/contests/awc0092/tasks/awc0092_e