Programming Contest #1 (Chapter 'Ramayan')

Hello Coders,

Greetings from algo_UNLOCK, the CodeChef Campus Chapter of Pandit Deendayal Petroleum University!

We are glad to invite you to our 2nd Programming (DSA) Contest, Programming Contest #1 (Chapter ‘Ramayan’). You will be given 7 problems, and 3 hrs. to solve them! The contest will start on Monday, May 18, 2020 at 21:00 IST.

  • Rank-list Type: ACM (10 minutes penalty, for each wrong submission)
  • The Contest will be unrated.

The Rank-list will freeze one hour before the contest ends!

  • Problem Setters: @vok_8, @pallove_227

  • Prizes: “250 Laddus” each, will be awarded to the Top 3 users, in the Rank-list. (Only, if the total participants in the contest >80)

We thank the CodeChef Team for their help in setting up the contest!

We hope, you all will enjoy solving the problems!

We will post the editorials for all the problems, after the contest!

Happy Coding!

Stay Safe!

Good Luck!

UPD-1: Congratulations to the Contest Winners!

  1. @uwi
  2. @rahul_g
  3. @nishant403

UPD-2: Everyone can find the Editorial for all the Problems, here.

UPD-3: Please share your valuable Feedback, about the Contest. (Link)

UPD-4: “250 Laddus” (each) have been credited to the CodeChef Account of the Winners (Top - 3).


In problem Hanuman and tree it was nowhere mentioned to consider root as 1. Do we just have to guess that part??

Yes, it wasn’t mentioned!

Hence, we also put up an announcement, regarding considering root as “Node-1”. (During the Contest)

Also, we have updated the Problem Statement.

“Tree is always rooted at (Node-1)” . How does it meant root is 1?? Can you please explain.