nodes and m undirected edges. These nodes are numbered from 1 to n. Each edge has a value. The graph does not contain self-loop and there is at most one edge between any two nodes. Addtionally, there are at most two non-intersect paths, which shares no common edges, between any two nodes. She defines W(x,y) as the minimum cost to let no path between x and y. The cost to cut one edge is the value of the edge, and once you cut an edge, the edge disappears in the graph. Every time you need to calculate the minimum cost of a pair, you need to cut the edges from the original graph. every W is independent. At last, Grace asks you to calculate this

sum of W(i,j)(i != j)