hdu4619 - Warm up 2(联通图or贪心0r二分图匹配)【待完善】
摘要:
这道题好多种做法,,,1、联通图。 由于题目特点,这道题可以转化为求图的该图的各个子联通图,每个包含x个点的联通图都可以最多得到不重叠的x/2个牌。注意这句话:很重要的(It's guaranteed the dominoes in the same direction are not overlapped, but horizontal and vertical dominoes may overlap with each other.)代码如下:#include #include #include using namespace std;
#define M 2005
int n, 阅读全文