![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络流
文章平均质量分 86
阿阿阿阿_欢
勿忘初心
展开
-
Ligthoj 1154--Penguins【最大流 && 拆点】
1154 - PenguinsPDF (English)StatisticsForumTime Limit: 4 second(s)Memory Limit: 32 MBSomewhere near the South Pole, a number of penguins are standing on原创 2015-10-30 14:14:32 · 588 阅读 · 0 评论 -
POJ 2391--Ombrophobic Bovines【拆点 && 二分 && 最大流dinic && 经典】
Ombrophobic BovinesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16460 Accepted: 3593DescriptionFJ's cows really hate getting wet so much that the m原创 2015-08-06 17:29:41 · 520 阅读 · 0 评论 -
POJ 2516--Minimum Cost【最小费用最大流 && 经典】
Minimum CostTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 15041 Accepted: 5169DescriptionDearboy, a goods victualer, now comes to a big problem, and原创 2015-09-08 00:55:12 · 592 阅读 · 0 评论 -
POJ 1459 && ZOJ 1734--Power Network【最大流dinic】
Power NetworkTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 25108 Accepted: 13077DescriptionA power network consists of nodes (power stations, consum原创 2015-08-06 11:04:11 · 587 阅读 · 0 评论 -
POJ 2135--Farm Tour【最小费用最大流 && 常规题】
Farm TourTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13514 Accepted: 5128DescriptionWhen FJ's friends visit him on the farm, he likes to show them原创 2015-09-07 17:27:03 · 474 阅读 · 0 评论 -
POJ 1149--PIGS 【最大流 && 处理重边 && 经典建模】
PIGSTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18123 Accepted: 8246DescriptionMirko works on a pig farm that consists of M locked pig-houses and原创 2015-08-05 15:27:22 · 1165 阅读 · 0 评论 -
POJ 1087--A Plug for UNIX【最大流dinic】
A Plug for UNIXTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14711 Accepted: 4959DescriptionYou are in charge of setting up the press room for the i原创 2015-08-06 13:25:33 · 984 阅读 · 0 评论 -
POJ 2112--Optimal Milking【二分找最大距离的最小值 && 最大流dinic】
Optimal MilkingTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 13897 Accepted: 5018Case Time Limit: 1000MSDescriptionFJ has moved his K (1 <= K原创 2015-08-05 17:54:53 · 588 阅读 · 0 评论 -
POJ 3281【拆点 && 最大流经典建图】
DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11097 Accepted: 5096DescriptionCows are such finicky eaters. Each cow has a preference for certa原创 2015-08-04 12:04:39 · 671 阅读 · 0 评论 -
HDU 3572 【最大流 && 时间区间建图】
Task ScheduleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5398 Accepted Submission(s): 1742Problem DescriptionOur geometry pri原创 2015-08-03 22:48:32 · 588 阅读 · 0 评论 -
ZOJ 3640--Missile【二分查找 && 最大流dinic && 经典建图】
MissileTime Limit: 2 Seconds Memory Limit: 65536 KB You control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the s原创 2015-08-07 10:11:11 · 715 阅读 · 1 评论 -
POJ 3469 --Dual Core CPU【最小割】
Dual Core CPUTime Limit: 15000MS Memory Limit: 131072KTotal Submissions: 20852 Accepted: 9010Case Time Limit: 5000MSDescriptionAs more and more computers原创 2015-08-07 14:07:10 · 772 阅读 · 0 评论 -
Ligthoj 1155--Power Transmission【最大流 && 拆点】
1155 - Power TransmissionPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBDESA is taking a new project to transfer power. Power is原创 2015-10-30 18:03:07 · 566 阅读 · 0 评论 -
Lightoj 1153--Internet Bandwidth【最大流 && 无向图】
1153 - Internet BandwidthPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBOn the Internet, machines (nodes) are richly interconnect原创 2015-10-31 16:31:25 · 634 阅读 · 0 评论 -
POJ 1966--Cable TV Network【最小割 && 枚举终点起点】
Cable TV NetworkTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 4276 Accepted: 2008DescriptionThe interconnection of the relays in a cable TV network is原创 2015-10-15 13:28:41 · 736 阅读 · 0 评论 -
HDU 4292--Food【最大流 && 拆点】
题意:有N个人、F种食物和D种饮料,已经给出每种食物、饮料的数目。输入下面有N*F和N*D两个矩阵,N*F矩阵的第i行第j列表示第i个人是否喜欢第j种食物,若该位置的元素为Y表示喜欢否则不喜欢。N*D矩阵的第i行第j列表示第i个人是否喜欢第j种饮料,若该位置的元素为Y表示喜欢否则不喜欢。每个人的需求是——选择一份食物和一份饮料(必须是他们喜欢的),问最多可以满足几个人的需求。解析:比较常规的最大流问题,见图比较好想,要注意的是要拆点见图,对人拆点,把每个人拆成两个点,为左点和右点,两点之间容原创 2015-09-23 17:52:09 · 405 阅读 · 0 评论 -
HDU 4289--Control【最小割 && 拆点】
题意:给出一个又n个点,m条边组成的无向图。给出两个点s,t。对于图中的每个点,去掉这个点都需要一定的花费。求至少多少花费才能使得s和t之间不连通。见图思路:1,把每个点i拆成左点i ->右点i+N的一条边,边权为去掉i点的费用;2,源点向s左点建边,边权为无穷大,表示不能去掉该边;3,d右点向汇点建边,边权为无穷大;4,对于无向边<u, v>,建双边<u右,v左>和<v右,u左>,边权为无穷大,表示不能去掉该边。最后源点到汇点跑一次最大流即求出最小割。原创 2015-09-22 22:47:26 · 391 阅读 · 0 评论 -
ZOJ 2587--Unique Attack【判断最小割是否唯一】
题意:给你N个点、M条无向边以及边的权值,又给你源点A和汇点B。问你A到B的最小割是否唯一解析:1、我们先对原图求一次最大流2、对残留网络,我们从S开始,找到所有所有S能到达的点;再从T开始,找出所有能到达T的点。3、判断原网络中是否还有没有访问到的点,如果没有,则唯一,否者,不唯一!原创 2015-09-22 22:08:09 · 549 阅读 · 0 评论 -
ZOJ 3362--Beer Problem【最大费用最大流 && 有值得注意的地方】
题意:有N个城市以及连接这些城市的M条无向边,其中城市1是啤酒产地。给出N-1个数字,分别表示每个城市里啤酒每桶的价格(城市1不算),我们可以认为这N-1个城市对啤酒的需求是没有限制的即 无限大。已知每条无向边最多可以运送啤酒的桶数 和运送每桶的花销,问你从城市1出发卖啤酒可以得到的最大收益。解析:算是比较好像的费用流了,但要注意。每次SPFA找到可以从源点到汇点的最长路后,我原创 2015-09-17 21:27:24 · 472 阅读 · 0 评论 -
HDU 2426 Interesting Housing Problem【最大费用最大流 && 常规题】
题意:有N个学生(编号0到N-1)和M个房间(编号0到M-1)。给你E条如(a, b, c)的关系表示学生a对房间b评价为c,当c现在问你存不存在一种方案 保证任意一个学生都不能选上他不喜欢的房间,若存在则输出满足条件的最大评价值之和,若不存在输出-1。解析:费用法流的常规题,思路很好想,1A么么哒。简单说一下见图步骤:(1)超级源点到每个学生建边, 容量为1, 费用为原创 2015-09-17 20:33:49 · 414 阅读 · 0 评论 -
HDU 5294--Tricks Device【最小割 && 最短路处理,新建图】
Tricks DeviceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2208 Accepted Submission(s): 584Problem DescriptionInnocent Wu follo原创 2015-08-07 21:38:11 · 735 阅读 · 0 评论 -
HDU 4183--Pahom on Water【最大流dinic】
Pahom on WaterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 658 Accepted Submission(s): 302Problem DescriptionPahom on Water is原创 2015-08-06 20:17:29 · 499 阅读 · 0 评论 -
HDU 3549--Flow Problem 【最大流 && dinic】
Flow ProblemTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 10338 Accepted Submission(s): 4871Problem DescriptionNetwork flow is原创 2015-08-03 10:24:27 · 696 阅读 · 0 评论 -
HDU 1853--Cyclic Tour【最小费用最大流 && 有向环最小权值覆盖 】
Cyclic TourTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/65535 K (Java/Others)Total Submission(s): 1950 Accepted Submission(s): 984Problem DescriptionThere are N cities原创 2015-08-28 00:26:34 · 1302 阅读 · 0 评论 -
POJ 2289--Jamie's Contact Groups【二分图多重匹配问题 &&二分查找最大值的最小化 && 最大流求解】
Jamie's Contact GroupsTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 6902 Accepted: 2261DescriptionJamie is a very popular girl and has quite a lot o原创 2015-08-27 10:20:03 · 1633 阅读 · 0 评论 -
POJ 3228 -- Gold Transportation【二分 && 最大流】
Gold TransportationTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3079 Accepted: 1101DescriptionRecently, a number of gold mines have been discovered原创 2015-08-27 18:08:59 · 913 阅读 · 0 评论 -
POJ 2455--Secret Milking Machine【二分枚举 && 最大流 && 经典】
Secret Milking MachineTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10625 Accepted: 3111DescriptionFarmer John is constructing a new milking machine原创 2015-08-27 16:42:43 · 955 阅读 · 0 评论 -
ZOJ 2760--How Many Shortest Path【dinic最大流 && 最短路构图 && 求最短路径的条数】
How Many Shortest PathTime Limit: 10 Seconds Memory Limit: 32768 KB Given a weighted directed graph, we define the shortest path as the path who has the smallest length among all the原创 2015-08-11 18:46:54 · 720 阅读 · 0 评论 -
HDU 4240 --Route Redundancy【最大流dinic && DFS】
Route RedundancyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 516 Accepted Submission(s): 294Problem DescriptionA city is made原创 2015-08-11 14:06:21 · 762 阅读 · 0 评论 -
POJ 2125 --Destroying The Graph【最小割解决 "最小点权覆盖问题" && 输出解(割边集) && 各种不懂】
Destroying The GraphTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7597 Accepted: 2434 Special JudgeDescriptionAlice and Bob play the following g原创 2015-08-07 18:56:29 · 832 阅读 · 0 评论 -
POJ 3308--Paratroopers【 最小点权覆盖 && 最小割】
ParatroopersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7847 Accepted: 2365DescriptionIt is year 2500 A.D. and there is a terrible war between the f原创 2015-08-07 16:42:30 · 732 阅读 · 0 评论 -
HDU 3549--Flow Problem【最大流】
Flow ProblemTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 9074 Accepted Submission(s): 4265Problem DescriptionNetwork flow is a原创 2015-03-12 12:50:41 · 385 阅读 · 0 评论 -
HDU 1533--Going Home【最小费用最大流 && 模板】
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3452 Accepted Submission(s): 1771Problem DescriptionOn a grid map ther原创 2015-08-28 00:06:35 · 1608 阅读 · 1 评论 -
HDU 3488--Tour【最小费用最大流 && 有向环最小权值覆盖 && 经典】
TourTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2308 Accepted Submission(s): 1156Problem DescriptionIn the kingdom of Henryy,原创 2015-08-28 00:17:26 · 2871 阅读 · 1 评论 -
POJ 1698--Alice's Chance【最大流 && 经典】
Alice's ChanceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6384 Accepted: 2607DescriptionAlice, a charming girl, have been dreaming of being a movi原创 2015-08-27 15:11:47 · 803 阅读 · 0 评论 -
HDU 3376--Matrix Again【最大费用最大流 && 经典建图】
Matrix AgainTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 3457 Accepted Submission(s): 1020Problem DescriptionStarvae very li原创 2015-08-28 11:37:07 · 2023 阅读 · 0 评论 -
HPU 2686--Matrix【最大费用最大流 && 经典建图】
MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2062 Accepted Submission(s): 1074Problem DescriptionYifenfei very like play原创 2015-08-29 00:07:12 · 1225 阅读 · 0 评论 -
POJ 1273 --Drainage Ditches【最大流模板 && dinic】
Drainage DitchesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 62111 Accepted: 23859DescriptionEvery time it rains on Farmer John's fields, a pond fo原创 2015-08-03 10:57:29 · 373 阅读 · 0 评论 -
HDU 3667-- Transportation【最小费最大流 && 拆边建图 && 经典】
TransportationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2441 Accepted Submission(s): 1041Problem DescriptionThere are N cit原创 2015-08-29 01:07:34 · 1433 阅读 · 0 评论 -
ZOJ 3885--The Exchange of Items【最小费用最大流 && 建图】
The Exchange of ItemsTime Limit: 2 Seconds Memory Limit: 65536 KB Bob lives in an ancient village, where transactions are done by one item exchange with another. Bob is very clever an原创 2015-08-29 00:23:18 · 1593 阅读 · 0 评论