
二分图
Tizzii
这个作者很懒,什么都没留下…
展开
-
URAL - 1099 Work Scheduling一般图最大匹配-带花树
一、内容There is a certain amount of night guards that are available to protect the local junkyard from possible junk robberies. These guards need to be scheduled in pairs so that each pair guards in a d...原创 2020-02-28 21:10:28 · 415 阅读 · 0 评论 -
HDU 3488 Tour KM完美匹配
一、内容 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 to have a chance to have a tour in the kingdom. The...原创 2020-02-28 20:01:55 · 529 阅读 · 0 评论 -
HDU 2255 奔小康赚大钱 KM算法
一、内容 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。另一方面,村长和另外的村领导希望得到最大的效益,这样村里的机构才会有钱.由于老百姓都比较富裕,他们都能对每一间房子...原创 2020-02-28 18:57:51 · 366 阅读 · 0 评论 -
POJ 3189 Steady Cow Assignment 二分+枚举+多重匹配
一、内容Farmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns which, of course, have limited capacity. Some cows really like their current barn, and some are not ...原创 2020-02-27 20:53:10 · 530 阅读 · 1 评论 -
POJ 2112 Optimal Milking 二分 + 多重匹配 +Floyd
一、内容FJ 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 of various lengths runs among the cows and the milking ma...原创 2020-02-27 19:50:16 · 492 阅读 · 0 评论 -
POJ 2289 Jamie's Contact Groups 多重匹配+二分
一、内容Jamie 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. The contact list has become so long that it often takes a long time fo...原创 2020-02-27 17:59:51 · 1624 阅读 · 0 评论 -
HDU 3829 Cat VS Dog 最大独立集
一、内容 The 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 dislike-animal ...原创 2020-02-27 16:28:25 · 599 阅读 · 0 评论 -
POJ 2594 Treasure Exploration 最小路径重复点覆盖
一、内容Have you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experiences, you would never...原创 2020-02-27 15:27:19 · 537 阅读 · 0 评论 -
HDU 1151Air Raid 最小路径重复点覆盖
一、内容 Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's streets y...原创 2020-02-26 17:58:33 · 548 阅读 · 0 评论 -
HDU - 1054 Strategic Game 最小点覆盖
一、内容 Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He must defend a m...原创 2020-02-26 17:39:53 · 443 阅读 · 0 评论 -
POJ 3020 Antenna Placement 最小路径点覆盖
一、内容The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the job, is their discovery of ...原创 2020-02-26 17:25:02 · 582 阅读 · 0 评论 -
HDU - 4185 Oil Skimming
一、内容 Thanks to a certain "green" resources company, there is a new profitable industry of oil skimming. There are large slicks of crude oil floating in the Gulf of Mexico just waiting to be scooped u...原创 2020-02-25 20:22:59 · 632 阅读 · 0 评论 -
HDU 2389 Rain on your Parade HK算法
一、内容 You’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm, sunny evening, and a soothing wind sends fresh, salty air from the s...原创 2020-02-25 19:44:24 · 583 阅读 · 0 评论 -
HDU - 2819 Swap
一、内容 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 entries equal to 1? InputThere are several test ...原创 2020-02-25 15:38:19 · 551 阅读 · 0 评论 -
HDU - 1083 Courses
一、内容 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 t...原创 2020-02-24 18:03:58 · 487 阅读 · 0 评论 -
HDU 2444 The Accomodation of Students 染色法 +最大匹配
一、内容 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 ...原创 2020-02-24 17:51:54 · 711 阅读 · 0 评论 -
HDU 1281 棋盘游戏 二分图最大匹配
一、内容 小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这些格...原创 2020-02-24 17:05:04 · 697 阅读 · 0 评论 -
HDU - 1045 Fire Net
一、内容 Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small cas...原创 2020-02-24 16:26:00 · 704 阅读 · 2 评论 -
HDU - 4685 Prince and Princess 完美匹配+SCC
一、内容 There are n princes and m princesses. Princess can marry any prince. But prince can only marry the princess they DO love.For all princes,give all the princesses that they love. So, there is a m...原创 2020-02-23 21:24:46 · 745 阅读 · 1 评论 -
捉迷藏 最小重复点覆盖
一、内容Vani和cl2在一片树林里捉迷藏。这片树林里有N座房子,M条有向道路,组成了一张有向无环图。树林里的树非常茂密,足以遮挡视线,但是沿着道路望去,却是视野开阔。如果从房子A沿着路走下去能够到达B,那么在A和B里的人是能够相互望见的。现在cl2要在这N座房子里选择K座作为藏身点,同时Vani也专挑cl2作为藏身点的房子进去寻找,为了避免被Vani看见,cl2要求这K个藏身点...原创 2020-02-23 17:08:26 · 582 阅读 · 0 评论 -
骑士放置 最大独立集
一、内容给定一个 N*M 的棋盘,有一些格子禁止放棋子。问棋盘上最多能放多少个不能互相攻击的骑士(国际象棋的“骑士”,类似于中国象棋的“马”,按照“日”字攻击,但没有中国象棋“别马腿”的规则)。输入格式第一行包含三个整数N,M,T,其中T表示禁止放置的格子的数量。接下来T行每行包含两个整数x和y,表示位于第x行第y列的格子禁止放置,行列数从1开始。输出格式输出一个整数表示结果...原创 2020-02-23 13:38:36 · 1725 阅读 · 0 评论 -
POJ - 1325 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...原创 2020-02-22 20:19:04 · 1576 阅读 · 0 评论 -
棋盘覆盖
一、内容给定一个N行N列的棋盘,已知某些格子禁止放置。求最多能往棋盘上放多少块的长度为2、宽度为1的骨牌,骨牌的边界与格线重合(骨牌占用两个格子),并且任意两张骨牌都不重叠。输入格式第一行包含两个整数N和t,其中t为禁止放置的格子的数量。接下来t行每行包含两个整数x和y,表示位于第x行第y列的格子禁止放置,行列数从1开始。输出格式输出一个整数,表示结果。数据范围1≤N≤...原创 2020-02-22 18:54:28 · 601 阅读 · 0 评论 -
关押罪犯 二分图匹配
一、内容S 城现有两座监狱,一共关押着 N 名罪犯,编号分别为1~N。他们之间的关系自然也极不和谐。很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。如果两名怨气值为 c 的罪犯被关押在同一监狱,他们俩之间会发生摩擦,并造成影响力为 c 的冲突事件。每年年末,警察局会将本年内监狱中...原创 2020-02-22 17:17:22 · 585 阅读 · 0 评论