并查集
寻找秀儿
keep quiet . keep doing
展开
-
【并查集】CF722C Destroying Array
代码根据此博客https://blog.csdn.net/acerandaker/article/details/82351251 输入样例1: 4 1 3 2 5 3 4 1 2 * 分析:逆着插入+并查集 #include<iostream> #include<cmath> #include<algorithm> #include<strin...转载 2019-08-07 13:47:55 · 247 阅读 · 0 评论 -
【并查集模板题】洛谷P3367
代码参照此博客学习得:https://blog.csdn.net/zjy_code/article/details/80634149 复杂: #include<iostream> #include<cmath> #include<algorithm> #include<string> #include<string.h> using na...原创 2019-08-07 10:17:53 · 127 阅读 · 0 评论 -
【并查集】D. Arpa's weak amphitheater and Mehrdad's valuable Hoses
题目 D. Arpa’s weak amphitheater and Mehrdad’s valuable Hoses Mehrdad wants to invite some Hoses to the palace for a dancing party. Each Hos has some weight wi and some beauty bi. Also each Hos may ha...转载 2019-08-14 16:13:04 · 89 阅读 · 0 评论 -
【并查集】codeforces:New Reform
A. New Reform Berland has n cities connected by m bidirectional roads. No road connects a city to itself, and each pair of cities is connected by no more than one road. It is not guaranteed that you c...原创 2019-08-16 14:16:10 · 144 阅读 · 0 评论