Updates on a tree

Is there any way to perform an update as given below efficiently? Let each node in the tree store some value.
Update: u v d which means increase the values of all nodes within a distance of d from u by v.

That’s not what he’s asking for

Do you have the problem link ?

Contest Page | CodeChef. One of the comments given below the editorial was that it could be done using centroid decomposition. But I don’t how

And I’m talking about unweighted trees. So by distance, I just mean the number of edges.