匈牙利算法
文章平均质量分 83
i-unique
擅长各种姿势划水
展开
-
POJ 1422 Air 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 you can never reach the same intersection i.e. the town's stree原创 2017-08-15 20:58:37 · 346 阅读 · 0 评论 -
HDU 1281 棋盘游戏(二分图匹配+匈牙利算法+模拟)
小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这些格子上放车,也可以保证尽量多的“车”被放下。但是某些格子若不放子,就无法保证放尽量多的“车”,这样的格子被称做重要点。Gar原创 2017-08-18 10:33:48 · 280 阅读 · 0 评论 -
HDU 1179 Ollivanders: Makers of Fine Wands since 382 BC.(二分图匹配+匈牙利算法)
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 wand lay on a faded purple cushion in the dusty window. A tinkling bell rang somewhere in the depths of the shop原创 2017-08-18 09:16:17 · 326 阅读 · 0 评论 -
二分图匹配的学习(博客收集向)
二分图匹配关于入门知识的博客收集以及匈牙利算法,Hopcroft-Carp算法算法模板原创 2017-08-07 15:53:28 · 446 阅读 · 0 评论 -
HDU 1082 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 that satisfies simultaneously the conditions: every student i原创 2017-08-06 19:03:43 · 397 阅读 · 0 评论 -
HDU 2063 过山车(二分图+匈牙利算法模板题)
RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪酷儿做partner。考虑到经费问题,boss刘决定只让找到partner的人去坐过山车,其他的人,嘿嘿,就站在下面看着吧。聪明的Acme原创 2017-08-07 20:31:15 · 346 阅读 · 0 评论 -
HDU 3729 I'm Telling the Truth(二分图匹配+匈牙利算法+变形)
After this year’s college-entrance exam, the teacher did a survey in his class on students’ score. There are n students in the class. The students didn’t want to tell their teacher their exact score; they only told their teacher their rank in the province原创 2017-08-08 09:25:09 · 465 阅读 · 0 评论 -
HDU 4160 Dolls(二分图匹配+匈牙利算法+最小路径覆盖)
Do you remember the box of Matryoshka dolls last week? Adam just got another box of dolls from Matryona. This time, the dolls have different shapes and sizes: some are skinny, some are fat, and some look as though they were attened. Specifically, doll i ca原创 2017-08-08 10:18:46 · 511 阅读 · 0 评论 -
HDU 1528 Card Game Cheater(二分图匹配+匈牙利算法+模拟)
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 each other. Each player gets k cards from the deck and, after looking at them, places the cards face down in a row on原创 2017-08-08 19:14:41 · 490 阅读 · 0 评论 -
UVA 12168 Cat vs. Dog(二分图匹配+匈牙利算法+最大独立集+数据转化)
The latest reality show has hit the TV: ``Cat vs. Dog''. In this show, a bunch of cats and dogs compete for the very prestigious Best Pet Ever title. In each episode, the cats and dogs get to show themselves off, after which the viewers vote on which pets原创 2017-08-09 19:57:26 · 652 阅读 · 0 评论 -
POJ 3692 Kindergarten(最大匹配+匈牙利算法+补图思想)
In a kindergarten, there are a lot of kids. All girls of the kids know each other and all boys also know each other. In addition to that, some girls and boys know each other. Now the teachers want to pick some kids to play a game, which need that all playe原创 2017-08-09 20:44:39 · 452 阅读 · 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 that must be satisfied and the type of schedule desired. Her原创 2017-08-10 20:54:27 · 275 阅读 · 0 评论 -
POJ 2446 Chessboard(二维转一维+二分匹配+匈牙利算法)
Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2 to cover the board. However, she thinks it too easy to bob, so she makes some holes on the board (as shown in th原创 2017-08-11 16:18:52 · 455 阅读 · 0 评论 -
HDU 1068 Girls and Boys(二分图匹配+最大独立集+匈牙利算法)
the second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved” is defined between one girl and one boy. For the study reasons it is necessary to find out the maximum set satis原创 2017-08-15 09:03:35 · 641 阅读 · 0 评论 -
模板总结
属于自己的模板。。。比赛防忘记赛前复习向原创 2017-07-24 10:25:30 · 1551 阅读 · 1 评论