
二分图匹配
文章平均质量分 80
ToRe.
这个作者很懒,什么都没留下…
展开
-
HDU 6346 整数规划(KM)
题目链接 思路 找这题主要测试KM复杂度,KM学习点此处 这题所约束的条件与KM中顶标性质相同,不过符号反了,那么交换等式左右两边即可。即反转w,反转顶标和。 代码 // 注意:如果只是想求最大权值匹配而不要求是完全匹配的话,请把各个不相连的边的权值设置为0。 #include<bits/stdc++.h> using namespace std; #define ll long l...原创 2019-11-06 21:29:37 · 285 阅读 · 1 评论 -
HDU 2255 奔小康赚大钱(KM算法)
Problem Description 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。 另一方面,村长和另外的村领导希望得到最大的效益,这样村里的机构才...原创 2018-07-30 08:48:56 · 243 阅读 · 0 评论 -
POJ 2289 Jamie's Contact Groups(二分图多重匹配 && 二分)
Description 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 l...原创 2018-07-27 17:14:14 · 294 阅读 · 0 评论 -
HDU 2389 Rain on your Parade(Hopcroft-Karp)
Problem Description 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, sa...原创 2018-07-23 09:52:00 · 186 阅读 · 0 评论 -
HDU 2444 The Accomodation of Students(二分图判断&&匈牙利算法)
Problem Description 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 ...原创 2018-07-20 15:50:22 · 236 阅读 · 0 评论