Rosetta Problems

ICPC Practice Contest 2021 - M: Mobile Communication in Flatland

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