摘要: 1 struct Edge{ 2 int from, to, cap, flow, cost;//出点,入点,容量,当前流量,费用(也就是权值) 3 Edge(int u, int v, int c, int f, int w) :from(u), to(v), cap(c), flow(f), c 阅读全文
posted @ 2018-08-31 18:39 romaLzhih 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Dinic 模板 Edmonds Karp模板 对于最小割来说,在算法结束后,令已经标号的结点(a[u]>0的结点)集合为S,其他集合为T=V-S,则(S,T)是图 s-t 的最小割 ISAP,附带Mincut方案 阅读全文
posted @ 2018-08-31 18:33 romaLzhih 阅读(523) 评论(0) 推荐(0) 编辑
摘要: Dijkstra 引用自:点击打开链接 SPFA,向前星储存 阅读全文
posted @ 2018-08-31 14:55 romaLzhih 阅读(248) 评论(0) 推荐(0) 编辑