标签 - 后缀自动机

TCO的神题真的做不动了 不如换换脑袋吧 E Palindromes in a Tree 题意:给你一棵N" role="presentation" style="position: relative;">NNN个点的树,每一个点有一个字母′a′−′t′" role="presentation" style="position: relative;">′a′−′t′′a′−′t′'a'-'t',对每个点回答有多少经过它的路径是回文的。一条路径回文当且仅当它的
Bomboslav set up a branding agency and now helps companies to create new logos and advertising slogans. In term of this problems, slogan of the company should be a non-empty substring of its name. For example, if the company name is "hornsandhoofs", then substrings "sand" and "hor" could b
? 解题记录 ? ? 后缀自动机 ? ? Splay ?    2018-07-24 17:51:37    347    0    0
Description懒得写背景了,给你一个字符串init,要求你支持两个操作 (1):在当前字符串的后面插入一个字符串 (2):询问字符串s在当前字符串中出现了几次?(作为连续子串) 你必须在线支持这些操作。 Input第一行一个数Q表示操作个数 第二行一个字符串表示初始字符串init 接下来Q行,每行2个字符串Type,Str Type是ADD的话表示在后面插入字符串。 Type是QUERY的话表示询问某字符串在当前字符串中出现了几次。 为了体现在线操作,你需要维护一个变量mask,初始值为0       读入串Str之后,使用这个过程将之解码成真
? 解题记录 ? ? 洛谷 ? ? 后缀自动机 ?    2018-01-16 08:08:27    566    0    0
题目描述给定两个字符串,求出在两个字符串中各取出一个子串使得这两个子串相同的方案数。两个方案不同当且仅当这两个子串中有一个位置不同。 输入输出格式输入格式:   两行,两个字符串s1,s2,长度分别为n1,n2。1 <=n1, n2<= 200000,字符串中只有小写字母   输出格式:   输出一个整数表示答案   输入输出样例输入样例#1: 复制aabb bbaa 输出样例#1: 复制10​​把两个串串起来加”#“建立”广义“后缀自动机。对于一个节点记录两个信息。一个维护在前一个字符串中出现的次数,一个维护在后一个字
? 解题记录 ? ? SPOJ ? ? 后缀自动机 ? ? 动态规划 ?    2017-10-01 12:59:43    421    0    0
A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called factor, is a consecutive sequence of characters occurrences at least once in a string. Now your task is a bit harder, for some given strings, find the l
? 解题记录 ? ? 后缀自动机 ? ? 动态规划 ?    2017-10-01 11:19:28    583    0    0
Long Long Message Time Limit: 4000MS Memory Limit: 131072KTotal Submissions: 31899 Accepted: 12873Case Time Limit: 1000MS Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getti
? 解题记录 ? ? SPOJ ? ? 后缀自动机 ? ? 补档计划第一期 ?    2017-08-31 20:19:13    526    0    0
LCS - Longest Common Substringno tags  A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called factor, is a consecutive sequence of characters occurrences at least once in a string. Now your task is si
? 解题记录 ? ? 后缀自动机 ?    2017-07-18 12:27:06    568    0    0
                                                     Glass BeadsDescriptionOnce upon a time there was a famous actress. As you may expect, she played mostly Antique