一、Floyed-Warshall算法
枚举中间点起点终点,对整个图进行松弛操作,就能得到整个图的多源最短路径;
例:POJ2240 Arbitrage
Arbitrage is the use of discrepancies in currency exchange rates to trans...
https://leetcode-cn.com/problems/network-delay-time/submissions/
// n <= 100
class Solution {
int N = 105, M = 6005;
// (邻接表-链式前向星)
int[] w = new int[M]; // 边的权重
...