![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并查集
杨明诚
明则诚矣,诚则明矣
展开
-
Rikka with Graph
Rikka with Graph As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has a non-direct graph wi原创 2017-08-02 21:00:11 · 302 阅读 · 0 评论 -
The Suspects
The Suspects Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, th原创 2017-08-02 22:21:07 · 219 阅读 · 0 评论 -
How Many Tables
How Many Tables Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the原创 2017-08-02 22:42:12 · 349 阅读 · 0 评论 -
并查集
并查集 并查集,在一些有N个元素的集合应用问题中,我们通常是在开始时让每个元素构成一个单元素的集合,然后按一定顺序将属于同一组的元素所在的集合合并,其间要反复查找一个元素在哪个集合中。下面看这个树状图解释一下: 图中一共四组数据,A是B的父亲节点,A有是F的儿子节点,所以这两组数据应该放到一块,因此本质上是3组数据。并查集的作用就是把相关的放到一块去。 下面看几个并查集的函数原创 2017-08-02 20:13:23 · 232 阅读 · 0 评论