上一页 1 ··· 22 23 24 25 26

2012年7月21日

【解题报告】【HDOJ1232】【并查集】畅通工程

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1232 1 #include<stdio.h> 2 #include<string.h> 3 int father[1005]; 4 int record[1005]; 5 int find(int x)//用来寻找根节点 6 { 7 int t; 8 if(father[x]==x) 9 return x;10 t=find(father[x]);11 father[x]=t;12 return t;13 }14 int main()15 {... 阅读全文

posted @ 2012-07-21 16:40 coding封神 阅读(123) 评论(0) 推荐(0) 编辑

上一页 1 ··· 22 23 24 25 26

导航