随笔分类 -  字符串-sam(后缀自动机)

摘要:后缀自动机ins解释 图片: 如字符串$abcbcd$ 后缀自动机 parent树 阅读全文
posted @ 2018-12-13 13:11 整理者 阅读(202) 评论(0) 推荐(0)
摘要:本题同 "这题" 阅读全文
posted @ 2018-12-11 19:13 整理者 阅读(168) 评论(0) 推荐(0)
摘要:Given a string, we need to find the total number of its distinct substrings. Input $T $ number of test cases. $T using namespace std; const int N=1000 阅读全文
posted @ 2018-12-11 19:11 整理者 阅读(196) 评论(0) 推荐(0)
摘要:佳媛姐姐过生日的时候,她的小伙伴从某东上买了一个生日礼物。生日礼物放在一个神奇的箱子中。箱子外边写了 一个长为$n$的字符串$s$,和$m$个问题。佳媛姐姐必须正确回答这$m$个问题,才能打开箱子拿到礼物,升职加薪,出任CE O,嫁给高富帅,走上人生巅峰。每个问题均有$a,b,c,d$四个参数,问你 阅读全文
posted @ 2018-12-10 20:33 整理者 阅读(288) 评论(1) 推荐(0)
摘要:由于春希对于第二世代操作的不熟练,所以刚使用完$invasion process$便掉落到了世界线之外,错综复杂的平行世界信息涌入到春希的意识中。春希明白了事件的真相。 在一个冬马与雪菜同时存在的世界里,傲娇的冬马最终还是博得了春希的内心。然而看着好友雪菜的消瘦,内心愧疚的冬马启动了第二世代操作,想 阅读全文
posted @ 2018-12-10 20:17 整理者 阅读(235) 评论(0) 推荐(0)
摘要:幽香是全幻想乡里最受人欢迎的萌妹子,这天,是幽香的2600岁生日,无数幽香的粉丝到了幽香家门前的太阳花田上来为幽香庆祝生日。 粉丝们非常热情,自发组织表演了一系列节目给幽香看。幽香当然也非常高兴啦。 这时幽香发现了一件非常有趣的事情,太阳花田有$n$块空地。在过去,幽香为了方便,在这$n$块空地之间 阅读全文
posted @ 2018-12-10 20:07 整理者 阅读(140) 评论(0) 推荐(0)
摘要:对于一个给定长度为$N$的字符串,求它的第$K$小子串是什么。 Input 第一行是一个仅由小写英文字母构成的字符串$S$ 第二行为两个整数$T$和$K$,$T$为0则表示不同位置的相同子串算作一个。$T=1$则表示不同位置的相同子串算作多个。$K$的意义如题所述。 Output 输出仅一行,为一个 阅读全文
posted @ 2018-12-10 19:55 整理者 阅读(148) 评论(0) 推荐(0)
摘要:A string is finite sequence of characters over a non empty finite set $\sum$. In this problem, $\sum$ is the set of lowercase letters. Substring, also 阅读全文
posted @ 2018-12-10 18:39 整理者 阅读(218) 评论(0) 推荐(0)
摘要:A string is finite sequence of characters over a non empty finite set $\sum$. In this problem, $\sum$ is the set of lowercase letters. Substring, also 阅读全文
posted @ 2018-12-10 18:26 整理者 阅读(227) 评论(0) 推荐(0)
摘要:Little Daniel loves to play with strings! He always finds different ways to have fun with strings! Knowing that, his friend Kinan decided to test his 阅读全文
posted @ 2018-12-10 17:54 整理者 阅读(423) 评论(0) 推荐(0)
摘要:You are given a string $S$ which consists of 250000 lowercase latin letters at most. We define $F(x)$ as the maximal number of times that some string 阅读全文
posted @ 2018-12-10 17:36 整理者 阅读(202) 评论(0) 推荐(0)