摘要: 目录floydbitset优化 题目链接:https://www.luogu.com.cn/problem/B3611 参考题解:https://www.luogu.com.cn/blog/53022/solution-b3611 floyd #include <bits/stdc++.h> usi 阅读全文
posted @ 2023-12-26 18:02 quanjun 阅读(16) 评论(0) 推荐(0) 编辑
摘要: floyd主要解决的问题: 多源多汇最短路:https://www.cnblogs.com/quanjun/p/17928959.html 传递闭包:https://www.cnblogs.com/quanjun/p/17928980.html 最小环:https://www.cnblogs.com 阅读全文
posted @ 2023-12-26 17:52 quanjun 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 目录朴素的 Dijkstra 算法SPFA 算法Dijkstra + 优先队列优化 题目链接:https://www.luogu.com.cn/problem/P1339 题目大意:无向图有单源最短路。 朴素的 Dijkstra 算法 时间复杂度 \(O(n^2)\)。 #include <bits 阅读全文
posted @ 2023-12-26 17:28 quanjun 阅读(22) 评论(0) 推荐(0) 编辑