Why aren’t the solutions for this problem public?
I guess it requires a Segment Tree. The solutions would be really helpful to learn implementation of trees.
Why aren’t the solutions for this problem public?
I guess it requires a Segment Tree. The solutions would be really helpful to learn implementation of trees.
Well, this is one of the greatest examples (for me) of how to use BIT (Binary Indexed Tree) in practice, take a look at this tutorial on TopCoder.
Me too, I tried a lot and didn’t solve it
i am also want to solve it…but it is more tricky