Rosetta Problems

ICPC Practice Contest 2021 - N: New Scanning Device

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