This problem is from ACM Southwestern European Regional Contest, Paris 2003
It would be nice if people who have solved the problems could add some hints to the problems they have solved. You can find samples of hints in the Competitive Programming community.
Problems are hosted on Kattis
How did mobius treap fare in the WF-2017?
Please use this thread for any simple questions you have. If you can't figure something out, if you want to make a request, or anything else that comes to mind.
This thread will stay alive until the next one is posted.