上一页 1 2 3 4 5 6 ··· 11 下一页

2013年5月31日

poj 1611

摘要: 并查集的入门题吧,了解了简单的思想~~~ 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime>10 #include <set>11 #include <string.h 阅读全文

posted @ 2013-05-31 12:06 kakamilan 阅读(173) 评论(0) 推荐(0) 编辑

2013年5月30日

poj 3253

摘要: 哈夫曼树,挺有意思的~~~ 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime>10 #include <set>11 #include <string.h>12 阅读全文

posted @ 2013-05-30 21:44 kakamilan 阅读(160) 评论(0) 推荐(0) 编辑

poj 2151

摘要: 实在没有发现这个题和二分查找或hash有啥关系.... 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime>10 #include <set>11 #include <s 阅读全文

posted @ 2013-05-30 20:52 kakamilan 阅读(138) 评论(0) 推荐(0) 编辑

2013年5月27日

srm 580 div1

摘要: 要答辩,木有时间啊,练习了一下,依旧不给力,只能做出第一个,啥时候第二个能轻易做出来,也就说明我进步了吧~~~1、离散所有点就可以了 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime>1 阅读全文

posted @ 2013-05-27 21:33 kakamilan 阅读(194) 评论(0) 推荐(0) 编辑

2013年5月19日

srm 579 DIV1

摘要: 1、div的水平太难了,加上clean code看多了,写的太长了,凑活着看吧.... 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <stack> 8 #include <algorithm> 9 #include <list>10 #include <ctime> 阅读全文

posted @ 2013-05-19 01:58 kakamilan 阅读(247) 评论(0) 推荐(0) 编辑

2013年5月18日

poj 3274

摘要: hash的算法倒是没神马收获,倒是感觉这两天看clean code很管用,调试代码的时间大幅度下降了。错啊,要是hash函数写的好的话,会快很多的。附更快版本的hash函数,简单的修改即可。1 int hashval(int pos) {2 int res = 0;3 for (int i = 1; i < k; i++) {4 res = (res + dp[pos][i] + maxarray - dp[pos][0]) % maxarray;5 }6 return res;7 } 1 #include <iostream> 2 #inc... 阅读全文

posted @ 2013-05-18 12:31 kakamilan 阅读(149) 评论(0) 推荐(0) 编辑

2013年5月17日

poj 3349

摘要: 了解到hash表的一点皮毛 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime>10 #include <set>11 #include <cstring>12 # 阅读全文

posted @ 2013-05-17 20:37 kakamilan 阅读(185) 评论(0) 推荐(0) 编辑

poj2388 poj2299

摘要: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime>10 #include <set>11 #include <cstring>12 #include <qu 阅读全文

posted @ 2013-05-17 16:28 kakamilan 阅读(164) 评论(0) 推荐(0) 编辑

poj1936

摘要: 简单的查找就可以了 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime>10 #include <set>11 #include <cstring>12 #incl 阅读全文

posted @ 2013-05-17 13:16 kakamilan 阅读(128) 评论(0) 推荐(0) 编辑

poj 3080

摘要: kmp算法水过,又重新熟悉了一下str的几个函数 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <cstdlib> 5 #include <cmath> 6 #include <map> 7 #include <algorithm> 8 #include <list> 9 #include <ctime> 10 #include <set> 11 #include <cs 阅读全文

posted @ 2013-05-17 12:22 kakamilan 阅读(209) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 11 下一页

导航