Feedback of D'code 19

Greetings CodeChef Community!

After months of preparation and sleepless nights, D’code 19 has just concluded. We hope you enjoyed participating in the contest.

Regarding the date clash, which some of you were pointing to. We would have avoided any clash but our dates were finalised almost a month before the contest.

Please feel free to pitch in your views about anything that you would like to mention about the contest. We would really love to get your feedback for improving the contest further in the next iteration.:slightly_smiling_face:


@sachin_yadav I really enjoyed the competition, and no complaints for the class as well, but the problem statements were way too long. I mean, it took a lot of time just to finish reading the statements only.
All in all, it was a good experience, just the ratings aren’t updated, yet.


Maybe next time you can make it a Rated For All contest :slight_smile:. The problems were good but the statements were unnecessarily long and hard to understand.


Problem 1,2 were of correct difficulty level.

Problem 3 could have been solvable one for many participants. I expected I’ll solve it.
FYI, Problem 3 should be like atleast close to 60, 70 people’s should have solved in Div2.

From Problem4, all of them were in correct difficulty level.

Overall, Nice contest.
Pl take care of problem 3 from next contest.

Mxpower problem was 3rd one. It was
easy as compared to other problems but people did not tried solving it at all. Maybe because other problems were sorted luckily ( or unluckily)

1 Like

LOL. I was speaking about ‘GRUMPMA’.
BTW, See after 1st 2 problems in div2 :

I tried GRUMPMA very hard as it was looking easy. Then saw this solved counts in last 5 minutes of contest and gave up :stuck_out_tongue:

I know that’s why I pointed out that grumpma was 4th problem IMO. ( 3rd one was mxpower)
Try solving mxpower and you will see that it was solvable by 50-60 people. ( Or at least more number of submissions than grumpma)

1 Like

The problem statements were too long…But I’ve to appreciate that you guys have put every corner case with care…

1 Like

how to solve the last one?

GRUMPMA could be solved using Basic DP.

Click here to view previous answer

Traverse the rectangles in reverse order.
Observe that computing answer for only first quadrant is sufficient.
Now you will have to add contribution of area of one rectangle when you add that rectangle.
The final figure after adding any rectangle will always be like ladder.
So keep track of upper right corner of each rectangle which are involved in ladder using a set/map.
( Maintain convex hull type shape (which will be ladder in this case) in a set/map and keep removing points which are not necessary/involved for ladder after adding upper right corner of current rectangle)
Only points which are being removed after adding current rectangle will contribute in calculating area of current rectangle. So you can iterate them linearly.
You can find the starting point of set of points which should be removed using lower_bound.
( They will be in subarray of given set)
As set will be sorted according to x coordinate.

Reframing my answer.
Let’s count area only for first quadrant and then we can multiply it by 4.
Add rectangles in reverse order. And count area which will be visible after adding it.
The shape after adding any rectangle will always be like a ladder.
Keep track of ladder by upper right corner of each rectangle.
Maintain the ladder using a set ( sorted by x) (insertion/deletion) You can use that ladder to count the area as well.
The points which are to be removed will only contribute in counting area of current rectangle.
Use lower bound on set/map to find points which should be removed after adding current rectangle.


can you elaborate how to solve the problem. I tried but was not able to come up with a solution

can you provide the editorials? by the way nice contest

clash between codeforces div 2 contest and codechef dcode and codechef code war.
how can one person can be at 3 place at same time!
I think codechef itself should manage this!!

pls explain the solution of this problem GRUMPMA

Code war was unrated and Codechef do not force any unrated contest to change timings unless it’s very much necessary.
You should have requested code war’s organizers for the same.
About D’code you can ask D’code’s organizer’s.

but there is contest on codeforces too
Codechef should consider that platform at least if codechef is not for profit

It was really great to be able to compete! Please provide editorials for the question ! that way it could help us improve !

According to some discuss post organizers of this contest finalized date 1 month ago when codeforces contest was not declared.
It doesn’t make sense if Codechef denies taking contest on this date after approving it one month ago just because of a contest on another website.
Non profit kaha se Aya isme ?
From 3 idiots : kehna Kya chahte ho ?

1 Like

I have posted an unofficial editorial on that. You can refer to that.

1 Like