摘要: 题目链接: acm.hdu.edu.cn/showproblem.php?pid=1082 题意描述: 给出课程数和学生数,以及每个课有哪些学生上过,问这N个学生能否组成一个委员会,该委员会中每人代表一种课,能否表示完P门课。 解题思路: 二分图最佳完备匹配,也即二分图最大匹配数。 AC代码: #i 阅读全文
posted @ 2017-08-14 23:48 Reqaw 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1150 题意描述: A和B两种机器有几种工作模式,而每种工作能在两种机器的不同模式下加工,每换一种工作模式需要重启一次,现在给出每种工作在每种机器下的工作模式,问最少需要重启多少次加工完工作。 解题思路 阅读全文
posted @ 2017-08-14 23:38 Reqaw 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2119 解题思路: 处理数据,使用公式最小点覆盖数=最大匹配数,使用匈牙利算法求二分图最大匹配即可。 AC代码: 1 #include<stdio.h> 2 #include<string.h> 3 i 阅读全文
posted @ 2017-08-14 23:29 Reqaw 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1068 Problem Description the second year of the university somebody started a study on the romantic re 阅读全文
posted @ 2017-08-14 23:24 Reqaw 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2063 解题思路: 二分图最大匹配模板题。 AC代码: 1 #include<stdio.h> 2 int e[1010][1010],match[1010],book[1010],z; 3 int d 阅读全文
posted @ 2017-08-14 23:17 Reqaw 阅读(149) 评论(0) 推荐(0) 编辑