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

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

Can QTREE be solved using centroid decomposition. I solved QTREE5 using the method, but I am struggling to solve QTREE using the method. Problem

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

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I see two solution ideas: 1) HLD + segment tree. 2) Link-Cut Tree (almost no extra code)

I don't think centroid decomposition is a good approach here due to the updates required. Although there may be a solution using centroid decomposition trees but that solution doesn't seem as obvious to me.