![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络流
文章平均质量分 80
Evildoer_llc
这个作者很懒,什么都没留下…
展开
-
网络流24题 洛谷 P2756 飞行员配对方案问题
题目背景第二次世界大战时期..题目描述英国皇家空军从沦陷国征募了大量外籍飞行员。由皇家空军派出的每一架飞机都需要配备在航行技能和语言上能互相配合的2 名飞行员,其中1 名是英国飞行员,另1名是外籍飞行员。在众多的飞行员中,每一名外籍飞行员都可以与其他若干名英国飞行员很好地配合。如何选择配对飞行的飞行员才能使一次派出最多的飞机。对于给定的外籍飞行员与英国飞行员的配合情况,试设计一个算法...原创 2018-10-02 21:50:50 · 161 阅读 · 0 评论 -
hdu 3157 Crazy Circuits (有源汇的有上下界的最小流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3157 You’ve just built a circuit board for your new robot, and now you need to power it. Your robot circuit consists of a number of electrical comp...原创 2018-10-21 23:11:51 · 216 阅读 · 0 评论 -
hdu 2732 Leapin' Lizards (经典网络流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2732 Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking around for hidden treasure...原创 2018-10-21 23:13:32 · 285 阅读 · 0 评论 -
hdu 2485 Destroying the bus stations (最小割=最大流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2485 Gabiluso is one of the greatest spies in his country. Now he’s trying to complete an “impossible” mission ----- to make it slow for the army o...原创 2018-10-21 23:19:25 · 200 阅读 · 0 评论 -
hdu 4289 Control(拆点+最大流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4289 You, the head of Department of Security, recently received a top-secret information that a group of terrorists is planning to transport some W...原创 2018-10-21 23:22:10 · 248 阅读 · 0 评论 -
hdu 3416 Marriage Match IV (最短路+最大流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3416 Do not sincere non-interference。 Like that show, now starvae also take part in a show, but it take place between city A and B. Starvae is i...原创 2018-10-21 23:25:10 · 168 阅读 · 0 评论 -
poj 1087 A Plug for UNIX(最大流)
题目链接:http://poj.org/problem?id=1087You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to ma...原创 2018-10-21 23:35:03 · 182 阅读 · 0 评论 -
hdu 4067 Random Maze(最小费用流)
In the game “A Chinese Ghost Story”, there are many random mazes which have some characteristic: 1.There is only one entrance and one exit. 2.All the road in the maze are unidirectional. ...原创 2018-10-22 00:51:23 · 284 阅读 · 0 评论 -
hdu 3917 Road constructions (最大权闭合子路)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3917 N cities are required to connect with each other by a new transportation system. After several rounds of bidding, we have selected M construct...原创 2018-10-22 00:53:45 · 177 阅读 · 0 评论 -
hdu 3879 Base Station (最大权闭合子路)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3879 A famous mobile communication company is planning to build a new set of base stations. According to the previous investigation, n places are c...原创 2018-10-22 00:55:30 · 349 阅读 · 0 评论 -
hdu 4280 Island Transport
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4280 In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the islands relies on ...原创 2018-10-22 00:57:27 · 129 阅读 · 0 评论 -
hdu 5988 Coding Contest(最小费用最大流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5988 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 b...原创 2018-10-22 01:01:07 · 263 阅读 · 0 评论 -
hdu 3081 Marriage Match II (二分+网络流做法)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3081 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 ...原创 2018-10-21 23:06:13 · 219 阅读 · 0 评论 -
网络流24题 负载平衡问题 (最小费用流)
题目链接:https://www.luogu.org/problemnew/show/P4016G 公司有 nn 个沿铁路运输线环形排列的仓库,每个仓库存储的货物数量不等。如何用最少搬运量可以使 nn 个仓库的库存数量相同。搬运货物时,只能在相邻的仓库之间搬运。输入输出格式输入格式:文件的第 11 行中有 11 个正整数 nn,表示有 nn 个仓库。第 22 行中有 nn 个正...原创 2018-10-17 01:24:18 · 310 阅读 · 0 评论 -
网络流24题 P2764 最小路径覆盖问题
«问题描述:给定有向图G=(V,E)。设P 是G 的一个简单路(顶点不相交)的集合。如果V 中每个顶点恰好在P 的一条路上,则称P是G 的一个路径覆盖。P 中路径可以从V 的任何一个顶点开始,长度也是任意的,特别地,可以为0。G 的最小路径覆盖是G 的所含路径条数最少的路径覆盖。设计一个有效算法求一个有向无环图G 的最小路径覆盖。提示:设V={1,2,.... ,n},构造网络G1=(V1,...原创 2018-10-02 21:53:37 · 121 阅读 · 0 评论 -
网络流24题 P3254 圆桌问题 (二分图多重匹配转最大流)
假设有来自m 个不同单位的代表参加一次国际会议。每个单位的代表数分别为ri (i =1,2,……,m)。会议餐厅共有n 张餐桌,每张餐桌可容纳ci (i =1,2,……,n)个代表就餐。为了使代表们充分交流,希望从同一个单位来的代表不在同一个餐桌就餐。试设计一个算法,给出满足要求的代表就餐方案。对于给定的代表数和餐桌数以及餐桌容量,编程计算满足要求的代表就餐方案。输入输出格式...原创 2018-10-02 21:55:52 · 178 阅读 · 0 评论 -
网络流24题 P4015 运输问题 (最大和最小费用流)
题目描述WW 公司有 mm 个仓库和 nn 个零售商店。第 ii 个仓库有 a_iai 个单位的货物;第 jj 个零售商店需要 b_jbj 个单位的货物。货物供需平衡,即\sum\limits_{i=1}^{m}a_i=\sum\limits_{j=1}^{n}b_ji=1∑mai=j=1∑nbj。从第 ii 个仓库运送每单位货物到第 jj 个零售商店的费用为 c_{ij...原创 2018-10-02 21:57:41 · 349 阅读 · 0 评论 -
网络流24题 最小路径覆盖问题(最小割模型)
题目链接:https://www.luogu.org/problemnew/show/P2764«问题描述:给定有向图G=(V,E)。设P 是G 的一个简单路(顶点不相交)的集合。如果V 中每个顶点恰好在P 的一条路上,则称P是G 的一个路径覆盖。P 中路径可以从V 的任何一个顶点开始,长度也是任意的,特别地,可以为0。G 的最小路径覆盖是G 的所含路径条数最少的路径覆盖。设计一个有效算...原创 2018-09-19 23:45:36 · 220 阅读 · 0 评论 -
网络流24题 圆桌问题(二分图多重匹配转最大流)
题目链接:https://www.luogu.org/problemnew/show/P3254假设有来自m 个不同单位的代表参加一次国际会议。每个单位的代表数分别为ri (i =1,2,……,m)。会议餐厅共有n 张餐桌,每张餐桌可容纳ci (i =1,2,……,n)个代表就餐。为了使代表们充分交流,希望从同一个单位来的代表不在同一个餐桌就餐。试设计一个算法,给出满足要求的代表就餐方...原创 2018-09-19 23:48:51 · 183 阅读 · 0 评论 -
2018 icpc焦作网络赛 F题 Modular Production Line (覆盖K区间的最小费用最大流)
题目链接:https://nanti.jisuanke.com/t/31715An automobile factory has a car production line. Now the market is oversupply and the production line is often shut down. To make full use of resources, the m...原创 2018-09-16 00:43:48 · 524 阅读 · 0 评论 -
2018 icpc区域赛沈阳赛区网络赛F题 (一道不需要网络流的网络流题)
"Oh, There is a bipartite graph.""Make it Fantastic."X wants to check whether a bipartite graph is a fantastic graph. He has two fantastic numbers, and he wants to let all the degrees to between th...原创 2018-09-10 22:34:24 · 342 阅读 · 0 评论 -
网络流24题 P2774 方格取数问题 (最小割)
题目链接:https://www.luogu.org/problemnew/show/P2774题目描述在一个有 m*n 个方格的棋盘中,每个方格中有一个正整数。现要从方格中取数,使任意 2 个数所在方格没有公共边,且取出的数的总和最大。试设计一个满足要求的取数算法。对于给定的方格棋盘,按照取数要求编程找出总和最大的数。输入输出格式输入格式: 第 1 行有 2 个正整数 ...原创 2018-10-06 14:03:07 · 459 阅读 · 0 评论 -
牛客国庆集训派对Day6 A Birthday (拆点费用流)
链接:https://www.nowcoder.com/acm/contest/206/A来源:牛客网 恬恬的生日临近了。宇扬给她准备了一个蛋糕。正如往常一样,宇扬在蛋糕上插了n支蜡烛,并把蛋糕分为m个区域。因为某种原因,他必须把第i根蜡烛插在第ai个区域或第bi个区域。区域之间是不相交的。宇扬在一个区域内同时摆放x支蜡烛就要花费x2的时间。宇扬布置蛋糕所用的总时间是他在每个区域花的时...原创 2018-10-07 15:38:21 · 176 阅读 · 0 评论 -
hdu 3472 HS BDC (混合欧拉回路+最大流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3472 IELTS is around the corner! love8909 has registered for the exam, but he still hasn’t got prepared. Now he decides to take actions. But when h...原创 2018-10-18 23:31:08 · 559 阅读 · 0 评论 -
牛客国庆集训派对Day6 A Birthday(拆点网络流)
链接:https://www.nowcoder.com/acm/contest/206/A来源:牛客网 恬恬的生日临近了。宇扬给她准备了一个蛋糕。正如往常一样,宇扬在蛋糕上插了n支蜡烛,并把蛋糕分为m个区域。因为某种原因,他必须把第i根蜡烛插在第ai个区域或第bi个区域。区域之间是不相交的。宇扬在一个区域内同时摆放x支蜡烛就要花费x2的时间。宇扬布置蛋糕所用的总时间是他在每个区域花的时...原创 2018-10-17 01:19:33 · 251 阅读 · 0 评论 -
网络流24题 P4014 分配问题 (最小费用流)
题目链接:https://www.luogu.org/problemnew/show/P4014有 nn 件工作要分配给 nn 个人做。第 ii 个人做第 jj 件工作产生的效益为 c_{ij}c ij 。试设计一个将 nn 件工作分配给 nn 个人做的分配方案,使产生的总效益最大。输入输出格式输入格式:文件的第 11 行有 11 个正整数 nn,表示有 nn 件工...原创 2018-10-17 01:23:03 · 269 阅读 · 0 评论 -
网络流建图模板及基本理论
sgu194 zoj3229 sgu176 zoj1994 zoj3496主要是针对有上下界的网络流建图。有上下界的网络流建图模板:{流量上下限的无源汇的可行流建图方法:对于有流量上下限的无源的网络流的可行流转化为一般的有源汇点的最大流来做(1)添加超级源点S和超级汇点T(2)对于原有的边(u,v,l(u,v),c(u,v))(l为流量下限,c为流量上限),添加边(u,v,0,...原创 2018-10-22 01:07:55 · 465 阅读 · 0 评论