Floyd-Warshall algorithm in MPI and C++