
匹配
文章平均质量分 69
浮生一朝
这个作者很懒,什么都没留下…
展开
-
The Accomodation of Students HDU - 2444(二分图匹配,匈牙利算法)
题目链接. Sample Input4 41 21 31 42 36 51 21 31 42 53 6Sample OutputNo3题意:首先判断所有的人可不可以分成两部分,每部分内的所有人都相互不认识。如果可以分成 则求两部分最多相互认识的对数。(就是判断是否是一个二分图,如果是二分图求出它的最大匹配,二分图就是根据他的顶点可以分成两部分,并且同一部...原创 2018-02-08 22:07:55 · 212 阅读 · 0 评论 -
棋盘游戏 HDU - 1281(二分匹配,匈牙利算法)
题目链接 Sample Input3 3 41 21 32 12 23 3 41 21 32 13 2Sample OutputBoard 1 have 0 important blanks for 2 chessmen.Board 2 have 3 important blanks for 3 chessmen.题意:最多有多少个位置能放车,假设车放在(...原创 2018-02-11 11:09:29 · 261 阅读 · 0 评论 -
Swap HDU - 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 entries equal to 1? Input There are several test...原创 2018-02-11 11:51:00 · 249 阅读 · 0 评论 -
Strategic Game HDU - 1054 (匈牙利,最小顶点覆盖)
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 mediev...原创 2018-02-12 11:55:28 · 297 阅读 · 0 评论 -
Air Raid HDU - 1151(最小边覆盖,匈牙利算法)
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...原创 2018-02-12 18:12:17 · 254 阅读 · 0 评论