I wanna know why is it giving wrong answer even though my solution is not much different than that mentioned in Editorial. Just the difference is that I’ve used Segment Trees for calculation of Prefix Sum in O(log(n)) (it isn’t TLE btw)
I wanna know why is it giving wrong answer even though my solution is not much different than that mentioned in Editorial. Just the difference is that I’ve used Segment Trees for calculation of Prefix Sum in O(log(n)) (it isn’t TLE btw)