摘要: #includeusing namespace std;int temp[10005];int find(int n){return temp[n]==n?n:temp[n]=find(temp[n]);}int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF) { int u[100005],v[100005]; for(int i=0;i=0;i--) { int t,s; t=find(u[i]); s=find(v... 阅读全文
posted @ 2013-09-09 18:14 nylg-haozi 阅读(148) 评论(0) 推荐(0) 编辑