| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 11934 | All Pair Shortest Paths - Cost |
|
Description
- Convert the nonzero digits of the matrix into a graph
- Print out the shortest path of each pair of nodes and cost.
- Each cell in the matrix contains a digit value (ranged from 0 to 9)
- 0 represents no edge between two nodes
- Nonzero digits represent the weights of two node
Input
- Number of matrices
- Given the number of vertices.
- 1 ≦ Number of vertices ≦ 100
- A matrix contains a digit value (ranged from 0 to 9)
- 0 represents no edge between two nodes

Output
- Print out the cost for each pair in row major order.
- Cost(from,to):xxx
- Print a new line between matrices.
