网络流
网络流的学习
white Era
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
最小费用最大流模板(SPFA)
题目:https://www.luogu.com.cn/problem/P3381AC代码:#include <iostream>#include <queue>#include <cstring>using namespace std;typedef long long ll;const int N = 10010,M = 500050;const ll inf = ll(1e18);struct edge{ int next,to; ll原创 2021-07-30 21:18:48 · 146 阅读 · 0 评论 -
最大流最小割模板
题目:https://vjudge.net/problem/UVA-10480The regime of a small but wealthy dictatorship has been abruptly overthrown by an unexpected rebellion. Because of the enormous disturbances this is causing in world economy, an imperialist militarysuper power has d原创 2021-07-30 09:14:13 · 109 阅读 · 0 评论 -
Smallest Minimum Cut
题目:https://acm.hdu.edu.cn/showproblem.php?pid=6214Problem DescriptionConsider a network G=(V,E) with source s and sink t. An s-t cut is a partition of nodes set V into two parts such that s and t belong to different parts. The cut set is the subset of E原创 2021-07-29 10:31:41 · 131 阅读 · 0 评论 -
最大流(dinic模板)
题目:https://www.luogu.com.cn/problem/P3376#include <iostream>#include <cstring>#include <queue>using namespace std;typedef long long ll;const int N = 10010,M = 50050;const ll inf = ll(1e18);struct edge{ ll next,to,w;}edges[M]原创 2021-07-28 16:31:30 · 113 阅读 · 0 评论 -
最大流模板(Edmond-Karp)
题目:https://www.luogu.com.cn/problem/P3376学习心得:FF算法,EK算法敲了五遍才真正理解,理解了才发现原来挺简单的。。估计刚开始被网络流这个名头吓住了,,下意识以为很难,,两个星期学完了30多个算法,有一半敲了十遍以上,另一遍估计就敲了五遍左右,,心急以为早点学完打比赛就不会慌了,,然而等到我回头用心看的时候才是真的理解了,,虽然学了好多个算法,但是都是短时间学的,不能灵活的运用,不能根据题目建模,如果用到这些模板算法的时候,建模是最难的一部分,,不会分离出模型,原创 2021-07-28 10:37:40 · 147 阅读 · 0 评论 -
最大流(Ford-Fulkerson模板)
/*题目 https://www.luogu.com.cn/record/52984766*/// 编写次数x5#include <iostream>#include <bitset>using namespace std;typedef long long ll;const ll N = 10010, E = 200010;struct node { ll next, to; ll w;}nodes[E];bitset<N> vis;原创 2021-07-27 21:40:26 · 151 阅读 · 0 评论
分享