上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 27 下一页
摘要: 这题是跟竹子compare时发现的,一直不会打代码,今天狠狠心学了学,打完了,可以加到模板里了。/* * hdu1796/win.cpp * Created on: 2012-8-20 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue>#i 阅读全文
posted @ 2012-08-26 22:16 moonbay 阅读(151) 评论(0) 推荐(0)
摘要: 不知道杭电题目分类是咋分的,这题我是在“匹配”里找到的,太假了。这明显是计算几何加并查集嘛。当然,并查集部分很简单,主要就是计算几何了,打了两个小时,我了个去,计算几何功底还是不行啊。。。/* * hdu1558/win.cpp * Created on: 2012-8-16 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#inc 阅读全文
posted @ 2012-08-18 11:19 moonbay 阅读(170) 评论(0) 推荐(0)
摘要: 对于每一种颜色的气球都建一次图求最大匹配即可。/* * hdu1498/win.cpp * Created on: 2012-8-16 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue>#include <set>#includ 阅读全文
posted @ 2012-08-16 14:56 moonbay 阅读(171) 评论(0) 推荐(0)
摘要: 直接上代码。/* * hdu1083/win.cpp * Created on: 2012-8-16 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue>#include <set>#include <map>#inc 阅读全文
posted @ 2012-08-16 11:44 moonbay 阅读(1328) 评论(0) 推荐(0)
摘要: 一开始为建图纠结了半天,后来看了解题报告才突然明白,直接按输入建成的图,其最大匹配数为实际的图的2倍。。。/* * hdu1068/win.cpp * Created on: 2012-8-15 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue& 阅读全文
posted @ 2012-08-15 20:32 moonbay 阅读(152) 评论(0) 推荐(0)
摘要: 这题先用邻接矩阵打了试,TLE,改成邻接表,就过了。。/* * hdu1054/win.cpp * Created on: 2012-8-14 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue>#include <set>#in 阅读全文
posted @ 2012-08-15 15:34 moonbay 阅读(171) 评论(0) 推荐(0)
摘要: 连着做两道最小点集覆盖的题,直接拿上一题代码改的,都没改几句。。/* * hdu1150/win.cpp * Created on: 2012-8-14 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int MAXN = 210;int N, M, mymatch[MAXN];bool visited[MAXN], my 阅读全文
posted @ 2012-08-14 21:06 moonbay 阅读(144) 评论(0) 推荐(0)
摘要: 用匈牙利就行,比较赤裸。/* * hdu2119/win.cpp * Created on: 2012-8-13 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int MAXN = 210;int N, M, mymatch[MAXN];bool visited[MAXN], mymap[MAXN][MAXN];bool 阅读全文
posted @ 2012-08-14 19:00 moonbay 阅读(138) 评论(0) 推荐(0)
摘要: 第一眼看这题目就觉得有问题,但看讨论版还有网上别人的解题报告都没有说,仔细想想以后就确定是题目还有测试数据有问题了。当输入10 13时究竟应该输出4 78 136 10还是输出4 76 108 13呢?题目没有说明白,经测试,测试数据很水,没有这种测试数据 阅读全文
posted @ 2012-08-07 13:36 moonbay 阅读(127) 评论(0) 推荐(0)
摘要: 简单,直接上代码/* * hdu2079/win.cpp * Created on: 2012-8-2 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue>#include <set>#include <map>#in 阅读全文
posted @ 2012-08-02 15:01 moonbay 阅读(192) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 27 下一页