字符串
敬宅神社
(x^2 + (9/4)y^2 + z^2 - 1)^3 - x^2z^3 - (9/80)y^2z^3 = 0
展开
-
KMP + AC + 后缀
这几天学习了有关字符串的算法:贴几个模板KMP :void GetNext(string &a){ memset(next,0,sizeof(next)); int len = a.length(); int j,i; next[0] = -1; j = -1;i = 0; while(i < len) { if(j == -1 || a[j] == a[i])原创 2015-04-27 19:20:52 · 320 阅读 · 0 评论 -
POJ 2774
点击打开链接 题目链接可以用hash 和后缀数组两种方法。(用hash 的话标记hash 要自己手打hash_map,stl超时了)#include#include#include#include#includeusing namespace std;typedef unsigned long long LL;const int maxn = 100000 + 23;c原创 2015-04-27 19:14:47 · 237 阅读 · 0 评论