Please subscribe to the official Codeforces channel in Telegram via the link: ×

_GOT's blog

By _GOT, history, 16 months ago, In English,

problem link:

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 ?


Read more »