Weighting a Tree

Problem Name:
Weighting a Tree
Site:CodeForces
Links:
Tags:
Problem setters: