Rosetta Problems

ICPC Practice Contest 2021 - D: Discovering Secrets in Islands

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