![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
@leehom
这个作者很懒,什么都没留下…
展开
-
链式前向星
https://www.cnblogs.com/zmin/p/7349100.html转载,作为收藏。转载 2019-03-16 21:11:10 · 118 阅读 · 0 评论 -
模版 C/C++ 最小生成树 Prim算法
一、基本思想 二、代码实现 #include<cstdio> #include<queue> #include<cstring> #include<algorithm> const int sizeN = 5005; const int sizeM = 200005; using namespace std; int n,m,edge_num,cn...原创 2019-03-17 21:22:24 · 514 阅读 · 0 评论 -
模板 C/C++ 最小生成树 kruskal算法
一、基本思想 二、代码实现 #include<cstdio> #include<algorithm> using namespace std; int read(){ int ans = 0, f = 1; char c = getchar(); while(c<'0'||c>'9'){ if(c=='-') { ...原创 2019-03-17 21:38:09 · 191 阅读 · 0 评论 -
最短路径模板 Dijstra算法
一、算法实现 二、代码实现 #include<cstdio> #include<cstring> #include <queue> const int sizeM = 500005; const int sizeN = 10005; using namespace std; int n,m,s,cnt; int head[sizeN],dis[sizeN],vi...原创 2019-03-21 21:36:48 · 274 阅读 · 0 评论