Rosetta Problems

Spread of Information

https://atcoder.jp/contests/arc116/tasks/arc116_e