How to solve 785E using Merge Sort trees
How to solve this using merge sort trees.
An explanation about the same would be really helpful. Thanks!