We hope you participated and enjoyed the changes made to monthly Long Contests.
From now on, we will be having the problem statements available in Mandarin Chinese and Russian as well
As always, the long contests will start on first Friday of every month and last for 10 days. This ensures that two weekends are covered.
Continuing from there, we bring you the CodeChef May Challenge 2014 . The May 2014 Algorithm Challenge is taking place on http://www.codechef.com/MAY14.
Here are the details:
Date: 2nd May 2014 to 12th May 2014
Duration: 10 days
Problems: 9 binary problems of varying difficulty levels + 1 challenge problem.
Problem Setters:
- Anudeep Nekkanti (anudeep2011),
- Bruno Oliviera (kuruma),
- Dmytro Berezin (Berezin),
- Roman Rubanenko (Rubanenko),
- Sergey Nagin (Sereja),
- Vitaliy Herasymiv (witua),
- Devendra Agrawal
Problem Testers:
- Sergey Kulik (xcwgf666)
Editorialist:
- Lalit Kundu (darkshadows)
Mandarin Translator:
Russian Translator:
- Gerald (Gerald)
It promises to deliver on an interesting set of algorithmic problems with prizes up for grabs.
The contest is open for all and those, who are interested, are requested to register in order to participate.
Check out the local time in your City/Time Zone here. Do share your feedback on what you feel about the new long contest format at feedback@codechef.com
Good Luck! Hope to see you participating.
How to solve ANUDTQ? There is no editorial yet.
It can be solved easily using cartesian tree. Store the vertices in DFS order. To process first query you just need to insert new node in CT right after it's parent. To answer other queries you need to get the subtree of the given node. You can do this by storing depths of each vertex and minimal depth in subtree. You should first split CT by given node(it should go to the left tree). Then find the leftest vertex in the right tree whose depth is lesser or equal to depth of the given node and split by this vertex. Now all the queris are just add on segment, get sum of segment and delete segment. This is a standard CT problem.
The editorials are being posted here: http://discuss.codechef.com/tags/may14/