Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official. ×

### avi224's blog

By avi224, 8 months ago, ,

Hi all,

Programming club, Indian Institute of Technology, Mandi is hosting Dementia '18 as part of our cultural-cum-technical fest Exodia. The contest will take place on 12th April,2018 at 20:00 IST(14:30 UTC). The contest features 6 delectable problems of varying difficulty and you'll get 2.5 hours for solving them. The problem setters and testers for the contest are me(avi224) and hitesh_r. The contest is rated for division II on codechef(below 1800 rating). However, division I can participate out of competition.

There are prizes worth Rs 5K for the top participants(from both divisions) from India.

Combined ranklist

•
• +17
•

 » 8 months ago, # |   +27 What if someone gets into division 1 after this contest? Will he participate in long as division 1? He might already have solved problems in division 2.
 » 8 months ago, # |   +14 Fine problems :) Can someone elaborate solution for the hardest task ? I tried binary search + several wrong greedy strategies for picking optimal plants. I believe I can solve it on a little harder way (always is optimal to water smallest plant — it can be simulated somehow). But I believe there is some easier solution.P.S. Can you share standings for unofficial participants ?
•  » » 8 months ago, # ^ |   0 Thanks :)So the greedy approach would be to choose the smallest ai plants on i'th day and water them. Then you can apply binary search over days and find the ans. There is one other approach using segment tree. The idea is to first sort the heights of tree and then keep it sorted after every day. For eg 1 1 1 2 3 3 3 3 3 5 5 5 5 are the heights on some day and you have to water 6 plants, then you go to 6th index and find value ‘h’ and find first and last occurrence of ‘h’. Then increment all the numbers before the first occurrence and some of the numbers with height same as ‘h’, as needed. So the heights will become 2 2 2 3 3 3 3 4 4 5 5 5 5. So the array is still sorted.Editorial will be out soon which would give more clear idea about the binary search solution. Combined ranklist will be out soon as well.
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 I tried to find the lower bound and upper bound of value of h using binary search and then tried to update their heights by increasing them by 1 so that I need not sort the array d times. The complexity will be O(max(nlogn,nd)).I am getting TLE. What is the intended complexity?
•  » » » 8 months ago, # ^ |   0 Still waiting for combined ranklist
•  » » » » 8 months ago, # ^ |   0 This is the reply we got from CodeChef:"The combined ranklist cannot be shown publicly now. That will take some time.For you privately, yes, sorry for the delay. I'll remind the concerned person again to get the combined ranklist. It takes some work because this is the first time we're doing it and some DB scipt needs to be written."
•  » » » » 8 months ago, # ^ |   0 I've put the link to the combined ranklist in the blog. Congrats!
•  » » 8 months ago, # ^ |   0 This problem seems somewhat similar to the "Halum and Candies " link: (http://codeforces.com/gym/101353/attachments) the editorial page describes the solution http://codeforces.com/blog/entry/51642
 » 8 months ago, # |   0 when the problem is add in practice.
•  » » 8 months ago, # ^ |   0 Problems are automatically sent to practice now after the contest. You can submit from the problem page itself :)
•  » » » 8 months ago, # ^ |   0 today it is not working. now it fixed.
 » 8 months ago, # |   0 When will the ratings be updated,before ending long or after it??
•  » » 8 months ago, # ^ |   +1 after long is finished.
 » 8 months ago, # |   0 What is the intended solution to the problem where each query is of the form [Left, Right, x]And the answer to the query is sum( ceil(A[i]/x) ).I'm seeing many solutions which solved the problem by just going from Left to Right and summing over ceil(A[i]/x). O(NQ)Is this the intended solution ?
•  » » 8 months ago, # ^ |   0 No, it was using binary search and/or merge sort tree. O(NQ) passed as we didn't expect 5*10^8 operations to pass in 1 s. The observation is that we have to count the frequency of O(sqrt(x)) numbers only for each query. I'll put a detailed editorial soon.
•  » » 8 months ago, # ^ |   0 Can also be done using MO's algorithm + Binary Indexed Tree
•  » » » 8 months ago, # ^ |   0 Kindly elaborate Lakh and avi224. Please post the editorial link on here when it is released !
 » 7 months ago, # | ← Rev. 2 →   +33 So I came in second in this contest and was going to get 1.5k . The organiser sent me 3 of such coupons -_- .UPD : The prize money has now been transferred.
•  » » 7 months ago, # ^ |   0 Hi Vaibhav, I am Sahil, ex-Coordinator of Programming Club at IIT Mandi. I would like to thank you for bringing into notice this issue and thank you for updating your comment. Kudos to the coordinators for resolving the issue within a day.Also, I would like to tell you that the moment I got to know this happened, we started looking where the fault lied, and while the coordinators were busy solving your issue, I realized that the way you had done all this was EXTREMELY UNPROFESSIONAL. When you got the prizes and you were not happy with them, you should have mailed or called the respective authority rather than posting on public forums that you did not like the prize you got.I would also like to tell you that prizes are not in our hands, but in the hands of the sponsors. They told coordinators here that they'll be giving prizes worth this much and we got these coupons from the sponsors. I fail to understand the fault of the coordinators here if you did not like the prizes.I was in no way involved in the administration of the event, and was just a spectator as others are on codechef and codeforces, but since I know the whole story which you did not post, I can confidently say that the coordinators did a great job, and that because of your unprofessionalism the community here has received some undeserved flak. I would request you to kindly get to the issue first and behave more professionally from next time.