The weighted graph

Problem Name:
The weighted graph
Site:HackerEarth
Links:
Tags:
Problem setters: