摘要:
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef pair<int, int> PII; #define x first #define y second const int 阅读全文
摘要:
#include <iostream> #include <string> #include <algorithm> using namespace std; const int N = 1010; int f[N][N]; int v[N],w[N]; int main() { int n,m; 阅读全文
摘要:
#include <iostream> #include <algorithm> #include <cstring> using namespace std; const int N = 110; int n,m; int w[N],v[N],root; int h[N],e[N],ne[N],i 阅读全文
摘要:
带权并查集,用权值维护是不是属于同一类 #include <iostream> #include <algorithm> #include <cstring> using namespace std; const int N = 50010; int fa[N],d[N];//d[i]维护i到自己祖 阅读全文