![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并查集
文章平均质量分 72
shuaishuai-zhang
这个作者很懒,什么都没留下…
展开
-
并查集
原文链接:https://www.luogu.com.cn/problem/P1194 AC代码: #include<iostream> #include<string.h> #include<vector> #include<algorithm> using namespace std; int A,B,cost=0,num=0; int pr...原创 2020-04-01 14:32:55 · 69 阅读 · 0 评论 -
并查集
原文链接:https://www.luogu.com.cn/problem/P1396 AC代码: #include<iostream> #include<string.h> #include<vector> #include<algorithm> using namespace std; int n,m,s,t,flags=0,flagt=0; ...原创 2020-03-29 10:39:05 · 72 阅读 · 0 评论 -
并查集
建图,连接,查找相邻 原文连接 AC代码: #include<iostream> #include<string.h> #include<vector> #include<math.h> #include<algorithm> using namespace std; int n,T; int topn[1005],pre[1005...原创 2020-03-19 11:55:05 · 79 阅读 · 0 评论