搜索
laziercs
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 1514-Free Candies
/* http://acm.hdu.edu.cn/showproblem.php?pid=1514 题意是给4堆(堆的高度小于等于40)有颜色(颜色的种类小于等于20)的物品,你有一个篮子最多能装5件物品,每次从这4堆物品里面 任取一件物品放进篮子里,但是取每堆物品时,必须先取上面的物品,才能取下面的物品,如果发现篮子里 的两种物品的颜色一样,那么把这两种物品拿出来,问最后最多能拿出多原创 2012-08-28 18:48:54 · 1181 阅读 · 0 评论 -
2012 ACM/ICPC Asia Regional Changchun Online-1011(hdu4277)
//http://acm.hdu.edu.cn/showproblem.php?pid=4277 //直接搜索,加一点点剪枝; #include #include using namespace std; int num[20],sum,n,ant,tem[20]; map p[80000]; void dfs(int dep,int a,int b) { int t,c;原创 2012-09-08 22:26:38 · 727 阅读 · 0 评论 -
hdu-4284
//http://acm.hdu.edu.cn/showproblem.php?pid=4284 //先floyd,把h个点之间的最短路求出来,再就是直接对个h点爆搜,因为这里只要判断行不行,不行或行都会起到减枝作用,所以爆搜是难超时的;用h个点的终点记录状压dp应该是正解; //下面是爆搜的代码: #include #include #define inf 10000000 int原创 2012-09-09 21:50:15 · 602 阅读 · 0 评论 -
DLX 模板
//以hust1017为例 #include #include #define N 1100 #define M 1100 #define V N*M #define INF 100000000 int D[V+1],U[V+1],L[V+1],R[V+1],C[V+1],mark[V+1]; int S[M+1],H[N+1]; void remove(int c){ int i,j原创 2013-04-18 21:52:40 · 849 阅读 · 0 评论 -
zoj 1030 (dfs+几何)
//从每一个点开始,向某一个几何方向dfs搜索几何圈,然后判断几何圈里有没有其他的点,再把几何圈去重就是答案,O(n^3). #include #include #include #include #include #include using namespace std; struct Point{ int x,y; Point(int a=0,int b=0):x(a),原创 2013-07-12 20:04:15 · 981 阅读 · 0 评论
分享