{POJ}{4000}{National Treasures}{二分匹配}
摘要:
思路:观察宝物周围的keypoints与宝物位置的距离是奇数,也就转化成为染色问题,将图进行染色,黑色与白色之间构成二分图,求最小边覆盖即可。一道经典的染色转化问题。#include <iostream>#include <string>#include <cstring>#include <cstdio>#include <algorithm>#include <memory>#include <cmath>#include <bitset>#include <queue>#inclu 阅读全文
posted @ 2012-05-19 14:02 Lvpengms 阅读(624) 评论(0) 推荐(1) 编辑