Rosetta Problems

Free Contest 122 - KINGDOM

https://oj.vnoi.info/problem/fc122_kingdom