Блог пользователя _GOT

Автор _GOT, история, 7 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится