hash
文章平均质量分 72
Viko_ReCode
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 1496 Equations
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1496 #include #include int hash[2001000], p[101]; int main( ) { int a, b, c, d; for(int i=1; i<101; i++) p[i] = i*i; while(~scanf(原创 2013-10-09 23:49:13 · 393 阅读 · 0 评论 -
POJ 2503 Babelfish
题目链接:http://poj.org/problem?id=2503 #include #include #define MAXSIZE 150000 //#define maxn 30 #define kind 20 const int MOD = 131101; //一个大质数 struct HASH { char pre[kind], now[kind];原创 2013-10-13 01:24:33 · 455 阅读 · 0 评论 -
各种字符串Hash函数比较
原文地址:https://www.byvoid.com/blog/string-hash-compare/ 常用的字符串Hash函数还有ELFHash,APHash等等,都是十分简单有效的方法。这些函数使用位运算使得每一个字符都对最后的函数值产生影响。另外还有以MD5和SHA1为代表的杂凑函数,这些函数几乎不可能找到碰撞。 常用字符串哈希函数有BKDRHash,APHash转载 2013-10-13 18:41:11 · 510 阅读 · 0 评论 -
POJ 1200 Crazy Search (RKhash)
题目链接:http://poj.org/problem?id=1200 #include #include const int N = 16666666; bool hash[16666666]; int letr[26]; char s[N]; int pow(int a, int b) { int r = 1, base = a; while(b) {原创 2013-10-13 17:39:10 · 744 阅读 · 0 评论 -
BNU 34990 Justice String (hash+二分求LCP)
题意:给出字符串A和字符串B,找出原创 2014-08-30 10:52:06 · 595 阅读 · 0 评论
分享