摘要: #include using namespace std; const int maxn = 5e4 + 5; const int inf = 0x3f3f3f3f; int n, head[maxn], dis[maxn], cnt; struct node{ int to, w, next; } ed[maxn*4]; //数组开2*maxn超时,开大一点 inlin... 阅读全文
posted @ 2019-05-16 18:30 CoffeeCati 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 次小生成树模板,别忘了判定不存在最小生成树的情况 阅读全文
posted @ 2019-05-16 01:20 CoffeeCati 阅读(111) 评论(0) 推荐(0) 编辑