Loading docs/graph/shortest-path.md +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ while (!q.empty()) { } } ``` SPFA 的时间复杂度为 $O(km)~ (k\approx 2)$ (玄学),但 **理论上界** 为 $o(nm)$,但精心设计的稠密图可以随便卡掉 SPFA,所以考试时谨慎使用。 SPFA 的时间复杂度为 $O(km)~ (k\approx 2)$ (玄学),但 **理论上界** 为 $o(nm)$,精心设计的稠密图可以随便卡掉 SPFA,所以考试时谨慎使用。 ## Dijkstra 算法 Loading Loading
docs/graph/shortest-path.md +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ while (!q.empty()) { } } ``` SPFA 的时间复杂度为 $O(km)~ (k\approx 2)$ (玄学),但 **理论上界** 为 $o(nm)$,但精心设计的稠密图可以随便卡掉 SPFA,所以考试时谨慎使用。 SPFA 的时间复杂度为 $O(km)~ (k\approx 2)$ (玄学),但 **理论上界** 为 $o(nm)$,精心设计的稠密图可以随便卡掉 SPFA,所以考试时谨慎使用。 ## Dijkstra 算法 Loading