sak3t's blog

By sak3t, history, 8 months ago, In English,

Given a weighted tree of $$$N <= 10^5$$$ nodes, answer $$$Q <= 10^5$$$ queries.
Each query will have $$$node, k$$$ asking number of all the nodes having even weight in the subtree of $$$node$$$ and at a distance $$$k$$$ from $$$node$$$.
Please provide hints.

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it