danhnguyen0902's blog

By danhnguyen0902, 7 years ago, In English

Could somebody please tell me how to use Heavy Light Decomposition (I'm also fascinated with any other way) to solve these two problems:

Thank you so much in advance!

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

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Can anyone please help me out?

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

It's look like advanced tree problem.

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

    yeah, I'm pretty sure that we need to use the idea of Heavy Light Decomposition that breaks the tree into so many subtrees so that we can do different kinds of operations on it. But I didn't get how to handle them yet and still looking for a brilliant solution!!!

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Centroid decomposition is your friend ~

»
7 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

This may or may not help :D ( By seening that you are involved in the conversation there aswell xD )

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    The topic in that conversation was only about Heavy Light Decomposition (HLD). I already knew about HLD, but I still can't find a way using it to solve QTREE4 and QTREE4. People in that conversation was trying to help someone else to implement it, NOT the Centroid Decomposition as no_motivation mentioned.

»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

have you now know how to solve them using HLD?

If you know then please explain it. It will be of great use for beginners like me!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone help with HLD solution of above problems?