hdu 1498】的更多相关文章

http://acm.hdu.edu.cn/showproblem.php?pid=1498 题意:给出一个 n*n 的矩阵,里面的数字代表一种颜色,每次能炸掉一排或者一列的相同颜色的气球,问有哪些颜色的气球不能在 k 次内炸完的,从小到大输出,能炸完输出-1. 思路:先存下点,用一个数字标记颜色是否出现过,然后遍历每一种颜色,再把这种颜色的行号和列号连边,跑一遍匈牙利,如果得到的结果大于 k 那么这种颜色就不行. #include <cstdio> #include <cstring&…
题目链接: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): 1484    Accepted Submission(s): 798 Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating…
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…
每次只能消除一行或一列的相同颜色的气球, 求有多少种气球在k次内不能消除 求出每种气球最少需要多少次消除,就跟hdu 2119消除1用多少次是一样的问题 就是求有这种气球的行和列的最大匹配 #include<stdio.h> #include<string.h> #include<stdlib.h> int map[101][101],link[101],color[55],mark[101],n,c[55]; int cmp(const void *a,const v…
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…
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 will be a game named "crashing color ballo…
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…
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…
题目:点击打开链接 题意:每个格子有不同颜色的气球用不同数字表示,每次可选某一行              或某一列来戳气球.每个人有K次机会.求最后哪些气球不能在             k次机会内被戳破.将这些气球的编号按升序输出. 分析:行列匹配,每种颜色的气球都要判断,故dfs传参时加一个气球的              编号. 感想:1.开始以为要按照最大匹配数按升序排列,昨天wa了一下午,把我搞郁闷了.                     今天重新看题,是要按照id来排序.  …