摘要:
//并查集 路径压缩(非递归版)--ref算法笔记 //边贪心思想 //用树的性质V-1==E控制循环提前跳出break #include<bits/stdc++.h> using namespace std; const int N=100010; const int M=1000010; str 阅读全文
摘要:
//与Dijsktra思想下相同,划分两个不同集合 //区别:d[]数组含义不同,此处是到集合的最短距离 //优化方式不同的,d[v]=G[u][v]; #include<bits/stdc++.h> using namespace std; const int M=1010; const int 阅读全文