Rosetta Problems

ICPC Practice Contest 2021 - G: Garden

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