Black_hat123's blog

By Black_hat123, history, 7 years ago, In English

Can someone please help in This problem.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
7 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

For each node you can precompute jumps with lengths powers of 2 and answer queries using binary lifting.

»
7 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it