
最小生成树
Zookkk
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Day4 Codeforces Round #562 (Div. 2 A,B,C,D)&&POJ1489(最小生成树)
这些题是昨天就写了的,事情太多,博客拖到现在才写 Codeforces Round #562 (Div. 2) A: 思路:按题意模拟一下坐车过程,可以先预处理一下a,x,b,y,将其值全部减一,然后模拟的时候在加一减一的基础上每次加一个mod,再模mod就行了,也可以不预处理a,x,b,y,这样的话就得特判处理一下到圆环边界的情况。 不预处理代码: #include<bits/...原创 2019-05-28 02:08:04 · 204 阅读 · 0 评论 -
prim模板
#include<iostream> #include<cstring> #include<algorithm> #include<queue> using namespace std; #define inf 0x3f3f3f3f const int maxn=1e2+9; int mp[maxn][maxn],n,vis[maxn]; stru...原创 2019-06-09 16:49:53 · 404 阅读 · 0 评论