上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 47 下一页

2012年5月9日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1671依旧是Trie树,和上一题差不太多View Code #include #include #include const int MAX=10; typedef struct Trie{ Trie *... 阅读全文
posted @ 2012-05-09 02:14 LegendaryAC 阅读(210) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1251第一道Trie树,感觉有点厉害View Code #include #include #include const int MAX=26; typedef struct Trie{ Trie *ne... 阅读全文
posted @ 2012-05-09 01:53 LegendaryAC 阅读(293) 评论(0) 推荐(0) 编辑

2012年5月8日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1102最简单的最小生成树View Code #include #include #include int p[110];int cnt,n; typedef struct L{ int a,b,d; }L... 阅读全文
posted @ 2012-05-08 11:34 LegendaryAC 阅读(193) 评论(0) 推荐(0) 编辑

2012年5月7日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1162最简单的最小生成树。。。View Code #include #include #include int p[110];int cnt,n; typedef struct L{ int a,b; ... 阅读全文
posted @ 2012-05-07 23:37 LegendaryAC 阅读(185) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1301最简单的最小生成树View Code #include #include int p[30];int cnt,n; typedef struct L{ int a,b,d;}L;L r[1000]; ... 阅读全文
posted @ 2012-05-07 22:43 LegendaryAC 阅读(171) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1166老题新做,树状数组,比线段树省了300k内存View Code #include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>const int maxn=51000;int s[maxn];int nCase=1,n;int lowbit(int i){return i&(-i);} void update(int i,int val){ while(i<= 阅读全文
posted @ 2012-05-07 12:36 LegendaryAC 阅读(160) 评论(0) 推荐(0) 编辑

2012年5月4日

摘要: 上学期接触c语言随便学了学,寒假忘了干啥,开学到现在一直在打酱油。综上,自己的近期表现就是没有表现,哦也! 阅读全文
posted @ 2012-05-04 15:45 LegendaryAC 阅读(203) 评论(0) 推荐(0) 编辑
 
摘要: 众所周知,畅畅这种生物曾经都是以狗的面貌展现在大家眼前,这就给大家造成了一种“畅畅”是狗的幻觉。不过,如果您也这么想,那就大错特错了。不同点:1、交给狗的工作你可以放心,比如看家护院神马的。不过交给“畅畅”的事情永远不能放心,因为它一定会忘记。2、可以和狗约会,但千万不要和畅畅约会。“畅畅”在99%的情况下都会放你鸽子;如果不幸赶上那1%,您就不光是不爽了。“畅畅”对突发事件的处理能力基本为0,对于路线的选择一定会精心编程计算出最长路线,并会不时发出没有丝毫建设性消极情绪。3、周一到周五,狗不上课,而畅畅一定全天30h都在上课,纳尼?你说畅畅没在上课?哦了,那他一定在考试。4、周六周日,畅畅一 阅读全文
posted @ 2012-05-04 15:10 LegendaryAC 阅读(220) 评论(0) 推荐(0) 编辑

2012年5月2日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1992hdu上很多这种砖块问题,废话少说,下面开始分析。高度是固定的,只用考虑宽度带来的影响。少一列,是dp[1]*dp[i-1]=dp[i-1]少两列,是dp[2]*dp[i-2]=5*dp[i-2],但是其中一种情况与少一列的重复,所以只有4*dp[i-2]再往后少奇数列,都只有2*dp[i](考虑可能情况并且不与前两种情况产生重复)再往后少偶数列,都只有3*dp[i](考虑可能情况并且不与前两种情况产生重复)综上分析,dp[i]=dp[i-1]+4*dp[i-2]+2*(dp[i-3]+dp[i-5]. 阅读全文
posted @ 2012-05-02 12:44 LegendaryAC 阅读(639) 评论(0) 推荐(0) 编辑

2012年5月1日

摘要: 学不会线段树,怎么办???学的上火,怎么都不懂,不懂啊有木有!!说好的所有算法都接触一下呢,怎么上来就卡在线段树了??都有简单啊,有木有!!!我怎么就学不会捏!!!给人提鞋的好歹是个人吧,我就是一条狗啊!!!啊!哦!噢!嗷!哈!呼!真不要脸!这都有脸学下去!******************** 阅读全文
posted @ 2012-05-01 14:36 LegendaryAC 阅读(150) 评论(0) 推荐(0) 编辑
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 47 下一页