Complete FloydWarshall algorithm in both cpp and python.