Rosetta Problems

Robot's Treasure Collection

https://atcoder.jp/contests/awc0152/tasks/awc0152_b