![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
后缀数组
luckyone2014
想思路是苦涩艰辛的,但是打代码是愉快的。
展开
-
URAL 1517 Freedom of Choice 后缀数组 入门
1517. Freedom of ChoiceTime limit: 2.0 secondMemory limit: 64 MBBackgroundBefore Albanian people could bear with the freedom of speech (this story is fully described in the problem "原创 2015-02-12 09:54:06 · 487 阅读 · 0 评论 -
URAL 1297 Palindrome 后缀数组
题意: 输入一个串,输出里面最长的回文子串。做法:后缀数组 比如 输入abc 。 那构造串 abc#cba。 然后用后缀数组模版。 初始化RMQ后,枚举任意一个在#前面的点,奇回文和偶回文都各自考虑下,用lcp,找出后缀i,j的最长公共前缀。得到的最大的就是最长回文子串了。原创 2015-03-07 20:30:36 · 746 阅读 · 0 评论