Explanation for GERALD2(November challenge 2013)


Could anyone please provide an explanation/solution for this problem as editorials were not provided for this problem and I cant seem to decipher the solutions.

1 Like

You need to learn heavy light decomposition.



That’s not an explanation of the solution. I already wrote before, that just saying it needs HLD is practically useless with a problem of this level.

1 Like