poj Kindergarten】的更多相关文章

Kindergarten 又是一道自己没思考出来的题 !!!!! 还是老样子,题目去我拉的专题里有. 题目: 给出G给女孩,B给男孩.女孩之间是相互认识的,男孩之间也是相互认识的.如今题目中给出M对男女间会相互认识的关系普,要你计算出男女之间两两都认识的最大人数. 算法: 一開始看到以为是最大团.囧.后来越想越不正确啊.后来看到别人说是求解补图的问题.太深奥了.为了求出满足题目的条件,则要转换成最大独立集来求解. 证明例如以下: 最大独立集是全部点随意两点间都没有连边. 最大团要求:随意两点间都…
Kindergarten Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 5660   Accepted: 2756 Description 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…
题目链接:http://poj.org/problem?id=3692 Description 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 pi…
Kindergarten Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 4903   Accepted: 2387 Description 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…
Description 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 n…
id=3692">Kindergarten Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 4920   Accepted: 2399 Description 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 t…
[题目链接] http://poj.org/problem?id=3692 [题目大意] 男生相互之间都认识,女生相互之间也都认识, 一些男生和一些女生相互之间也认识,求找出最多的人参加派对, 他们相互之间都认识 [题解] 我们建认识图的反图,将相互之间不认识的连线, 那么问题转化为求这个图的最大独立集, 最大独立集答案为总点数减去最大匹配. [代码] #include <cstdio> #include <cstring> using namespace std; const i…
Kindergarten Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 6956   Accepted: 3436 Description 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…
Kindergarten Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 5884   Accepted: 2877 Description 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…
题意 幼稚园里有m个男孩和n个女孩(m.n范围都是[1,200]),男孩之间相互认识,女孩之间也相互认识,另外有部分男孩和女孩也认识.现在要举办一个活动,选取一些同学,要求所有选取的同学之间两两相互认识. 思路 抽象一下问题就是:在图G中选择一个最大的子图G'(V', E'),使得∑u, v∈V',  (u, v)∈E',这就是最大团问题,也即最大完全子图问题. 一般性的最大团问题是NP问题,但是此题的图比较特殊,有g个点互相相连,b个点也互相相连,也就是说他们的补图是一个二分图.那么我们就可以…