Rosetta Problems

LRUD Game

https://atcoder.jp/contests/agc033/tasks/agc033_b