[HELP] 740D. Alyona and a tree

Revision en3, by _GOT, 2017-08-13 00:48:03

problem link: http://codeforces.com/contest/740/problem/D

I don't understand after performing binary lifting [determining for each node all the ancestors of distance 2^j that control it] how to calculate the answer for all the ancestors that control it not only who's distance at 2^j.

any clarification ?

thanks.

Tags 740d, trees

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English _GOT 2017-08-13 00:48:03 1 Tiny change: 'e ancestor that cont' -> 'e ancestors that cont' (published)
en2 English _GOT 2017-08-13 00:47:30 2 (saved to drafts)
en1 English _GOT 2017-08-13 00:46:54 353 Initial revision (published)