Replies: 35 comments 8 replies
-
%%%感觉好简单 |
Beta Was this translation helpful? Give feedback.
-
TQLTQL |
Beta Was this translation helpful? Give feedback.
-
增广路那边流量20 30那些是不是写错了,图上并没有20 30这些值 |
Beta Was this translation helpful? Give feedback.
-
为啥用dinic的板子做HDU4280超时了…… |
Beta Was this translation helpful? Give feedback.
-
n,m是1e5的吧,你可以试着优化一下常数或改用HLPP |
Beta Was this translation helpful? Give feedback.
-
图片链接咕了,已修复 |
Beta Was this translation helpful? Give feedback.
-
HLPP的模板在洛谷上超时? |
Beta Was this translation helpful? Give feedback.
-
这最大流这一小节也太简单了吧,没有Ref, 最多只能做个回忆性的提纲啊,无法作为学习材料啊 |
Beta Was this translation helpful? Give feedback.
-
@yanjinbin hello~如果有好的想法欢迎开pr补充 |
Beta Was this translation helpful? Give feedback.
-
ISAP的模板做草地排水WA了QAQ |
Beta Was this translation helpful? Give feedback.
-
ISAP模板忽略了一种情况:如果图中存在孤立的点 我的修改如下,在 bool BFS() {
memset(vis, 0, sizeof(vis));
fill(d, d+n, n); // 此处是修改
queue<int> Q;
Q.push(t);
vis[t] = 1;
d[t] = 0;
while (!Q.empty()) {
int x = Q.front(); Q.pop();
for (int i = 0; i < G[x].size(); i++) {
Edge& e = edges[G[x][i] ^ 1];
if (!vis[e.from] && e.cap > e.flow) {
vis[e.from] = 1;
d[e.from] = d[x] + 1;
Q.push(e.from);
}
}
}
return vis[s];
}
测试通过了P3376 【模板】网络最大流 |
Beta Was this translation helpful? Give feedback.
-
txdy |
Beta Was this translation helpful? Give feedback.
-
dinic算法模板中dfs中的cur数组是什么?整个模板中除了memset赋值为0外没有任何操作 |
Beta Was this translation helpful? Give feedback.
-
这个是当前弧优化。
|
Beta Was this translation helpful? Give feedback.
-
为什么最大流集合中的每条路径不小于 |
Beta Was this translation helpful? Give feedback.
-
因为每一轮增广,增广路的长度都是严格递增的。经过 |
Beta Was this translation helpful? Give feedback.
-
HLPP 模版代码似乎会在 hack数据如下:
应该要判断一下的 |
Beta Was this translation helpful? Give feedback.
-
有一篇 paper 提供了 |
Beta Was this translation helpful? Give feedback.
-
今天(2022年06月14日),机器之心报道——最大流算法有个新突破,可以快到几乎线性的时间(图越大越接近O(M)),详见: |
Beta Was this translation helpful? Give feedback.
-
dalaodalao |
Beta Was this translation helpful? Give feedback.
-
PR4663:由于原版本错误太多,Ford-Fulkerson 增广、Edmonds-Karp 算法、Dinic 算法三节已经重写。希望对你有所帮助! |
Beta Was this translation helpful? Give feedback.
-
Dinic 的讲解中提到
然而后面的参考代码并没有写当前弧优化。 |
Beta Was this translation helpful? Give feedback.
-
void relabel(int u) {
ht[u] = INF;
for (int i = h[u]; i; i = e[i].nex)
if (e[i].v) ht[u] = min(ht[u], ht[e[i].t]);
++ht[u];
} 这里为什么不用最低的点高度+1 |
Beta Was this translation helpful? Give feedback.
-
去年的那个线性算法是tcs,先不说常数有多大,现在根本就实现不了/_ \ 12年有一个 |
Beta Was this translation helpful? Give feedback.
-
卡 Dinic / EK https://www.zhihu.com/question/266149721 |
Beta Was this translation helpful? Give feedback.
-
真有人只靠这里的文档就能看懂吗? |
Beta Was this translation helpful? Give feedback.
-
感觉可以添加一个小节,关于网络流的建模技巧和转换技巧。 |
Beta Was this translation helpful? Give feedback.
-
容量为0 减去 负的流量 == 正的剩余容量 |
Beta Was this translation helpful? Give feedback.
-
所有关于的图的示例中定义是否有问题?原示例中为 |
Beta Was this translation helpful? Give feedback.
-
https://oi-wiki.org/graph/flow/max-flow/
Beta Was this translation helpful? Give feedback.
All reactions