网络流
长歌丶采薇
这个作者很懒,什么都没留下…
展开
-
HDU - 5988 Coding Contest(最小费用流)
HDU - 5988 Coding Contest(最小费用流) A coding contest will be held in this university, in a huge playground. The whole playground would be divided into N blocks, and there would be M directed paths linkin...原创 2019-10-13 22:16:43 · 119 阅读 · 0 评论 -
POJ - 1459 Power Network(网络流)
POJ - 1459 Power Network(网络流) A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of ...原创 2019-08-01 22:05:48 · 112 阅读 · 0 评论 -
UVA - 10480 Sabotage (网络流之最小割 + 输出最小割的边)
UVA - 10480 Sabotage (最小割 + 输出最小割的边) The regime of a small but wealthy dictatorship has been abruptly overthrown by an unexpected rebellion. Because of the enormous disturbances this is causing in wor...原创 2019-08-01 21:32:03 · 151 阅读 · 0 评论 -
HDU-2732 Leapin' Lizards(网络流)
HDU-2732 Leapin’ Lizards(网络流) Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking around for hidden treasures, one of the rookies steps ...原创 2019-07-28 11:44:31 · 117 阅读 · 0 评论 -
POJ 2516 Minimum Cost(最小费用最大流)
POJ 2516 Minimum Cost(最小费用最大流) Dearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale area there are N shopkeepers (marked from 1 to N) which stocks goods from him...原创 2019-07-27 19:31:57 · 206 阅读 · 0 评论 -
HYSBZ - 1001 狼抓兔子 (网络流板子)
HYSBZ - 1001 狼抓兔子 (网络流板子) 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下三种类型的道路 1:(x,y)<>(x+1,y) 2:(x,y)<>(x,y...原创 2019-07-21 21:53:53 · 153 阅读 · 0 评论 -
网络流——Dinic模板
#include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algorithm> #define inf 0x3f3f3f3f using namespace std; const int maxn = 1e5+10; int n,...原创 2019-07-21 21:50:34 · 87 阅读 · 0 评论 -
HDU - 3081 Marriage Match II (网络流 +二分 )
HDU - 3081 Marriage Match II (网络流 +二分 ) Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house we used to play when...原创 2019-08-02 15:35:15 · 144 阅读 · 0 评论 -
HDU Problem- 4289 Control (网络流_最小割)
HDU Problem- 4289 Control (网络流_最小割) You, the head of Department of Security, recently received a top-secret information that a group of terrorists is planning to transport some WMD 1 from one city (th...原创 2019-07-24 21:42:19 · 105 阅读 · 0 评论 -
HDU-3605 Escape (网络流 + 状态压缩)
HDU-3605 Escape (网络流 + 状态压缩) 2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of ...原创 2019-07-24 20:03:04 · 125 阅读 · 0 评论 -
HDU - 5889 Barricade(最短路上跑网络流)
HDU - 5889 Barricade(最短路上跑网络流) The empire is under attack again. The general of empire is planning to defend his castle. The land can be seen as N towns and M roads, and each road has the same length...原创 2019-07-24 17:37:28 · 103 阅读 · 0 评论 -
POJ-1698 Alice's Chance (网络流)
POJ-1698 Alice’s Chance (网络流) Alice, a charming girl, have been dreaming of being a movie star for long. Her chances will come now, for several filmmaking companies invite her to play the chief role i...原创 2019-07-29 16:53:27 · 118 阅读 · 0 评论 -
POJ 2195 & HDU 1533 Going Home(最小费用最大流)
POJ 2195 & HDU 1533 Going Home(最小费用最大流) On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adj...原创 2019-07-24 11:49:30 · 124 阅读 · 0 评论 -
最小费用流模板
最小费用流模板 最大费用最小流只要在添加边的时候换一下位置就好了 求最大费用最大流只需要把费用换成相反数,用最小费用最大流求解即可 代码: #include <iostream> #include <queue> #include <cstdio> #include <cstring> #include <cmath> using n...原创 2019-07-24 11:26:51 · 132 阅读 · 0 评论 -
POJ - 2135 - Farm Tour(最小费用最大流)
POJ - 2135 - Farm Tour(最小费用最大流) When FJ’s friends visit him on the farm, he likes to show them around. His farm comprises N (1 <= N <= 1000) fields numbered 1…N, the first of which contains his ...原创 2018-11-28 00:26:47 · 150 阅读 · 0 评论 -
HDU -3549 (最大网络流——Edmonds_Karp算法+Dinic算法)
HDU -3549 (最大网络流) Problem Description Network flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph. Input The fir...原创 2018-11-23 00:03:27 · 306 阅读 · 0 评论