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

Автор Ahmed_Morsy, 12 лет назад, По-английски

I tried to solve problem e in round 199 xenia and tree using heavy light decomposition but I couldn't figure out the whole idea anyone ?

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

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

EDIT: Wrong idea. As Xellos said: every problem has a simple, clear, obviously incorrect solution :D

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

This problem can be solve easier with centroid decomposition.

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

Almost give up, but it works. Handle the segment carefully and not affect other segment values (by limit range update between chain root and chain tail of each chain) https://codeforces.me/contest/342/submission/111296661