摘要: 题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2063女生为X集合,男生为Y集合,求二分图最大匹配数即可。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #inc... 阅读全文
posted @ 2015-03-30 22:07 SXISZERO 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://poj.org/problem?id=2239Li Ming大学选课,每天12节课,每周7天,每种同样的课可能有多节分布在不同天的不同节。问LiMing最多可以选多少节课。把n种课划分为X集合,把一周的84节课划分为Y集合,从Xi向Yi连边,那么就转化成了求二分图的最大匹配数... 阅读全文
posted @ 2015-03-30 21:35 SXISZERO 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 6492 Welcome Party For many summers, the Agile Crystal Mining company ran an internship program for students. Theygreatly valued in... 阅读全文
posted @ 2015-03-30 20:55 SXISZERO 阅读(492) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://poj.org/problem?id=2446本题建图是关键。因为卡片都是1*2,所以若点V被某个1*2卡片覆盖,则周围包含V的其它1*2区域都不成立。所以想到只要把V点划分在X集合,周围点在Y集合,V向周围点分别连边,就变成了二分图匹配问题,区分点V与周围点可以用横纵坐标之... 阅读全文
posted @ 2015-03-30 17:03 SXISZERO 阅读(269) 评论(0) 推荐(0) 编辑