Question on heavy light decomposition
Hi everybody, I am solving this problem on SPOJ and have applied heavy light decomposition for solving it. But I'm getting wrong answer and i've not still understood whats wrong.
The link of my code is here.
Thanks in advance.
CSES Sliding Window Advertisement