How to update all the parent nodes of a child node when you update the child node ?

Revision en1, by coding_weeb, 2017-09-14 08:42:21

The value of a node is the product of all the node in its subtree. So how do you update all the parent node when you update the child node ? The original problem is http://codeforces.com/gym/101466/problem/K.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English coding_weeb 2017-09-14 10:44:06 10
en1 English coding_weeb 2017-09-14 08:42:21 291 Initial revision (published)