![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
回文自动机
Top_Spirit
我的指针已经找了他的对象,而我呢?
展开
-
拉拉队排练 HYSBZ - 2160 (回文自动机 + 快速幂)
艾利斯顿商学院篮球队要参加一年一度的市篮球比赛了。拉拉队是篮球比赛的一个看点,好的拉拉队往往能帮助球队增加士气,赢得最终的比赛。所以作为拉拉队队长的楚雨荨同学知道,帮助篮球队训练好拉拉队有多么的重要。拉拉队的选拔工作已经结束,在雨荨和校长的挑选下,n位集优秀的身材、舞技于一体的美女从众多报名的女生中脱颖而出。这些女生将随着篮球队的小伙子们一起,和对手抗衡,为艾利斯顿篮球队加油助威。一个阳光明媚的...原创 2019-02-14 17:21:38 · 217 阅读 · 1 评论 -
CodeForces - 17E Palisection (回文自动机)
n an English class Nick had nothing to do at all, and remembered about wonderful strings called palindromes. We should remind you that a string is called a palindrome if it can be read the same way b...原创 2019-02-15 10:29:46 · 165 阅读 · 0 评论 -
Palindromic Tree——回文树(回文自动机)
Palindromic Tree。中译过来就是——回文树。 那么这个回文树有何功能? 假设我们有一个串S,S下标从0开始,则回文树能做到如下几点: 1.求串S前缀0~i内本质不同回文串的个数(两个串长度不同或者长度相同且至少有一个字符不同便是本质不同) 2.求串S内每一个本质不同回文串出现的次数 3.求串S内回文串的个数(其实就是1和2结合起来) 4.求以下标i结尾的回文串的个数 ...原创 2019-02-14 14:27:49 · 537 阅读 · 1 评论 -
Palindromes and Super Abilities URAL - 1960 (回文自动机)
After solving seven problems on Timus Online Judge with a word “palindrome” in the problem name, Misha has got an unusual ability. Now, when he reads a word, he can mentally count the number of uniqu...原创 2019-02-14 15:07:08 · 128 阅读 · 0 评论 -
最长双回文串 HYSBZ - 2565(回文自动机)
顺序和逆序读起来完全一样的串叫做回文串。比如 acbca 是回文串,而 abc 不是( abc 的顺序为 “abc” ,逆序为 “cba” ,不相同)。输入长度为 n 的串 S ,求 S 的最长双回文子串 T, 即可将 T 分为两部分 X , Y ,( |X|,|Y|≥1 )且 X 和 Y 都是回文串。 Input 一行由小写英文字母组成的字符串S。 Output 一行一个整数,表示最长...原创 2019-02-14 15:25:37 · 180 阅读 · 1 评论 -
I - I Love Palindrome String 19多校(回文自动机+hash)
You are given a string S=s1s2..s|S| containing only lowercase English letters. For each integer i∈[1,|S|] , please output how many substrings slsl+1...sr satisfy the following conditions: ∙ r−l+1 equ...原创 2019-08-22 19:23:10 · 214 阅读 · 0 评论 -
Palindromes and Super Abilities (回文自动机)
After solving seven problems on Timus Online Judge with a word “palindrome” in the problem name, Misha has got an unusual ability. Now, when he reads a word, he can mentally count the number of uniqu...原创 2019-09-12 18:30:23 · 178 阅读 · 0 评论 -
CA Loves Palindromic (回文自动机)
CA loves strings, especially loves the palindrome strings. One day he gets a string, he wants to know how many palindromic substrings in the substring S[l,r] . Attantion, each same palindromic subst...原创 2019-09-12 19:46:02 · 157 阅读 · 0 评论