Rosetta Problems

ICPC 2022 miền Bắc - E: FUNCTION

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