摘要: 先排序,挑最小权值,并利用并查集判断不能形成环 #include <iostream> #include <vector> #include "MinHeap.h" #include "UnionFind5.h" #include "Edge.h" using namespace std; temp 阅读全文
posted @ 2020-04-09 13:37 Erick-LONG 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 利用最小索引堆优化prim #include <iostream> #include <vector> #include <cassert> #include "Edge.h" #include "IndexMinHeap.h" using namespace std; template<typen 阅读全文
posted @ 2020-04-09 13:13 Erick-LONG 阅读(185) 评论(0) 推荐(0) 编辑