摘要:
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; const int N=10010<<1; struct node { int l,r,ans; } q[N]; int a[N],fa[N],d 阅读全文
posted @ 2020-02-01 20:09
晴屿
阅读(111)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<algorithm> using namespace std; const int N=1e5; struct edge{ int w; int deadline; }e[N]; bool cmp(edge a,edge b) { return 阅读全文
posted @ 2020-02-01 19:57
晴屿
阅读(95)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<cstring> using namespace std; const int N=200010; int d[N],p[N]; int find(int x) { if(p[x]!=x) { int root=find(p[x]); d[x] 阅读全文
posted @ 2020-02-01 17:25
晴屿
阅读(124)
评论(0)
推荐(0)
摘要:
#include<iostream> using namespace std; const int N=1010; int p[N]; int find(int x) { if(p[x]!=x) p[x]=find(p[x]); return p[x]; } int main() { int t; 阅读全文
posted @ 2020-02-01 15:28
晴屿
阅读(78)
评论(0)
推荐(0)
摘要:
#include<iostream> using namespace std; const int N=30010; int n,m,ans,p[N]; int find(int x) { if(p[x]!=x) p[x]=find(p[x]); return p[x]; } int main() 阅读全文
posted @ 2020-02-01 15:23
晴屿
阅读(90)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<cstdio> using namespace std; const int N=100010; int p[N]; int d[N]; int find(int x) { if(p[x]!=x) { int u=find(p[x]); d[x 阅读全文
posted @ 2020-02-01 15:16
晴屿
阅读(108)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<cmath> using namespace std; const int N=1010; int dx[N],dy[N]; int p[N]; int repair[N]; int n; int d; double get(int a,int 阅读全文
posted @ 2020-02-01 14:40
晴屿
阅读(111)
评论(0)
推荐(0)