Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3339    Accepted Submission(s): 1394Special Judge Problem Description Your old uncle Tom inherited a piece of land fro…
Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1869    Accepted Submission(s): 777 Special Judge Problem Description Your old uncle Tom inherited a piece of land fr…
Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1247    Accepted Submission(s): 542Special Judge Problem Description Your old uncle Tom inherited a piece of land from…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1507 题目大意:给你一张n*m大小的图,可以将白色正方形凑成1*2的长方形,问你最多可以凑出几块,并输出任一组匹配方案. 解题思路:按行列和奇偶划分两个集合,从而得到二分图,然后进行最大匹配,根据link数组的匹配结果输出相应匹配即可. 代码: #include<iostream> #include<cstdio> #include<cstring> #include<…
题目大意:给你一个矩形,然后输入矩形里面池塘的坐标(不能放东西的地方),问可以放的地方中,最多可以放多少块1*2的长方形方块,并输出那些方块的位置. 题解:我们将所有未被覆盖的分为两种,即分为黑白格(i+j结果为奇数和偶数),然后将相邻的连边,做一遍最大匹配即可. #include <cstdio> #include <cstring> #include <algorithm> #include <vector> using namespace std; c…
http://acm.hdu.edu.cn/showproblem.php?pid=1507 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3671    Accepted Submission(s): 1554Special Judge Problem Description Your old uncle Tom inherited…
Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2013    Accepted Submission(s): 830Special Judge Problem Description Your old uncle Tom inherited a piece of land from…
Uncle Tom's Inherited Land* Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 203 Accepted Submission(s): 132   Problem Description Your old uncle Tom inherited a piece of land from his great-great-…
B. Uncle Tom's Inherited Land* Time Limit: 1000ms Memory Limit: 32768KB 64-bit integer IO format: %I64d      Java class name: Main Special Judge   Your old uncle Tom inherited a piece of land from his great-great-uncle. Originally, the property had b…
一个经典的构图:对格子进行黑白染色,黑白的点分别作XY部的点. 这一题的边就是可以出售的单位面积2的土地,边的端点就是这个土地占用的X部和Y部的两个点. 这样就建好二分图,要求最多土地的答案显然是这个二分图的最大边独立集,也就是最大匹配. #include<cstdio> #include<cstring> #include<algorithm> #include<queue> using namespace std; #define MAXN 11111…