Solving CHANDQ with Persistent Segment Trees


Can someone explain how to solve the problem with persistent segment trees, I have already tried with the Mo’s algorithm method.