Building Bridges(HARD)

Problem Name:
Building Bridges(HARD)
Site:Spoj
Links:
Tags:
Problem setters: