![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm_网络流
文章平均质量分 83
kongming_acm
kongming_acm
展开
-
zoj 2760 How Many Shortest Path 求边不相交最短路的条数(没有重边)
Given a weighted directed graph, we define the shortest path as the path who has the smallest length among all the path connecting the source vertex to the target vertex. And if two path is said to be原创 2011-09-19 21:02:16 · 629 阅读 · 0 评论 -
soj 3254: Rain and Fgj 最小割
DescriptionThere are N citys in RAIN's country.And there are M directed road between the N citys.Now she is in the city 0.And she want to原创 2011-09-20 17:53:24 · 395 阅读 · 0 评论 -
soj 3185: Black and white 最小割
DescriptionGiven N black rectangles and M white rectangles.You can pick some of them.But if a black rectangle and a white rectangle share原创 2011-09-20 17:42:02 · 499 阅读 · 0 评论 -
soj 3109: Space flight 最大权闭合图
DescriptionW教授正在为国家航天中心计划一系列的太空飞行。每次太空飞行可进行一系列商业性实验而获取利润。现已确定了一个可供选择的实验集合E={E1,E2,…,Em},和进行这些实验需要使用的全部仪器的集合I={I1,I2,…In}。实验Ej需要用到的仪器是I的子集R原创 2011-09-20 16:40:29 · 446 阅读 · 0 评论 -
hdu 3987 Base Station 最大获利+最大权闭合图
Problem DescriptionA famous mobile communication company is planning to build a new set of base stations. According to the previous invest原创 2011-09-20 15:13:34 · 449 阅读 · 0 评论 -
hdu 3526 Computer Assembling 最小割
Problem DescriptionXiaoA is becoming more and more unsatisfied with his computer since he is learning hacker technologies these days but h原创 2011-09-20 12:39:56 · 389 阅读 · 0 评论 -
zoj 2332 Gems
Wealthy alsomagic! Supernatural alsomagic! But also poor alsomagic! Because he is now puzzled by a problem, and will go crazy if you c原创 2011-09-20 10:38:22 · 561 阅读 · 0 评论 -
poj 2289 Jamie's Contact Groups 多重匹配
DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. Th原创 2011-09-21 10:03:40 · 867 阅读 · 0 评论 -
poj 1422 Air Raid 有向无环图最小路径覆盖=N-最大匹配
DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that原创 2011-09-21 09:52:56 · 557 阅读 · 0 评论 -
poj 2594 Treasure Exploration 有向无环图最小路径覆盖变形(每个点能走多次)+FLOYD = N-最大匹配
DescriptionHave you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever ex原创 2011-09-21 09:48:01 · 454 阅读 · 0 评论 -
poj 3041 Asteroids 最小割
DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The gr原创 2011-09-21 09:17:55 · 418 阅读 · 0 评论 -
poj 1325 Machine Schedule 二分图最小点覆盖=最大匹配
DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history原创 2011-09-21 09:01:10 · 729 阅读 · 0 评论 -
poj 1469 COURSES 最大匹配
DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine原创 2011-09-21 08:56:19 · 479 阅读 · 0 评论 -
soj 3134: windy和水星 Stoer-Wagner算法求无向图的最小割集:一个无向连通网络,去掉一个边集可以使其变成两个连通分量则这个边集就是割集;最小割集当然就权和最小的割集
Descriptionwindy被请到了水星交通部,交通部长现在想知道水星的交通安全度为多少在水星上有n座城市,任意两座城市之间有一条权值在[1,10^5]的双向路定义:为了使得这n座城市至少有两座之间不连通,最少需要破坏的权值为安全度求水星的交通安全度Input输入原创 2011-09-20 18:03:07 · 1249 阅读 · 0 评论 -
tju 2944. Mussy Paper 最大权闭合图并输出
RoBa, an undergraduate student, is preparing for his thesis. He collects many papers about artificial intelligence, the field that he is ver原创 2011-09-20 16:24:50 · 514 阅读 · 0 评论 -
zoj 2587 Unique Attack 判断最小割是否唯一 sap+dfs
N supercomputers in the United States of Antarctica are connected into a network. A network has a simple topology: M different pairs of supe原创 2011-09-19 11:32:23 · 413 阅读 · 0 评论 -
zoj 2532 Internship 找出关键割边(当增加其容量后使最大流增大) 最小割+dfs
CIA headquarter collects data from across the country through its classified network. They have been using optical fibres long before it's b原创 2011-09-20 19:41:25 · 757 阅读 · 0 评论 -
hdu 1569 方格取数(2) 最小割
Problem Description给你一个m*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取数所在的2个格子不能相邻,并且取出的数的和最大。 Input包括多个测试实例,每个原创 2011-09-20 20:37:30 · 336 阅读 · 0 评论 -
joj 2672 Hanoi Tower Once More 有向无环图的最小路径覆盖=N-最大匹配
2010 Yuanguang Cup ACM-ICPC Collegiate Programming Contest Problem I: Hanoi Tower Once More Input File: i.in Output: stdout Description原创 2011-10-20 22:59:51 · 617 阅读 · 0 评论 -
hdu 3829 Cat VS Dog 最大点独立集
Problem DescriptionThe zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat, then his/hers原创 2011-10-19 20:02:09 · 677 阅读 · 0 评论 -
Brevity is Soul of Wit 二分图匹配 将n个字符串缩短(slen<=4且是subsequ,缩短后字符串不能相同)
As we communicate, we learn much new information. However, the process of communication takes too much time. It becomes clear if we look at原创 2011-10-18 18:40:26 · 734 阅读 · 0 评论 -
hdu 3551 Hard Problem 一般图最大匹配+给出一个无向图,存在重边,没有自环。问能否删除一些边,使得每个顶点的度数为指定度数
Problem DescriptionThis is the most tough task in this contest, do not try it until you solve all the other tasks or you feel boring on ot原创 2011-10-13 16:56:22 · 2146 阅读 · 0 评论 -
hdu 3729 I'm Telling the Truth 最大匹配
Problem DescriptionAfter this year’s college-entrance exam, the teacher did a survey in his class on students’ score. There are n studen原创 2011-10-04 15:55:22 · 593 阅读 · 0 评论 -
二分图匹配模板
最大匹配 邻接矩阵#include#include#includeusing namespace std;const int N=1500;//N不能太大 否则超时int cap[N][N];//初始化要清零int _link[N];bool u原创 2011-09-21 08:47:55 · 373 阅读 · 0 评论 -
hdu 3446 daizhenyang's chess 一般图最大匹配+博弈 在一个棋盘上,两个人轮流走,每个人可以移动king走到没被走过的幸运的格子上。问,先手是否能赢。
Problem DescriptionAs we know,daizhenyang likes playing chess,but he always lose,so one day,he invented a brand new chess game with the ne原创 2011-10-13 12:19:19 · 1659 阅读 · 0 评论 -
zoj 3316 Game 一般图最大匹配+博弈 有N个棋子在棋盘上,2个人轮流拿走一个棋子,第一步可以拿任意一个,而之后每一步必须拿上一步拿走的棋子曼哈顿长度L以内的棋子,问,后手是否能赢
Fire and Lam are addicted to the game of Go recently. Go is one of the oldest board games. It is rich in strategy despite its simple rules.原创 2011-10-12 19:56:17 · 1569 阅读 · 0 评论 -
hdu 1466 Girls and Boys 最大点独立集=N-最大匹配
DescriptionIn the second year of the university somebody started a study on the romantic relations between the students. The relation "rom原创 2011-10-11 22:28:33 · 547 阅读 · 0 评论 -
ural 1099. Work Scheduling 一般图最大匹配
There is certain amount of night guards that are available to protect the local junkyard from possible junk robberies. These guards need to原创 2011-10-11 21:52:38 · 634 阅读 · 0 评论 -
tyvj 1035 棋盘覆盖 最大匹配
给出一张n*n(n 输入格式 Input Format 第一行为n,m(表示有m个删除的格子)第二行到m+1行为x,y,分别表示删除格子所在的位置x为第x行y为第原创 2011-09-21 10:18:32 · 1100 阅读 · 0 评论 -
hdu 1853 Cyclic Tour 求图中不相交的l个环的最小权值:首先变成完全图(i->j=inf),然后取反,求最大权值,最后判断是否所有点都选到
Problem DescriptionThere are N cities in our country, and M one-way roads connecting them. Now Little Tom wants to make several cyclic tou原创 2011-09-21 12:46:53 · 683 阅读 · 0 评论 -
hdu 3488 同hdu1853
#include #include #include #include using namespace std;const int N=210;const int inf=(1int n,m;//点数1->n,边数int match[N],lack原创 2011-09-21 12:49:33 · 391 阅读 · 0 评论 -
hdu 3722 Card Game 求完全图中l个不相交的环的最大权和=最优匹配 KM算法
Problem DescriptionJimmy invents an interesting card game. There are N cards, each of which contains a string Si. Jimmy wants to stick the原创 2011-09-21 12:26:16 · 620 阅读 · 0 评论 -
hdu 3996 Gold Mine 最大权闭合图
Problem DescriptionLong long ago, there is a gold mine.The mine consist of many layout, so some area is easy to dig, but some is very hard原创 2011-09-20 14:52:35 · 493 阅读 · 0 评论 -
hdu 3061 Battle 最大权闭合图
Problem Description由于小白同学近期习武十分刻苦,很快被晋升为天策军的统帅。而他上任的第一天,就面对了一场极其困难的战斗:据侦查兵回报,前方共有N座城池,考虑到地势原因,最终得到一个结论:攻占某些城池之前必须攻占另外一些城池。事实上,可以把地图看做是原创 2011-09-20 14:39:03 · 605 阅读 · 0 评论 -
joj 2724: Hua Rong Dao 最小割
2724 Hua Rong Dao I guess you are fond of playing San Guo Sha, right? So here comes a problem of San Guo. It‟s a famous story – “Hua R原创 2011-09-20 13:51:20 · 542 阅读 · 0 评论 -
poj 1087 A Plug for UNIX
DescriptionYou are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which原创 2011-09-18 20:14:17 · 455 阅读 · 0 评论 -
poj 2112 Optimal Milking
DescriptionFJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths o原创 2011-09-18 19:27:31 · 407 阅读 · 0 评论 -
poj 1815 Friendship 最小割+邻接表 求最小点割集(求无向图中最少删除几个顶点使得s和t不联通) 输出顶点是要枚举
DescriptionIn modern society, each person has his own friends. Since all the people are very busy, they communicate with each other only b原创 2011-09-19 10:16:18 · 1083 阅读 · 0 评论 -
poj 3469 Dual Core CPU 最小割+邻接表
DescriptionAs more and more computers are equipped with dual core CPU, SetagLilb, the Chief Technology Officer of TinySoft Corporation,原创 2011-09-19 08:42:15 · 470 阅读 · 0 评论 -
poj 3436 ACM Computer Factory
DescriptionAs you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is w原创 2011-09-18 23:24:48 · 314 阅读 · 0 评论