给一个矩阵,里面有一些不同颜色的气球.每次能够消灭一行或一列中某一种颜色的气球,问你在k次及以内,有哪些颜色的气球是不管怎样也消不完的. 那么思路就是,对每一种颜色的气球求最小点覆盖.>k 则为答案. 相当于 poj3041的加强版,由于矩阵中不是每个点都是等价的. #include<cstdio> #include<cstring> #include<cmath> #include<iostream> #include<algorithm>…
50 years, 50 colors Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nice, isn't it? To celebrate this meaningful day, the ACM team of HDU hold some fuuny games. Especially, there wi…
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nice, isn't it? To celebrate…
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 137 Accepted Submission(s): 86   Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating aroun…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1498 50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1918    Accepted Submission(s): 1058 Problem Description On Octorber 21st,…
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2683    Accepted Submission(s): 1538 Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons floatin…
题目大意:给你一个 n*n 的矩阵,每个格子上对应着相应颜色的气球,每次你可以选择一行或一列的同种颜色的气球进行踩破,问你在K次这样的操作后,哪些颜色的气球是不可能被踩破完的. 题解:对于每一种颜色建图,对于每一个点,要么横坐标被染色,要么纵坐标被染色,所以就是最小点覆盖. #include <cstdio> #include <cstring> #include <algorithm> #include <vector> using namespace s…
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2256    Accepted Submission(s): 1266 Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating…
Muddy Fields Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8881   Accepted: 3300 Description Rain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 <= R <= 50, 1 <= C <= 50). While good for the grass, t…
题意 给出的是N*M的矩阵,同样是有障碍的格子,要求每次只能消除一行或一列中连续的格子,最少消除多少次可以全部清除. 思路 相当于POJ 3041升级版,不同之处在于这次不能一列一行全部消掉,那些非障碍的格子不能消. 但是我们还是要抓住关键点:每个格子必须消除,要么以行消,要么以列消.并且我们发现如果以行消得话,一定是以这连续障碍行的最左端为起点,同理列是以最上端为起点.那么我们就又把消除方式变成两种了.这时就可以把障碍当作边,两种覆盖方式分别作为两断点,求二分图最小点覆盖集. 行列方式的起点共…