help on "Distinct Colors" CSES problem

Правка en1, от It_Wasnt_Me, 2020-07-14 22:56:08

problem link

I'm trying to solve it using BIT (each index is a color) and dfs, the output for node 1 is correct with me I'm trying to do rerooting technique on the tree to get the answer for the rest of nodes.

any idea ?

Теги cses

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский It_Wasnt_Me 2020-07-14 22:56:08 304 Initial revision (published)