Hard problem

Правка en2, от Muaath_5, 2023-03-28 16:57:13

Recently, I solved 342E - Ксюша и дерево using Sqrt decomposition.

The problem have two types of queries: - Color node $$$x$$$ red - Find minimum distance to any red color

I thought, what will be the solution if there is query: $$$Color node x blue$$$.

I'm not sure if this is solvable using centroid decomposition, but is it solvable in anyway other than it?

Теги centroid decomposition, sqrt decomposition, problem

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский Muaath_5 2023-03-28 16:59:18 4 Tiny change: 'queries:\n- Color ' -> 'queries:\n\n- Color ' (published)
en3 Английский Muaath_5 2023-03-28 16:58:36 32
en2 Английский Muaath_5 2023-03-28 16:57:13 330
en1 Английский Muaath_5 2023-03-28 16:52:08 46 Initial revision (saved to drafts)