kurXX最小生成树#include #include #include using
namespace std;#define M 501#define LIM 20000000struct edg{ int u,v; int
w;}all_e[M*M/2];bool operator > t; ...
分类:
其他好文 时间:
2014-05-10 00:29:13
阅读次数:
470
题目如下:
Parentheses Balance
You are given a string consisting of parentheses () and []. A string of this type is said to be correct:
(a)
if it is the empty string
(b)
if A and B are ...
分类:
其他好文 时间:
2014-05-09 20:57:46
阅读次数:
316
http://acm.hdu.edu.cn/showproblem.php?pid=1507
大致题意:在一个n*m的格子上,黑色的地方不可用,问在白色格子上最多可放多少1*2的矩阵。
思路:建图,每个白色格子与它临近的上下左右的白色格子建边,求最大匹配,答案为最大匹配/2,因为是双向图。最后输出匹配边时,当找到一组匹配边记得将该边标记,以防重复计算。
#includ...
分类:
其他好文 时间:
2014-05-09 15:11:09
阅读次数:
300
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=2461
Rectangles
Time Limit: 5000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1268 Accepted Subm...
分类:
其他好文 时间:
2014-05-09 15:02:18
阅读次数:
394
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4535
How Many Sets I
Time Limit: 2 Seconds Memory Limit: 65536 KB
Give a set S, |S| = n, then how many ordered set g...
分类:
其他好文 时间:
2014-05-09 13:50:00
阅读次数:
347
Pie
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 9653
Accepted: 3478
Special Judge
Description
My birthday is coming up and traditionally I'm serv...
分类:
其他好文 时间:
2014-05-09 06:33:22
阅读次数:
343
题目如下:
Problem D: ShellSort
He made each turtle stand on another one's back
And he piled them all up in a nine-turtle stack.
And then Yertle climbed up. He sat down on the pile.
What a wonderful v...
分类:
其他好文 时间:
2014-05-09 06:20:44
阅读次数:
396
有一种题目,他们很奇葩,没有方法,只有人品!...
分类:
其他好文 时间:
2014-05-09 06:08:24
阅读次数:
460
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1711题目意思:给出一条有n个数的序列a[1],a[2],......,a[n],和一条有m
个数的序列b[1],b[2],......,b[m],求出b[1],b[2],...,b[m]在序列a中完全匹...
分类:
其他好文 时间:
2014-05-09 05:53:04
阅读次数:
268