
二分图
Evildoer_llc
这个作者很懒,什么都没留下…
展开
-
hdu 1495 50 years, 50 colors (枚举二分图最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1498 On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nice, isn't it? To celebrate this meaningful ...原创 2018-10-12 01:33:01 · 244 阅读 · 0 评论 -
hdu 2119 Matrix(二分图最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2119给你一个N*M的0/1矩阵,你每次可以选特定的某行或某列,然后删除该行/列的所有1,问你最少需要几次操作能删除矩阵的所有1. Give you a matrix(only contains 0 or 1),every time you can select a row or a c...原创 2018-10-15 02:11:15 · 312 阅读 · 0 评论 -
hdu 1853 Cyclic Tour (KM)算法入门=二分图最优匹配
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1853 There are N cities in our country, and M one-way roads connecting them. Now Little Tom wants to make several cyclic tours, which satisfy that,...原创 2018-10-15 02:13:34 · 282 阅读 · 0 评论 -
hdu 3488 Tour (KM)二分图最优匹配 有向环
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3488 In the kingdom of Henryy, there are N (2 <= N <= 200) cities, with M (M <= 30000) one-way roads connecting them. You are lucky enough...原创 2018-10-15 02:15:11 · 299 阅读 · 0 评论 -
hdu 3435 A new Graph Game (KM ,二分图最优匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3435 An undirected graph is a graph in which the nodes are connected by undirected arcs. An undirected arc is an edge that has no arrow. Both ends ...原创 2018-10-15 02:17:22 · 303 阅读 · 0 评论 -
hdu 3861 The King’s Problem (强联通+二分匹配) 好题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3861 In the Kingdom of Silence, the king has a new problem. There are N cities in the kingdom and there are M directional roads between the cities....原创 2018-10-16 01:25:52 · 282 阅读 · 0 评论 -
二分图基本性质
最小点覆盖=最大匹配。最小边覆盖=最大独立集=图中点的个数-最大匹配。 最小路径覆盖结论:DAG最小路径覆盖=图顶点-建图后的最大匹配最小不相交路径覆盖建图方式:把一个的点V拆点成Vx和Vy,如果A连向B,那么就建一条Ax连向By的边。 图中有多少条路径,可以以一种方法得到,就是计算出度为0的点的个数。如果知道这个就很容易得出这个结论了。最小相交路径覆盖做法首先跑floyd...原创 2018-10-09 23:54:18 · 995 阅读 · 0 评论 -
hdu 1068 Girls and Boys (最大独立集)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1068 the second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved...原创 2018-10-10 00:01:53 · 290 阅读 · 0 评论 -
hdu 1150 Machine Schedule(最小点覆盖)
As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems differ widely in the nature of the constraints...原创 2018-10-10 00:03:56 · 227 阅读 · 0 评论 -
hdu 1179 Ollivanders: Makers of Fine Wands since 382 BC. (最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1179 In Diagon Alley ,there is only one Wand-seller,peeling gold letters over the door read Ollivanders: Makers of Fine Wands since 382 BC.A single...原创 2018-10-10 00:05:25 · 247 阅读 · 0 评论 -
hdu 3081 Marriage Match II (二分图最大匹配+并查集)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3081t题意:有N个女孩要与N个男孩玩配对游戏.每个女孩有一个可选男孩的集合(即该女孩可以选自己集合中的任意一个男孩作为该轮的搭档).然后从第一轮开始,每个女孩都要和一个不同的男孩配对.如果第一轮N个女孩都配对成功,那么就开始第二轮配对,女孩依然从自己的备选男孩集合中选择,但是不能选那些已经被...原创 2018-10-15 02:08:05 · 217 阅读 · 0 评论 -
Courses HDU - 1083 二分图初学 水题
Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P students that sa...原创 2018-06-07 00:10:57 · 474 阅读 · 0 评论 -
奔小康赚大钱 HDU - 2255 KM算法 入门
传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。 另一方面,村长和另外的村领导希望得到最大的效益,这样村里的机构才会有钱.由于老百姓都比较富裕,他们都能对每一间房子在他们的...原创 2018-06-07 01:09:29 · 256 阅读 · 0 评论 -
hdu 1507 Uncle Tom's Inherited Land*(二分图最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1507 Your old uncle Tom inherited a piece of land from his great-great-uncle. Originally, the property had been in the shape of a rectangle. A long...原创 2018-10-12 01:40:10 · 189 阅读 · 0 评论 -
hdu 2819 Swap (二分图最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2819 Given an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the diagonal...原创 2018-10-12 01:41:40 · 339 阅读 · 0 评论 -
hdu 3605 Escape (二分图多重匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3605 2012 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 peopl...原创 2018-10-12 01:45:06 · 181 阅读 · 0 评论 -
hdu 1528 Card Game Cheater(二分图最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1528 Adam and Eve play a card game using a regular deck of 52 cards. The rules are simple. The players sit on opposite sides of a table, facing eac...原创 2018-10-12 01:47:46 · 431 阅读 · 0 评论 -
hdu 1845 Jimmy’s Assignment(二分图最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1845 Jimmy is studying Advanced Graph Algorithms at his university. His most recent assignment is to find a maximum matching in a special kind of g...原创 2018-10-12 01:50:54 · 259 阅读 · 0 评论 -
hdu 2063 过山车 (二分图最大匹配)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2063 RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Gr...原创 2018-10-12 01:52:24 · 183 阅读 · 0 评论 -
网络流24题 飞行员配对方案问题(二分图匹配)
题目链接:https://www.luogu.org/problemnew/show/P2756英国皇家空军从沦陷国征募了大量外籍飞行员。由皇家空军派出的每一架飞机都需要配备在航行技能和语言上能互相配合的2 名飞行员,其中1 名是英国飞行员,另1名是外籍飞行员。在众多的飞行员中,每一名外籍飞行员都可以与其他若干名英国飞行员很好地配合。如何选择配对飞行的飞行员才能使一次派出最多的飞机。对于给定的...原创 2018-09-19 23:43:20 · 220 阅读 · 0 评论 -
51 nod 1397 最大二分图匹配
这个问题需要你首先了解一些二分图的基础知识,如果不知道也许您需要先维基百科一下,为了描述简单这里就不介绍基础常识了。已知二分图中两部分点集分别有n1与n2个节点,且知道这个二分图的最大匹配为m,同时要求这个二分图中每个节点的度至少为d。那么这个二分图最多可能有多少条边?输出这个最多可能的边的数量,若满足要求的二分图不存在则输出-1. Input多组测试数据,第一行一个整数T,表示测...原创 2018-09-10 22:44:09 · 264 阅读 · 0 评论 -
The Accomodation of Students HDU - 2444 染色法判二分图+最大匹配
There are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But this may not imply that A and C know each other....原创 2018-06-12 01:11:38 · 250 阅读 · 0 评论 -
hdu 1281 棋盘游戏 (枚举二分图最大匹配)
小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这...原创 2018-10-10 00:06:48 · 281 阅读 · 0 评论