A proper editorial for PDELIV

No editorial has been uploaded for this question , though the approach of solving it has been discussed in one of the posts. However the approach fails to help those who have no background in the trick discussed as there is no explanation behind the logic used . So if anyone could write a good editorial it would be of great help .

Link to Question : CodeChef: Practical coding for everyone

1 Like

In June Long challenge they also didnt post any editorials for Hard problems. Last time they posted after a month or so after saying them for the editorial again and again. I dont know why?
Why cant they prepare editorials in those 10 days when the contest is running?

Read up Convex Hull Trick if you don’t know it. I am assuming you already know about CHT and Segment trees. Now the task is blocking some of the lines for some queries. Instead of blocking lines we can treat them as taking some disjoint ranges. For example there are 10 pizzerias/lines. Now you block 2nd,6th and 7th line. Its equivalent to querying for lines in range {{1,1},{3,5},{8,10}}. This can be done using segment trees. Store the lines in segtree nodes. Each node having a hull, stores all the lines in the range the node represents.

Thanks @soham1234, I too was waiting for the editorial of this problem. I was too foolish to solve this problem for 100 points as I was just confused by the blocked lines but it seems now as if it was not too tricky. Anyways thanks for this short editorial :slight_smile:

They might be busy due to some reasons. Develop a habit of reading others code and understanding stuffs.


I raised the same question at
where admin gave a link to small explanations of questions whose editorials aren’t out still… and also confirmed that it will be probably done in some days… you can look at it…
Also editorialist apologised for this issue at link :

1 Like