
马拉车
文章平均质量分 81
Unin88
这个作者很懒,什么都没留下…
展开
-
hdu 5371 Hotaru's problem
#pragma comment(linker, "/STACK:102400000,102400000") #include #include #include #include #include #include using namespace std; const int M = (1 << 17); const int mod = 1e9 + 7; int n; vecto原创 2015-08-13 13:51:32 · 655 阅读 · 0 评论 -
Manacher算法(来自戴神的博客)
Manacher算法 Manacher算法是查找一个字符串的最长回文子串的线性算法。 在介绍算法之前,首先介绍一下什么是回文串,所谓回文串,简单来说就是正着读和反着读都是一样的字符串,比如abba,noon等等,一个字符串的最长回文子串即为这个字符串的子串中,是回文串的最长的那个。 计算字符串的最长回文字串最简单的算法就是枚举该字符串的每一个子串,并且判断这个子串是否为回文串,这个算法的时间原创 2015-08-13 09:10:00 · 559 阅读 · 0 评论