anup.kalbalia's blog

By anup.kalbalia, 10 years ago, In English

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:

Problem Testers:

Editorialist:

Mandarin Translator:

Russian Translator:

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 [email protected]

Good Luck! Hope to see you participating.

  • Vote: I like it
  • +12
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve ANUDTQ? There is no editorial yet.

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
10 years ago, # |
  Vote: I like it +3 Vote: I do not like it

The editorials are being posted here: http://discuss.codechef.com/tags/may14/