![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
touso
这个作者很懒,什么都没留下…
展开
-
欧拉回路
链接 #include<stdio.h> #include<string.h> #include<algorithm> #include<iostream> using namespace std; const int maxn=1e5+10; #define inf 100000000 int t,n; int od[30],id[30];//首尾字母的出度入读 int based[30];//第i个字母在这组单词中是否作为首尾字母 int parent原创 2021-05-04 21:30:37 · 66 阅读 · 0 评论 -
loj 最小生成树(模板)
最小生成树 模板如下 kruskal算法 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; const int maxn=2e5+10; typedef long long ll; ll ans=0; int f[maxn],n,m; struct node { int x,y,z; }s[maxn*4]; bool cmp(node a,node b) { re原创 2020-10-10 11:11:32 · 101 阅读 · 0 评论