【图论】【匹配】pku3715 Blue and Red
来源:互联网 发布:乐聘网络 编辑:程序博客网 时间:2024/05/23 01:08
【题目】:Blue and Red
【类型】:图论
【难度】:中等
【来源】:pku3715
【关键字】:最小点覆盖集
【题目大意】:有两个阵营,给出N个士兵所属阵营和士兵之间的朋友关系。问最少除去多少个士兵,可以使得两方中的任意两个(每方选一个)都不是朋友。如果有多种答案,依次输出字典序小的答案。
-----------------------------------------------------------------------------------------------------------------------------------------
【自己的分析】:先用匈牙利算出最小点覆盖数,接下来对所有最大匹配边扫描一次,选边的两端中较小的点。这个算法明显是错的。
【正确的算法分析】:其实有个算法可以求出最小点覆盖集,利用了konig定理,详见【其他】。算法看不懂,于是网上找了篇大牛的代码抄了一份。带入数据过了一遍,还是不懂其原理,自己数学修养太低了。
【数据结构】:
【其他优化】:
【时间复杂度】:
【学到了什么知识经验】:求最小点覆盖集
【同类型题目】:
-----------------------------------------------------------------------------------------------------------------------------------------
【其他】:
http://acm.pku.edu.cn/JudgeOnline/problem?id=3715
http://www.matrix67.com/blog/archives/116
http://scrooke.spaces.live.com/blog/cns!10081586F20AA5EE!209.entry
-----------------------------------------------------------------------------------------------------------------------------------------
【代码】:
- 【图论】【匹配】pku3715 Blue and Red
- [agc14e]Blue and Red Tree
- poj 3715 Blue and Red(二分图最大匹配匈牙利算法)
- poj 3715 Blue and Red(二分图最大匹配+字典序输出)
- codeforces#233_div2_B Red and Blue Balls
- POJ 3715 Blue and Red 二分图
- [PKU 3715]Blue and Red(最小点覆盖集)
- poj3715——Blue and Red//最小顶点覆盖
- Codeforces Round #233 (Div. 2) B. Red and Blue Balls
- Codeforces 399B Red and Blue Balls(数论)
- 【CodeForces 339B】Red and Blue Balls 找规律
- [AtCoder AGC014 .E][杂题]Blue and Red Tree
- 【AGC014E】Blue and Red Tree 并查集 启发式合并
- [线段树] Codechef December Challenge 2017. Red and blue points
- Red/Blue Spanning Tree----HDU_4263----并查集and生成树
- codeforces 399B Red and Blue Balls-数据-(模拟题找规律)
- hdu4263 Red/Blue Spanning Tree
- rearrange array (red, white, blue)
- cookie工具类
- 搬迁通知
- web开发总结
- c++属性
- 在Linux下安装 Sybase ASE 11.0.3.3
- 【图论】【匹配】pku3715 Blue and Red
- Spring配置中transactionAttributes的意义
- VCS(Veritas Cluster Server)4.0软件安装介绍
- 今天很高兴
- 日期转字符串工具类
- (转)Index-Organized Tables
- 动态数组
- 选中DataGridView行,将数据返填到TextBox控件
- 谁是那个突击的兵?