![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并查集
好多的Bayes
无处不在的贝叶斯
展开
-
Codeforces 28B --- pSort (并查集)
并查集 – CF28B pSort 题目 One day n cells of some array decided to play the following game. Initially each cell contains a number which is equal to it’s ordinal number (starting from 1). Also each cell determined it’s favourite number. On it’s move i-th cell c原创 2020-08-07 19:04:48 · 402 阅读 · 0 评论 -
并查集详解(X-Plosives)
并查集:用于处理一些不相交集合的合并问题。 并查集的基本操作有三个: 1.makeSet(s):建立一个新的并查集,其中包含s个元素集合,每个集合都有自己的编号; 2.unionSet (x,y):把元素x与元素所在集合比较,看是否相交,若是相交,便将x,y集合合并; 3.find(x): ...原创 2019-09-22 09:50:49 · 357 阅读 · 0 评论