Rosetta Problems

ICPC 2024 miền Trung - F: ThreeBuildings

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