Rosetta Problems

Chain of Infection

https://atcoder.jp/contests/awc0101/tasks/awc0101_c