SQRT Decomposition Problem

Revision en1, by vkditya0997, 2016-09-21 22:39:52

Hello everyone,
I was trying this problem : Click
I couldn't get any idea. So, read the editorial.
It mentioned to square root decompose the queries and then solve the problem. I don't really get the idea behind it.
can someone, please explain?
P.S.: I know about SQRT decomposition

Tags #trees, lca, advanced data structure, help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English vkditya0997 2016-09-21 22:39:52 390 Initial revision (published)