Please write a general program to solve the all-pairs shortest-path problem for the digraph. Then, solve the all-pairs shortest-path problem for the digraph with the weight matrix:
0 2 8 1
8 6 0 3
2 8 8 8
0 4 8 8
8 2 0 3
3 8 8 8
0 4 8 8
2 0 3 3
8 8 8 0
Requirements: You are allowed to write the program in any language. You need to provide the source code and submit your running results.