随笔分类 -  最大流

HDU 3416 Marriage Match IV(SPFA+最大流)
摘要:Marriage Match IVTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1514Accepted Submission(s): 427Problem DescriptionDo 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 阅读全文

posted @ 2013-05-04 13:00 kuangbin 阅读(1613) 评论(0) 推荐(0)

HDU 3277 Marriage Match III(最大流+二分+并查集)
摘要:Marriage Match IIITime Limit: 10000/4000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 771Accepted Submission(s): 236Problem DescriptionPresumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the ever game of pl 阅读全文

posted @ 2013-05-04 00:03 kuangbin 阅读(539) 评论(0) 推荐(0)

HDU 3081 Marriage Match II (最大流+二分+并查集)
摘要:Marriage Match IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1085Accepted Submission(s): 388Problem DescriptionPresumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing 阅读全文

posted @ 2013-05-03 23:35 kuangbin 阅读(652) 评论(0) 推荐(0)

HDU 3605 Escape(最大流)
摘要:EscapeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2523Accepted Submission(s): 691Problem Description2012 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 阅读全文

posted @ 2013-05-03 14:55 kuangbin 阅读(1222) 评论(1) 推荐(0)

HDU 2883 kebab (最大流)
摘要:kebabTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 489Accepted Submission(s): 211Problem DescriptionAlmost everyone likes kebabs nowadays (Here a kebab means pieces of meat grilled on a long thin stick). Have you, however, considered about the ha 阅读全文

posted @ 2013-05-03 12:44 kuangbin 阅读(662) 评论(0) 推荐(0)

HDU 3338 Kakuro Extension(最大流)
摘要:Kakuro ExtensionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 590Accepted Submission(s): 204Special JudgeProblem DescriptionIf you solved problem likethis, forget it.Because you need to use a completely different algorithm to solve the following 阅读全文

posted @ 2013-05-02 22:52 kuangbin 阅读(746) 评论(0) 推荐(0)

HDU 2732 Leapin' Lizards(最大流)
摘要:Leapin' Lizards题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2732题目意思看起来比较难懂。题目是说一个n*m的迷宫中,有每个格子有柱子。柱子高度为0~3,高度为0的柱子是不能站的(高度为0就是没有柱子)在一些有柱子的格子上有一些蜥蜴,一次最多跳距离d,相邻格子的距离是1,只要跳出迷宫就是安全的。这个距离是曼哈顿距离(好像是的)。蜥蜴一次最多跳距离d,但是起跳的地方的柱子高度会减一,一个柱子同一时间只能有一个蜥蜴要求最少几个不能逃出迷宫。具体意思看题目吧,很多描述不清呢~~还是英语好啊做法就是最大流。要拆点,两个点的容量就 阅读全文

posted @ 2013-05-02 13:40 kuangbin 阅读(894) 评论(0) 推荐(0)

UVA 10480 - Sabotage (最大流)
摘要:SabotageThe regime of a small but wealthy dictatorship has been abruptly overthrown by an unexpected rebellion. Because of the enormous disturbances this is causing in world economy, an imperialist military super power has decided to invade the country and reinstall the old regime.For this operation 阅读全文

posted @ 2013-02-28 15:13 kuangbin 阅读(1507) 评论(0) 推荐(0)

最大流模板(SAP算法)(邻接表形式)
摘要:最大流的SAP模板,用了很多次了。今天总结贴下(虽然代码不够精简,但是自己写的也总算看起来明白些,不容易错)据说没有可以卡SAP的最大流。。。const int MAXN=20010;//点数的最大值const int MAXM=880010;//边数的最大值const int INF=0x3f3f3f3f;struct Node{ int from,to,next; int cap;}edge[MAXM];int tol;int head[MAXN];int dep[MAXN];int gap[MAXN];//gap[x]=y :说明残留网络中dep[i]==x的个数为yint ... 阅读全文

posted @ 2012-09-29 08:34 kuangbin 阅读(3194) 评论(3) 推荐(0)

HDU 4289 Control 第37届ACM/ICPC 成都赛区网络赛1002题 (最大流)
摘要:ControlTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 238Accepted Submission(s): 135Problem Description You, the head of Department of Security, recently received a top-secret information that a group of terrorists is planning to transport some W. 阅读全文

posted @ 2012-09-17 13:01 kuangbin 阅读(808) 评论(0) 推荐(0)

HDU 4292 Food 第37届ACM/ICPC 成都赛区网络赛1005题 (最大流)
摘要:FoodTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 76Accepted Submission(s): 47Problem Description You, a part-time dining service worker in your college’s dining hall, are now confused with a new problem: serve as many people as possible. The i.. 阅读全文

posted @ 2012-09-16 19:34 kuangbin 阅读(1146) 评论(0) 推荐(0)

HDU 4280 Island Transport 第37届ACM/ICPC 天津网络赛1003题 (最大流模板题,高效SAP模板)
摘要:Island TransportTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1296Accepted Submission(s): 421Problem Description In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the islands. 阅读全文

posted @ 2012-09-11 23:29 kuangbin 阅读(1398) 评论(0) 推荐(0)

POJ 1459 Power Network 最大流 dinic模板
摘要:Power NetworkTime Limit: 2000MSMemory Limit: 32768KTotal Submissions: 18609Accepted: 9833DescriptionA 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 power, may produce an amount 0 阅读全文

posted @ 2012-09-11 22:22 kuangbin 阅读(2237) 评论(0) 推荐(0)

POJ 2516 Minimum Cost(最小费用最大流)
摘要:Minimum CostTime Limit: 4000MSMemory Limit: 65536KTotal Submissions: 10978Accepted: 3692DescriptionDearboy, 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.Dearboy has M supply places (ma 阅读全文

posted @ 2012-08-22 17:34 kuangbin 阅读(1454) 评论(0) 推荐(0)

POJ 2195 Going Home(最小费用最大流)
摘要:Going HomeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13994Accepted: 7167DescriptionOn 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 adjacent point. For each little man, you need to p 阅读全文

posted @ 2012-08-22 15:19 kuangbin 阅读(887) 评论(0) 推荐(0)

POJ 1087 A Plug for UNIX(最大流)
摘要:A Plug for UNIXTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11636Accepted: 3834DescriptionYou 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 make the free flow of information and 阅读全文

posted @ 2012-08-21 22:43 kuangbin 阅读(563) 评论(0) 推荐(0)

POJ 3281 Dining(最大流)
摘要:DiningTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 6586Accepted: 3015DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others.Farmer John has cooked fabulous meals for his cows, but he forgot to check his menu against 阅读全文

posted @ 2012-08-21 21:48 kuangbin 阅读(4177) 评论(0) 推荐(0)

POJ 3436 ACM Computer Factory(最大流)
摘要:ACM Computer FactoryTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4077Accepted: 1366Special JudgeDescriptionAs you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is why all these computers are historically produced at the 阅读全文

posted @ 2012-08-21 16:41 kuangbin 阅读(2548) 评论(0) 推荐(0)

POJ Power Network(最大流)
摘要:Power NetworkTime Limit: 2000MSMemory Limit: 32768KTotal Submissions: 18309Accepted: 9643DescriptionA 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 power, may produce an amount 0 阅读全文

posted @ 2012-08-21 13:55 kuangbin 阅读(697) 评论(0) 推荐(0)

导航

JAVASCRIPT: