Rosetta Problems

Manhattan Warp Machine 2

https://onlinejudge.u-aizu.ac.jp/problems/1561