Rosetta Problems

Battle for Territory

https://atcoder.jp/contests/awc0159/tasks/awc0159_d