图论
YancyKahn
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
CCF-20160904-交通规划
特殊Dijkstra求源最短路径.#include <iostream>#include <cstdio>#include <queue>#include <vector>#include <cstring>using namespace std;const int MAXN = 10005;const int INF = 0x3fffff;struct qnode{ int原创 2017-11-13 11:13:15 · 393 阅读 · 0 评论 -
HDU-2389(Rain on your Parade )HK算法 + 邻接表优化
词题对时间要求比较高,一共有客人数原创 2018-06-06 21:37:54 · 410 阅读 · 0 评论 -
ISAP模板
网络流问题 ISAP邻接表形式const int MAXN = 100010; //点数的最大值const int MAXM = 400010; //边数的最大值const int INF = 0x3f3f3f3f;struct Edge { int to, next, cap, flow;} edge[MAXM]; //注意是MAXMint tol;int head[MAXN...转载 2018-05-17 11:42:49 · 415 阅读 · 0 评论 -
POJ-1251(Jungle Roads) Kruskal
POJ-1251 MST原创 2018-03-11 20:15:15 · 310 阅读 · 0 评论 -
POJ-1751(Hightways) Kruskal
POJ-1751 MST Kruskal原创 2018-03-11 20:25:00 · 420 阅读 · 0 评论 -
HDU-1875(通畅工程再续) Kruskal
HDU-1875#include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <algorithm>using namespace std;const int MAXN = 105;const int MAXM = 10...原创 2018-03-12 13:22:08 · 329 阅读 · 0 评论 -
HDU-1233(还是通畅工程) Kruskal
HDU-1233 MST Kruskal原创 2018-03-11 20:31:47 · 442 阅读 · 0 评论 -
POJ-1679(The Unique MST) 次小生成树
POJ-1679 MST原创 2018-03-11 20:29:45 · 305 阅读 · 0 评论 -
POJ-1258(Agri-Net) Prim
POJ-1258 MST Prim原创 2018-03-11 20:26:31 · 340 阅读 · 0 评论 -
ZOJ-1586(QS Network) Kruskal
ZOJ-1586 MST Kruskal原创 2018-03-11 20:23:29 · 298 阅读 · 0 评论 -
POJ-2421(Constructing Road) Prim
POJ-2421 MST Prim原创 2018-03-11 20:21:41 · 315 阅读 · 0 评论 -
POJ-2031(Building a Space Station) Kruskal
POJ-2031 MST Kruskal原创 2018-03-11 20:19:27 · 437 阅读 · 1 评论 -
POJ-1287(Networking) Prim
POJ-1287 MST Prim原创 2018-03-11 20:17:17 · 378 阅读 · 0 评论 -
POJ-3026(Borg Maze) BFS + MST
POJ-3026题解 MST + BFS原创 2018-03-11 18:59:36 · 315 阅读 · 0 评论 -
HDU-6187(Destory Wall)
国王要到达每一个点要求图不能有环, 所以按照要求, 去掉墙的数量少, 去掉墙的花费小, 可转化为最大生成树求解#include <algorithm>#include <cstdio>#include <cstring>#include <iostream>using namespace std;const int MAXN = ...原创 2018-07-15 18:28:13 · 360 阅读 · 0 评论
分享