摘要:
有时候一道大水题,因为英文描述可能有点复杂或者其它云云,就比如那道PRO。。别先被一道题吓一跳,,, 英文描述看深入一点总归会能解决的,尽可能多的考虑情况。大胆尝试。 阅读全文
摘要:
1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #define maxn 100010 5 int u[maxn],v[maxn],r[maxn],p[maxn]; 6 double w[maxn]; 7 using namespace std; 8 int find(int x){return p[x]==x?x:p[x]=find(p[x]);} 9 int cmp(const int i,const int j){return w[i]<w[j];}10 double 阅读全文