Please subscribe to the official Codeforces channel in Telegram via the link: ×

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

Revision en2, by i_love_phuong_loan, 2017-09-14 10:44:06

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


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