码迷,mamicode.com
首页 >  
搜索关键字:最大独立集    ( 332个结果
(hdu step 6.3.7)Cat vs. Dog(当施工方规则:建边当观众和其他观众最喜爱的东西冲突,求最大独立集)
称号:Cat vs. DogTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 219 Accepted Submission(s): 86Probl...
分类:其他好文   时间:2015-09-17 13:12:08    阅读次数:238
codeforces 340D D. Bubble Sort Graph(dp+线段树)
题目链接:codeforces 340D题目大意:给出一个程序,就是冒泡排序,每次如果发现相邻两个数前一个大于后一个,交换位置后建边,问最后得到的这个图中的最大独立集,这个最大独立集定义为所有的点都不相邻的最大点的集合的规模。题目分析: 首先我们可以知道对于a[i],它只会且一定会与后面的比它小的建边,所以我们只需要固定第一个点,然后找最长上升子序列即可。(这样能够保证没有相邻的点) 定义状态dp[...
分类:其他好文   时间:2015-09-15 18:34:42    阅读次数:207
Uva-1220 - Party at Hali-Bula
树的最大独立集,但是要判断唯一性。有些像是dfs。另外发现std::ios::sync_with_stdio(0)不能与scanf并用! 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #define pb pu...
分类:其他好文   时间:2015-09-13 15:54:02    阅读次数:239
poj 3692 Kindergarten (最大独立集之逆匹配)
DescriptionIn 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, s...
分类:其他好文   时间:2015-08-31 21:19:31    阅读次数:161
poj 1466 Girls and Boys(二分匹配之最大独立集)
DescriptionIn the second year of the university somebody started a study on the romantic relations between the students. The relation "romantically in...
分类:其他好文   时间:2015-08-31 19:17:44    阅读次数:138
二分图之最小独立集 HDU 2768
图的独立集:寻找一个点集,其中任意两点在图中无对应边二分图的最大独立集=图的点数-最大匹配数 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct people 9...
分类:其他好文   时间:2015-08-28 12:30:23    阅读次数:131
poj 1466 HDU 1068 Girls and Boys (最大独立集)
Girls and Boys Time Limit: 5000MS   Memory Limit: 10000K Total Submissions: 11141   Accepted: 4983 Description In the second year of the university somebody started a study...
分类:其他好文   时间:2015-08-27 18:45:21    阅读次数:157
LightOJ 1201 - A Perfect Murder【二分图最大独立集】
链接:http://www.lightoj.com/volume_showproblem.php?problem=1201最大独立集= 顶点数- 最大匹配代码:#include #include #include #include #include #include #...
分类:其他好文   时间:2015-08-26 22:28:06    阅读次数:200
hdu1520 Anniversary party(最大独立集 树形dp)
题目链接:点击打开链接 题目描述:现有一棵树,树上每个结点都有一个权值,问从中选一些点,这些点两两之间不直接连接,问权值最大为多少? 解题思路:很裸的一道树上最大独立集问题 树形dp即可 dp[i][0]:不选i节点 dp[i][0]+=max(dp[t][0],dp[t][1]); dp[i][1]:选i节点     dp[i][1]+=dp[t][0]; 代码: #pragma c...
分类:其他好文   时间:2015-08-26 12:09:25    阅读次数:147
杭电1068--Girls and Boys(二分图最大独立集)
Girls and BoysTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8863Accepted Submission(s): 4077Pr...
分类:其他好文   时间:2015-08-20 22:10:19    阅读次数:285
332条   上一页 1 ... 18 19 20 21 22 ... 34 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!