Floyd_warshall recover