http://www.spoj.com/problems/KOICOST/ I'am not able to understand the problem correctly. It says "While there is a path between vertex u and v, delete the edge with the smallest weight. Cost(u,v) is the sum of the weights of the edges that were deleted in this process." So do we have to consider all outlier paths too? Like in going from 1->2 according to the test case, are 1->2->3->6->2...1->2->3->4->5->3->2 valid routes? Also,once we delete an edge with smallest weight in a path between nodes,say node 1 and node 2,do we consider it deleted already,while computing cost(u,v) of some other pair of nodes?
↧