private static void folydWarshall(
			HashMap<Integer, HashMap<Integer, Integer>> g, int[][] dist) {
		for (int k = 1; k <= dist.length - 1; k++) {
			for (int i = 1; i <= dist.length - 1; i++) {
				for (int j = 1; j <= dist.length - 1; j++) {
					if (dist[i][j] > dist[i][k] + dist[k][j])
						dist[i][j] = dist[i][k] + dist[k][j];
				}
			}
		}
	}