shelbytom.23's blog

By shelbytom.23, history, 13 months ago, In English

Given a weighted tree , solve q queries , each query is of form "u v" , return maximum edge weight lying on path from node u to node v. 1<=n<1e5 , 1<=q<=1e5

  • Vote: I like it
  • +10
  • Vote: I do not like it

»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

this is the easiest general binary lifting subroutine problem. just take problems from https://codeforces.me/blog/entry/100826