
网络流
文章平均质量分 84
J_Sure
唯苦修深思方能顿悟
展开
-
【最大流】POJ-1273 Drainage Ditches
Drainage DitchesTime Limit: 1000MS Memory Limit: 10000K DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch原创 2014-09-15 17:16:28 · 687 阅读 · 0 评论 -
【费用流消圈】POJ-2175 Evacuation Plan
Evacuation PlanTime Limit: 1000MS Memory Limit: 65536K Special JudgeDescriptionThe City has a number of municipal buildings and a number of fallout shelter原创 2014-10-27 19:59:30 · 949 阅读 · 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 t原创 2014-10-11 23:33:44 · 842 阅读 · 0 评论 -
【有源汇有上下界可行流】POJ-2396(ZOJ-1994) Budget
BudgetTime Limit: 3000MS Memory Limit: 62M Special JudgeDescriptionWe are supposed to make a budget proposal for this multi-site competition. The budget pr原创 2014-10-12 16:22:25 · 822 阅读 · 0 评论 -
【有源汇有上下界最小流】SGU-176 Flow constructions
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原创 2014-10-14 17:12:30 · 838 阅读 · 0 评论 -
【最小割+枚举】POJ-1815 Friendship
FriendshipTime Limit: 2000MS Memory Limit: 20000K DescriptionIn modern society, each person has his own friends. Since all the people are very busy, they commun原创 2014-09-27 21:00:38 · 678 阅读 · 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 h原创 2014-10-16 22:34:05 · 924 阅读 · 0 评论 -
【有上下界的网络流】
转自相对于一般的网络流,有上下界的网络流的某些边多出了流量下界的限制,如边u->v,上下界为high、low,如果有流经过这条边,这个流必须在[low,high]这个区间内。这类题目主要要求解决下面三个问题,“有源汇、无源汇的可行流”、“有源汇的最大流”、“有源汇的最小流”,注意这里所说的源汇是原网络中的源汇,分别记为s、t。 这类题目的难点在于下界的限制很难处理,我们将所有有下转载 2014-10-17 15:11:07 · 647 阅读 · 0 评论 -
【二分图|最小点权覆盖】POJ-2125 Destroying The Graph
Destroying The GraphTime Limit: 2000MS Memory Limit: 65536K Special JudgeDescriptionAlice and Bob play the following game. First, Alice draws some directed原创 2014-11-03 22:08:55 · 889 阅读 · 0 评论 -
【最大费用最大流】POJ-3422 Kaka's Matrix Travels
Kaka's Matrix TravelsTime Limit: 1000MS Memory Limit: 65536K DescriptionOn an N × N chessboard with a non-negative number in each grid, Kaka starts his matrix t原创 2014-10-18 20:31:01 · 1127 阅读 · 0 评论 -
【有上下界最大费用可行流】HDU-4862 Jump
JumpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 930 Accepted Submission(s): 377Problem DescriptionThere are n*m grids,原创 2014-10-20 16:17:45 · 1224 阅读 · 0 评论 -
网络流题集
转自:夏天的风【HDU】1532Drainage Ditches(入门) [最大流]3549 Flow Problem(入门) [最大流]3572 Task Schedule(基础) [最大流]任务分配,判断满流2732 Leapin' Lizards(较难) [最大流]3338 Kakuro Extension(较难,好题) [最大流][转载 2014-09-20 21:06:31 · 808 阅读 · 0 评论 -
Dinic非递归版(优化)
void init() { memset(head, -1, sizeof(head)); tot = 0;}void add(int u, int v, int w){ edge[tot].v = v; edge[tot].w = w; edge[tot].next = head[u]; head[u] = tot++;}bool bfs() {原创 2014-09-14 22:29:03 · 1153 阅读 · 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 pai原创 2014-10-09 21:42:14 · 1451 阅读 · 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 Inc原创 2014-10-10 16:14:52 · 821 阅读 · 0 评论 -
【最小费用最大流】POJ-2195 Going Home
Going HomeTime Limit: 1000MS Memory Limit: 65536K DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one原创 2014-10-24 16:14:05 · 734 阅读 · 0 评论 -
【最大流+最短路+二分】POJ-2112 Optimal Milking
Optimal MilkingTime Limit: 2000MS Memory Limit: 30000K Case Time Limit: 1000MSDescriptionFJ has moved his K (1 <= K <= 30) milking machines out into the c原创 2014-09-19 13:05:26 · 830 阅读 · 0 评论 -
【最大流】POJ-1459 Power Network
Power NetworkTime Limit: 2000MS Memory Limit: 32768K DescriptionA power network consists of nodes (power stations, consumers and dispatchers) connected by power原创 2014-09-19 14:54:08 · 819 阅读 · 0 评论 -
【最大流】POJ-1149 PIGS
PIGSTime Limit: 1000MS Memory Limit: 10000K DescriptionMirko works on a pig farm that consists of M locked pig-houses and Mirko can't unlock any pighouse becaus原创 2014-09-17 18:20:54 · 639 阅读 · 0 评论 -
【最大流】POJ-1087 A Plug for UNIX
A Plug for UNIXTime Limit: 1000MS Memory Limit: 65536K DescriptionYou are in charge of setting up the press room for the inaugural meeting of the United Nations原创 2014-09-19 16:37:34 · 751 阅读 · 0 评论 -
【最大流+最短路+二分】POJ-2391 Ombrophobic Bovines
Ombrophobic BovinesTime Limit: 1000MS Memory Limit: 65536K DescriptionFJ's cows really hate getting wet so much that the mere thought of getting caught in the r原创 2014-09-20 20:14:08 · 785 阅读 · 0 评论 -
【最大流+输出路径】POJ-3436 ACM Computer Factory
ACM Computer FactoryTime Limit: 1000MS Memory Limit: 65536KSpecial Judge DescriptionAs you know, all the computers used for ACM contests must be identical,原创 2014-09-22 22:07:11 · 1172 阅读 · 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原创 2014-09-21 23:14:11 · 1299 阅读 · 0 评论 -
【最大流+混合图欧拉回路】POJ-1637 Sightseeing tour
Sightseeing tourTime Limit: 1000MS Memory Limit: 10000K DescriptionThe city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so tha原创 2014-09-23 23:48:43 · 765 阅读 · 0 评论 -
【最小割】POJ-3308 Paratroopers
ParatroopersTime Limit: 1000MS Memory Limit: 65536K DescriptionIt is year 2500 A.D. and there is a terrible war between the forces of the Earth and the Mars. Re原创 2014-09-26 13:14:31 · 782 阅读 · 0 评论 -
【最小割】POJ-3469 Dual Core CPU
Dual Core CPUTime Limit: 15000MS Memory Limit: 131072K Case Time Limit: 5000MSDescriptionAs more and more computers are equipped with dual core CPU, Setag原创 2014-09-24 16:34:12 · 715 阅读 · 0 评论 -
【线性规划+最小费用最大流】Vijos-1825 志愿者招募
P1825志愿者招募Accepted标签:NOI2008描述申奥成功后,布布经过不懈努力,终于成为奥组委下属公司人力资源部门的主管。布布刚上任就遇到了一个难题:为即将启动的奥运新项目招募一批短期志愿者。经过估算,这个项目需要N 天才能完成,其中第i 天至少需要Ai 个人。布布通过了解得知,一共有M 类志愿者可以原创 2014-10-23 18:27:03 · 1117 阅读 · 0 评论 -
费用流模板 spfa+EK
const int N = 1000, M = 1e5;struct Node { int u, v, w, c; int next;}edge[M];int pre[N], path[N], dis[N];bool inq[N];bool spfa(int S, int T, int n){ int u; for(int i = 0; i < n ; i++) { in原创 2014-10-17 21:55:13 · 889 阅读 · 0 评论 -
【最小费用最大流】POJ-2516 Minimum Cost
Minimum CostTime Limit: 4000MS Memory Limit: 65536K DescriptionDearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale are原创 2014-10-25 21:58:43 · 904 阅读 · 0 评论 -
【最大流|关键边】ZOJ-1532 Internship
由一个总部、若干个城市、中继站以及一些网段构成一个容量网络。每个网段是单向的且存在一定带宽。城市会无限制的上传数据,求出该图中的这样一些网段:增加这些网段的带宽可以提高总部收到的总带宽。原创 2015-03-06 12:26:37 · 1098 阅读 · 0 评论