摘要: 1 //非递归压缩路径 2 int findx(int x){ 3 int root = x; 4 // 先找到根节点. 5 while(root != parent[root]) 6 root = parent[root]; 7 while(x !... 阅读全文
posted @ 2015-10-15 09:01 roger9567 阅读(139) 评论(0) 推荐(0)