摘要: #include<iostream> #include<cstring> #include<stdio.h> #include<map> #include<vector> #define cle(a) memset(a,0,sizeof(a)) using namespace std; const 阅读全文
posted @ 2020-02-01 23:22 晴屿 阅读(120) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cmath> #include<algorithm> using namespace std; const int N=4e4+10; // 东西 南北 int p[N],D[N],B[N]; struct node{ int x,y,d; c 阅读全文
posted @ 2020-02-01 21:21 晴屿 阅读(111) 评论(0) 推荐(0)
摘要: #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 晴屿 阅读(113) 评论(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 晴屿 阅读(98) 评论(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 晴屿 阅读(125) 评论(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 晴屿 阅读(91) 评论(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 晴屿 阅读(110) 评论(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)