Rosetta Problems

日本沈没 (Japan Sinks)

https://atcoder.jp/contests/joi2019yo/tasks/joi2019_yo_d