Rosetta Problems

ICPC 2024 miền Trung - A: Thief

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