Muaath_5's blog

By Muaath_5, history, 19 months ago, In English

Recently, I solved 342E - Xenia and Tree 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 there another way?

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

»
19 months ago, # |
  Vote: I like it -20 Vote: I do not like it

Input all queries in advance and reverse them. Then use code code of 342E. AC.