摘要:
当且仅当图中不含奇数环 由于图中没有奇数环,所以染色过程没有矛盾 染色法 #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=100010,M=200010; int n, 阅读全文
摘要:
#include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=100010,M=200010,INF=0x3f3f3f3f; int p[N];int n,m;int cnt=0,r 阅读全文
摘要:
到集合得最短距离是指点到集合中的所有点最短距离,集合就是遍历或正选中的数 prim #include<iostream> #include<cstring> #include<algorithm> using namespace std; int n,m; const int N=510 ;cons 阅读全文
摘要:
#include<iostream> #include<cstring> #include<algorithm> #include<queue> using namespace std; const int N=100010; int n,m; int h[N]; int ne[N];int e[N 阅读全文
摘要:
#include<iostream> #include<queue> #include<cstring> using namespace std; const int N = 1000010; int h[N],e[N], ne[N], idx=0; int d[N]; int m, n; queu 阅读全文