[Problem Link](https://dmoj.ca/problem/cco15p3)↵
↵
[Source Code](https://hastebin.com/leyimawote.cpp)↵
↵
[Test Data](http://www.cemc.uwaterloo.ca/contests/computing/2015/index.html)↵
↵
I tried to solve the problem above using a Segment Tree for each plane. The idea is that I find the maximum interference level between each pair of intersection points, and do a Range-Maximum-Query on the segments the query overlaps. It seems that I have the correct idea/complexity since my code passes the cases of Batch 2 (consisting of max case), but I WA on the Batch 1 Cases. ↵
↵
I think the error I have lies in how I determine the indices for querying in lines 98-120, but I have not been able to find/fix it. Where did I go wrong in solving the problem?↵
↵
Please help, and thanks in advance!↵
↵
EDIT: Bump? I would appreciate if someone commented what additional information they would need to help me out instead of relentlessly pushing the downvote button...
↵
[Source Code](https://hastebin.com/leyimawote.cpp)↵
↵
[Test Data](http://www.cemc.uwaterloo.ca/contests/computing/2015/index.html)↵
↵
I tried to solve the problem above using a Segment Tree for each plane. The idea is that I find the maximum interference level between each pair of intersection points, and do a Range-Maximum-Query on the segments the query overlaps. It seems that I have the correct idea/complexity since my code passes the cases of Batch 2 (consisting of max case), but I WA on the Batch 1 Cases. ↵
↵
I think the error I have lies in how I determine the indices for querying in lines 98-120, but I have not been able to find/fix it. Where did I go wrong in solving the problem?↵
↵
Please help, and thanks in advance!↵
↵
EDIT: Bump? I would appreciate if someone commented what additional information they would need to help me out instead of relentlessly pushing the downvote button...