NOI 2021 Finals

NOI 2021 Final Contest. 5 problems, 5 hours, 500 points. Have fun :)