摘要: typedef struct ufs_elem_st { struct ufs_elem_st *next, *prev; struct ufs_elem_st *parent;} ufs_elem_st, *ufs_elem_t;typedef struct ufs_st { ufs_elem_st *roots;} ufs_st, *ufs_t;ufs_elem_t ufs_get_root(ufs_elem_t me) { ufs_elem_t my_root = me; while( my_root->parent != my_root && my_roo... 阅读全文
posted @ 2011-09-18 14:40 DOF_KL 阅读(195) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;typedef struct ufs_elem_st { struct ufs_elem_st *next, *prev; struct ufs_elem_st *parent;} ufs_elem_st, *ufs_elem_t;typedef struct ufs_st { ufs_elem_st *roots;} ufs_st, *ufs_t;typedef struct star_st { ufs_elem_st ufs_elem; int x,y,z,r;} star_st, ... 阅读全文
posted @ 2011-09-18 14:39 DOF_KL 阅读(336) 评论(0) 推荐(0) 编辑