摘要:
here a了捏 #include<iostream> #include<algorithm> #include<set> using namespace std; const int N = 200010; int n,m; int p[N]; int f = 0; //并查集 int find( 阅读全文
摘要:
食物链 带权并查集 #include<iostream> using namespace std; const int N = 100010; int p[N],d[N]; int n,k; int res = 0; int find(int x){ if(p[x] != x){ int rot = 阅读全文
摘要:
区间选点 区间问题一般对右端点进行排序并用右端点映射左端点 可以高效判断 wa 区间覆盖了,左端点不是最大值 #include<iostream> #include<algorithm> #include<map> using namespace std; int n; map<int,int> a 阅读全文