
并查集
bokzmm
这个作者很懒,什么都没留下…
展开
-
并查集的相关函数
1:相关知识(1)树: 并查集主要是在解决树的问题中的一种算法,那么什么是树?树其实就是由N个结点通过N-1条边相连且树内不能有环路的一种结构。树可以有很多的父结点,但一个树中只有一个根结点,通常定义一个数组per[n] (n=1,2,3.....n),用数组序号 i 表示树中的一个元素,per[i]表示元素i的父结点。根结点的父结点是其本身。 2:并查集的相原创 2015-08-02 10:20:20 · 443 阅读 · 0 评论 -
poj1611The Suspects(并查集)
The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 28165 Accepted: 13719DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumo原创 2015-09-19 22:27:08 · 419 阅读 · 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 · 613 阅读 · 0 评论