208 E Problem Help

Revision en1, by retr0coderxyz, 2020-03-19 14:39:51

Can anyone tell me how to solve this problem: 208E.

I saw few solutions and I understood till the LCA part I dont understand why should we renumber the tree and why is binary search used here. It would be great if anybody could help me out with this. Please and thank you so much :)

Tags #binary-lifting, lca

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English retr0coderxyz 2020-03-19 14:39:51 303 Initial revision (published)