网络流专题
理想主义文艺青年
理想主义源于对生活的憧憬 文艺是对生活的态度
展开
-
网络流
做比赛老是遇到原创 2014-07-25 17:46:55 · 675 阅读 · 0 评论 -
hdu 3157 poj 3801 Crazy Circuits(有源汇有上下界最下流)
Crazy CircuitsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 593 Accepted Submission(s): 300Problem DescriptionYou’ve just b原创 2015-03-08 16:28:07 · 909 阅读 · 0 评论 -
hust 1342 - Cheat Secretly(有源汇有上下界的最小流)
1342 - Cheat SecretlyTime Limit: 1s Memory Limit: 128MBSubmissions: 430 Solved: 143DESCRIPTIONHH Big Cow(HBC) has taken part in an interesting treasure finding match. In the match th原创 2015-03-08 21:59:48 · 939 阅读 · 0 评论 -
zoj 2314 Reactor Cooling(无源汇上下界的可行流)
Reactor CoolingTime Limit: 5 Seconds Memory Limit: 32768 KB Special JudgeThe terrorist group leaded by a well known international terrorist Ben Bladen is buliding a nuclear reactor原创 2015-03-04 22:24:34 · 923 阅读 · 0 评论 -
zoj 3229 Shoot the Bullet(有源汇有上下界的最大流)
Shoot the BulletTime Limit: 2 Seconds Memory Limit: 32768 KB Special JudgeGensokyo is a world which exists quietly beside ours, separated by a mystical border. It is a utopia where原创 2015-03-07 14:12:46 · 766 阅读 · 0 评论 -
poj 2396 zoj 1994 Budget(有源汇上下界的可行流)
BudgetTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 6237 Accepted: 2367 Special JudgeDescriptionWe are supposed to make a budget proposal for th原创 2015-03-06 14:52:12 · 714 阅读 · 0 评论 -
poj 2175 Evacuation Plan(最小费用流 (消圈算法))
Evacuation PlanTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3689 Accepted: 980 Special JudgeDescriptionThe City has a number of municipal buildin原创 2015-03-17 22:37:25 · 1983 阅读 · 0 评论 -
poj 3422 Kaka's Matrix Travels(最小费用最大流)
Language:DefaultKaka's Matrix TravelsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8314 Accepted: 3326DescriptionOn an N × N chessboard with a n原创 2015-03-12 17:09:32 · 812 阅读 · 0 评论 -
poj 2195 zoj 2404 hdu 1533 Going Home(最小费用流)
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3119 Accepted Submission(s): 1584Problem DescriptionOn a grid map原创 2015-03-13 16:46:40 · 931 阅读 · 0 评论 -
UVA 11248 网络扩容 最小割
割:原创 2014-10-25 10:53:56 · 956 阅读 · 0 评论 -
hdu 4862 Jump(最小费用流)
JumpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1040 Accepted Submission(s): 432Problem DescriptionThere are n*m grids, e原创 2015-04-05 01:15:05 · 601 阅读 · 0 评论 -
hdu 4888 Redraw Beautiful Drawings(Dinic最大流+判断有没有环)
Redraw Beautiful DrawingsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3802 Accepted Submission(s): 1133Problem Description原创 2015-04-12 01:50:39 · 702 阅读 · 0 评论 -
zoj 2676 Network Wars(01分数规划+网络流)
题目链接求一个割集 使得割集的平均边权最小具体的解答 请看Amber论文《最小割模型在信息学竞赛中的应用》#include #include #include #include #include #include #include #include #include #define MEM(a,x) memset(a,x,sizeof a)#define ep原创 2015-04-22 22:35:03 · 741 阅读 · 0 评论 -
spoj 839 OPTM - Optimal Marks(最小割应用)
spoj 839 异或操作是不好处理的,于是不妨将mark拆成31位来看待,对每一位都进行一次求解。 于是问题就变成了顶点的标号可以为1也可以为0,边权和最小的问题,于是按标号为1或者为0就可以把顶点划分成两个集合,而连通这两个集合的边的数量就是我们需要累加的边权,为了让数量最少,于是就变成了最小割问题。 这样我们将S和所有mark为1的点连起来,原创 2015-05-23 00:27:10 · 865 阅读 · 0 评论 -
[NOI2006]最大获利(最大权闭合图 最小割应用)
[NOI2006]最大获利题意不再赘述虚拟源点s与每个中转站建边 权值为成本p 每个用户群与虚拟汇点t之间建边 权值为收益c 同时记录总的收益每个用户群所用到的中转站a b与相应的用户群i+n之间建边 权值为INF#include #include #include #include #include #include #include #include #in原创 2015-05-23 21:09:57 · 789 阅读 · 0 评论 -
CF 510E Fox And Dinner(最大流)
CF 510E Fox And Dinnern个狐狸围桌吃饭 每个狐狸身上自带一个值fi 现在要使得相邻的两个狐狸Fi Fi+1的和为质数(F1与Fn相邻)问可以把这些狐狸安排到几个桌子 如果可以给出每个桌子上狐狸安排的顺序因为每个每个Fi的值都是大于2的 所以两个值相加要为质数 这个质数肯定是个奇数 所以要满足奇数+偶数所以把初始的n个值分为两部分 一个部分为奇数原创 2015-05-23 09:37:14 · 1255 阅读 · 0 评论 -
CSU 1506: Double Shortest Paths(最小费用流)(湖南省第十届省赛)
1506: Double Shortest PathsTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 84 Solved: 22[Submit][Status][Web Board]DescriptionInputThere will be at most 200 test case原创 2015-03-14 18:58:45 · 831 阅读 · 0 评论 -
sgu 176 Flow construction(有源汇有上下界最小流)
176. Flow constructiontime limit per test: 0.5 sec.memory limit per test: 4096 KBinput: standardoutput: standardYou have given the net consisting of nodes and pipes; pipes conn原创 2015-03-08 18:14:15 · 899 阅读 · 0 评论 -
zoj 2532 Internship(最大流求割边)
InternshipTime Limit: 5 Seconds Memory Limit: 32768 KBCIA headquarter collects data from across the country through its classified network. They have been using optical fibres long befo原创 2015-03-26 00:33:57 · 775 阅读 · 1 评论 -
hdu 4289 Control (拆点网络流)
hdu 4289 Controlt原创 2014-10-24 22:18:35 · 746 阅读 · 0 评论 -
poj 1459 zoj 1734 Power Network(最大流)
电网 中一些节点 可能会消耗电能 提供电能 节点之间有电线传输电能 传输的电能有上限值节点中没有 源点和汇点 类型的节点 所以需要我们添加源点汇点 n个节点 从0开始 设源点为n+1 汇点为n+2源点到每个电站之间添加一条边 权值为该电站能够提供的电能每个消费者与汇点之间添加一条边 权值为该消费者消费的电能根据所给的 电线中的起点和重点 添加边 权值为该电线能够原创 2014-12-16 18:23:13 · 1176 阅读 · 0 评论 -
poj 2112 Optimal Milking(floyd+二分+最大流)
Language:DefaultOptimal MilkingTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 12782 Accepted: 4612Case Time Limit: 1000MSDescriptionFJ has原创 2014-12-24 00:32:02 · 1775 阅读 · 0 评论 -
poj 1149 PIGS(最大流)
Language:DefaultPIGSTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16815 Accepted: 7551DescriptionMirko works on a pig farm that consists of M lo原创 2014-12-13 02:14:44 · 997 阅读 · 0 评论 -
poj 2391 Ombrophobic Bovines(最大流(拆点)+floyd+二分)
Ombrophobic BovinesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15705 Accepted: 3425DescriptionFJ's cows really hate getting wet so much that the m原创 2015-02-21 23:52:31 · 1223 阅读 · 0 评论 -
poj 1637 Sightseeing tour(混合图欧拉路径判定 最大流)
【混合图】混合图(既有有向边又有无向边的图)中欧拉环、欧拉路径的判定需要借助网络流!(1)欧拉环的判定:一开始当然是判断原图的基图是否连通,若不连通则一定不存在欧拉环或欧拉路径(不考虑度数为0的点)。其实,难点在于图中的无向边,需要对所有的无向边定向(指定一个方向,使之变为有向边),使整个图变成一个有向欧拉图(或有向半欧拉图)。若存在一个定向满足此条件,则原图是欧拉图(或半原创 2015-02-25 21:31:45 · 1150 阅读 · 0 评论 -
hnu 13182 Drop Zone(网络流 最小割)
Drop ZoneTime Limit: 3000ms, Special Time Limit:7500ms, Memory Limit:65536KBTotal submit users: 4, Accepted users: 2Problem 13182 : No special judgementProblem description原创 2015-02-10 19:20:58 · 962 阅读 · 0 评论 -
poj 3436 ACM Computer Factory(最大流Dinic拆点)
ACM Computer FactoryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5572 Accepted: 1912 Special JudgeDescriptionAs you know, all the computers use原创 2015-02-24 22:48:18 · 731 阅读 · 0 评论 -
poj 3469 Dual Core CPU(最小割)
Dual Core CPUTime Limit: 15000MS Memory Limit: 131072KTotal Submissions: 19827 Accepted: 8606Case Time Limit: 5000MSDescriptionAs more and more computers ar原创 2015-02-27 01:55:00 · 781 阅读 · 0 评论 -
poj 3308 zoj 2874 Paratroopers(最小割)
Language:DefaultParatroopersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7583 Accepted: 2282DescriptionIt is year 2500 A.D. and there is a terr原创 2015-02-27 19:46:08 · 811 阅读 · 0 评论 -
poj 1815 Friendship (最小割 (贪心 最小割点集))
FriendshipTime Limit: 2000MS Memory Limit: 20000KTotal Submissions: 9513 Accepted: 2647DescriptionIn modern society, each person has his own friends. Since all原创 2015-03-03 00:02:55 · 1165 阅读 · 0 评论 -
poj 2516 Minimum Cost(最小费用流)
Language:DefaultMinimum CostTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 14165 Accepted: 4864DescriptionDearboy, a goods victualer, now comes t原创 2015-03-15 23:15:11 · 1034 阅读 · 0 评论 -
zoj 2587 Unique Attack(判断最小割的唯一性)
Unique AttackTime Limit: 5 Seconds Memory Limit: 32768 KBN supercomputers in the United States of Antarctica are connected into a network. A network has a simple topology: M different p原创 2015-03-03 15:28:31 · 777 阅读 · 0 评论 -
zoj 2788 Panic Room(最小割)
Panic RoomTime Limit: 2 Seconds Memory Limit: 65536 KBIntroductionYou are the lead programmer for the Securitron 9042, the latest and greatest in home security software from Jellern I原创 2015-03-03 16:49:51 · 724 阅读 · 0 评论 -
poj 3204 Ikki's Story I - Road Reconstruction(最大流求割边)
Language:DefaultIkki's Story I - Road ReconstructionTime Limit: 2000MS Memory Limit: 131072KTotal Submissions: 7093 Accepted: 2042DescriptionIkki is the k原创 2015-03-26 00:42:12 · 659 阅读 · 0 评论 -
hdu 5294 Tricks Device(最短路+最大流)
Tricks DeviceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 265 Accepted Submission(s): 71Problem DescriptionInnocent Wu fol原创 2015-07-21 21:02:11 · 451 阅读 · 0 评论