题意与分析 题意是这样的:给你一个\(N\times M\)的图,其中有一些点不能放置\(1\times 2\)大小的矩形,矩形可以横着放可以竖着放,问剩下的格子中,最多能够放多少个矩形. 注意到是\(1\times 2\)的矩形,所以是一个\(i+j\)和为奇数的可以与\(i+j\)为偶数的相连.抽象坐标和分别为奇数.偶数的为二分图的两个点集,可构建的矩形为边,那么剩下要做的就是二分图的最大匹配. 比较有趣的是具体实现.先把可以匹配的点单独拎出来,然后根据这些点建图.具体怎么建的呢?给每个可以…
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): 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): 203 Accepted Submission(s): 132   Problem Description Your old uncle Tom inherited a piece of land from his great-great-…
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…
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…
题意与分析(CodeForces 551B) 这他妈哪里是日常训练,这是日常弟中弟. 题意是这样的,给出一个字符串A,再给出两个字符串B,C,求A中任意量字符交换后(不限制次数)能够得到的使B,C作为子串不重叠且出现次数最多的串. 看起来很简单对吧,做法也很简单,先排序字符,然后枚举合法的B串能在A串中出现的次数,看能有几个C串,然后求个最优解就行了.是不是很简单?然后WA了十几发,各种捉bug,太杀妈了. 这份代码看起来贼简单,这是我写的第三版了.... 这种字符串题目太苦手了QAQ 代码 #…
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…
与其说是训练不如说是重温.重新写了Java版本的代码. import java.util.*; import java.math.*; import java.io.BufferedInputStream; public class Main { static class Node { int r, c, t; public Node(int _r, int _c) { this(_r, _c, 0); } public Node(int _r, int _c, int _t) { r=_r;…