RCPC Simulare 2023 day 2 | B. The floor is lava!

This was the problem page during the contest. Access the current page here.