摘要: 由于可以预处理出每个左端点对应的右端点,所以并不需要开二维,复杂度应该是介于n和n^2之间。 #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> #define REP 阅读全文
posted @ 2016-04-05 12:20 __560 阅读(216) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> #define REP(i,a,b) for(int i=a;i<=b;i++) #define MS0(a) me 阅读全文
posted @ 2016-04-05 12:11 __560 阅读(362) 评论(0) 推荐(0) 编辑
摘要: /// D-MST struct Edge { int u,v,w; };Edge e[maxn];int en; int in[25100]; int pre[25100],ID[25100],vis[25100]; /// D-MST 点的标号必须是0~N-1,不能改为0~N或1~N int D 阅读全文
posted @ 2016-04-05 12:10 __560 阅读(285) 评论(0) 推荐(0) 编辑