The minimum cost

Problem Name:
The minimum cost
Site:HackerEarth
Links:
Tags:
Problem setters: