![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并查集
bokzmm
这个作者很懒,什么都没留下…
展开
-
并查集的相关函数
1:相关知识 (1)树: 并查集主要是在解决树的问题中的一种算法,那么什么是树?树其实就是由N个结点通过N-1条边相连且树内不能有环路的一种结构。 树可以有很多的父结点,但一个树中只有一个根结点,通常定义一个数组per[n] (n=1,2,3.....n),用数组序号 i 表示树中的一个元素,per[i]表示元素i的父结点。 根结点的父结点是其本身。 2:并查集的相原创 2015-08-02 10:20:20 · 416 阅读 · 0 评论 -
poj1611The Suspects(并查集)
The Suspects Time Limit: 1000MS Memory Limit: 20000K Total Submissions: 28165 Accepted: 13719 Description Severe acute respiratory syndrome (SARS), an atypical pneumo原创 2015-09-19 22:27:08 · 394 阅读 · 0 评论 -
NYOJ129(判定树)
树的判定 时间限制:1000 ms | 内存限制:65535 KB 难度:4 描述 A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edge原创 2016-03-10 09:06:03 · 580 阅读 · 0 评论