
字符串
genuinecai
这个作者很懒,什么都没留下…
展开
-
唐纳德与子串 (Easy)(计算子串个数)
Time limit per test: 1.0 seconds Memory limit: 256 megabytes 子串的定义是在一个字符串中连续出现的一段字符。这里,我们使用 s[l…r] 来表示 s 字符串从 l 到 r(闭区间)的子串。在本题中,字符串下标从 0 开始。显然,对于长度为 n 的字符串共有 n(n+1)2 个子串。 对于一个给定的字符串 s,唐纳德给出 q 次询问,第原创 2017-12-08 22:21:07 · 729 阅读 · 0 评论 -
hdu 1358 Period (KMP求循环节)
Period For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for ea...原创 2018-04-21 17:00:59 · 143 阅读 · 0 评论