Rosetta Problems

Reverse a Road II

https://atcoder.jp/contests/jag2014autumn/tasks/icpc2014autumn_f