Sum of Distances in Cactus

Problem Name:
Sum of Distances in Cactus
Site:CodeForces
Links:
Tags:
Problem setters: