![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hihoCoder
小咸鱼_
这个作者很懒,什么都没留下…
展开
-
hihoCoder#1014_Trie树
关于Trie树: Tries树详解及其应用题目连接:hihoCoder#1014我的AC代码:#include #include typedef struct TrieNode{ int count; TrieNode *next[26];}TTree_Node;void Create(TTree_Node *& root){ root = new TTree_Nod原创 2016-03-30 10:40:16 · 827 阅读 · 0 评论 -
hihoCoder#1015_KMP算法
题目:KMP算法我的ac代码:#include #include void GetNext(const std::string T, int *& next){ int i = 0; int j = -1; int len = T.length(); next[0] = -1; while (i < len) { if (j == -1 || T[i] == T[j]原创 2016-03-31 11:07:14 · 1382 阅读 · 2 评论 -
hihoCoder#1032_最长回文子串
求最长回文子串的算法比较经典的是manacher算法,下面写写自己的理解。(文中用到的图片来自这里,博主写的很好,由于为了图片和代码一致,我稍微p了一下图片。)首先,说明一下用到的数组和其他参数的含义:(1): 以字符串中下标为的字符为中心的回文子串半径长度;例如:字符串,那么, (以b为中心的回文子串是,半径长度为2。计算半径时包括b本身)原创 2016-04-02 19:37:58 · 2491 阅读 · 0 评论