摘要: 题意:判断最小生成树是否唯一。 思路:求出次小生成树,如果与最小生成树相等,则不唯一。 prim: #include<iostream> #include<stdio.h> #include<string.h> using namespace std; /* 求最小生成树时,用数组Max[i][j] 阅读全文
posted @ 2015-09-05 16:40 gongpixin 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题意:裸最小生成树,主要是要按照字典序。 思路:模板 prim: #include<iostream> #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; #define INF 0x7fffff 阅读全文
posted @ 2015-09-05 14:18 gongpixin 阅读(373) 评论(0) 推荐(0) 编辑