Labeling the Tree with Distances

Problem Name:
Labeling the Tree with Distances
Site:CodeForces
Links:
Tags:
Problem setters: