Find shortest distances between every pair of vertices in a given edge weighted directed Graph.

**Input:**

The first line of input contains an integer T denoting the no of test cases . Then T test cases follow . The first line of each test case contains an integer V denoting the size of the adjacency matrix and in the next line are V*V space separated values of the matrix (graph) .

[Read more…]