help on "Distinct Colors" CSES problem

Revision en1, by 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 ?

Tags cses

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English It_Wasnt_Me 2020-07-14 22:56:08 304 Initial revision (published)