随笔分类 -  最小生成树

摘要:prim算法(不用并查集)#includeusing namespace std;#define inf 0x3f3f3f3f#define M 105//int mat[M][M];/*int pre[M];int Find(int x){ int p,t; ... 阅读全文
posted @ 2018-04-30 13:34 MCQ 阅读(94) 评论(0) 推荐(0)
摘要:最小生成树水题#includeusing namespace std;#define inf 0x3f3f3f3f#define M 105int mat[M][M];int prim(int n,int sta)//n表示有n个顶点,sta表从sta这个顶点出发生成... 阅读全文
posted @ 2018-04-28 00:55 MCQ 阅读(92) 评论(0) 推荐(0)