TZC Asteroids 【二分最大匹配做】
来源:互联网 发布:神马打印软件 编辑:程序博客网 时间:2024/04/25 23:30
Asteroids
总提交: 6 测试通过: 1
描述
Fortunately, Bessie has a powerful weapon that can vaporize all the asteroids in any given row or column of the grid with a single shot.This weapon is quite expensive, so she wishes to use it sparingly.Given the location of all the asteroids in the field, find the minimum number of shots Bessie needs to fire to eliminate all of the asteroids.
输入
* Lines 2..K+1: Each line contains two space-separated integers R and C (1 <= R, C <= N) denoting the row and column coordinates of an asteroid, respectively.
输出
样例输入
3 41 11 32 23 2
样例输出
2
提示
The following diagram represents the data, where "X" is an asteroid and "." is empty space:
X.X
.X.
.X.
OUTPUT DETAILS:
Bessie may fire across row 1 to destroy the asteroids at (1,1) and (1,3), and then she may fire down column 2 to destroy the asteroids at (2,2) and (3,2).
- TZC Asteroids 【二分最大匹配做】
- POJ 3041 Asteroids(最大二分匹配)
- POJ3041--Asteroids--二分图最大匹配--Konig
- Asteroids(poj 3041,二分图最大匹配)
- (二分图最大匹配) poj3041 Asteroids
- EOJ 2069 Asteroids 二分图最大匹配
- [二分图最大匹配] poj 3041 Asteroids
- POJ 3041 Asteroids (二分图最大匹配)
- POJ 3401 Asteroids 二分图最大匹配
- poj 3041 Asteroids 二分图最大匹配
- POJ 3041 Asteroids 二分图最大匹配
- 【POJ】-3041-Asteroids(二分最大匹配)
- Asteroids(二分图的最大匹配)
- POJ 3041 Asteroids 二分图最大匹配
- pku 3041 Asteroids(最小点覆盖,最大二分匹配)
- 【二分图+最大匹配】北大 poj 3041 Asteroids
- poj 3041 Asteroids 初级-》二分图最大匹配
- POJ3041——Asteroids(二分图最大匹配)
- 几个缩略语
- 数据库中的换行符
- 循环为TextBox赋值 (asp.net C#)
- 11月12日
- AMD CPU 历史表
- TZC Asteroids 【二分最大匹配做】
- J2ME移植到ophone
- 三星自主手机平台Bada 挑战Android
- INTEL CPU 历史表
- 未来,电力将直流到户
- HDFS的元数据持久化
- Openwrt下修改flash文件的例子
- MicroWindows介绍
- [转]ASP.NET多频道网站架构心得