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

rhezo's blog

By rhezo, history, 7 years ago, In English

I was reading anudeep2011's blog.

He mentioned 2-3 lines down below to solve QTREE4 using HLD. I didn't understand it, can some explain it to me, please?

Here is the link to the problem.

I read elsewhere, that it can be solved by Centroid Decomposition too, but I need to understand the HLD approach.

EDIT: Now I'm wondering if he wrote those 2-3 lines under QTREE4 by mistake. Because just below it, he says that QTREE5 is a "bit hard", and it is almost the same problem (maximum -> minimum).

Anyone? :|

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

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

Did you solve it using HLD? If you did, can you please give some hints?