Thank you all for participating in the round. It was really interesting to make this. It gave us unforgettable emotions, huge fun and, of course, a real understanding of how hard work and much time is needed to prepare just one 2-hour contest.
All the problems were created by BiNARyBeastt during our classes in winter. He actually has an innate talent to come up with really unique problem ideas and has created about 5 spare problems but we haven't tried to solve them yet. So, wait for our next round... We'll be back...
Solution
Code