![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
哈希
文章平均质量分 71
acblacktea
永不放弃
展开
-
poj 初级训练计划数据结构总结
两个下午一个晚上搞完了还是学到很多东西的。poj 1035,3080,1936简单C语言题。3080可以KMP,但数据水可以枚举,KMP的话就是把第一个串的所有子串与下面几个串匹配难度也不大。 poj 2388 就是sort. poj 2299 求逆序数==归并排序 当两个区间都排好时合并时你就可以跳跃性的直接求一个数和别的数有几个逆序而不是一个一个都比过来。这题可以当归并排序模板。 总体来说原创 2016-04-30 00:04:56 · 975 阅读 · 0 评论 -
hdoj-1800-Flying to the Mars ELFhash模板
#include<cstdio> #include<cstring> #define max 3007 int n,am[max],ans,hash[max]; inline int ELFhash(char *str) { int h = 0,k; while(*str) { h = (h<<4) + *str++; k = h&0xf0000000L;原创 2016-03-08 21:51:42 · 261 阅读 · 0 评论