随笔分类 - kmp
摘要:题目链接:点击打开链接题意:给你一个串,让你在串后面添加尽可能少的字符使得这个串变成回文串。思路:这题可以kmp,manacher,后缀数组三种方法都可以做,kmp和manacher效率较高,时间复杂度是O(n),后缀数组时间复杂度是O(nlogn).思路是求出元串的...
阅读全文
摘要:Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 532 Accepted Submission(s):...
阅读全文
摘要:Problem DescriptionClairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and sh...
阅读全文
摘要:Problem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s...
阅读全文
摘要:DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA fro...
阅读全文
摘要:DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names...
阅读全文
摘要:DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcd...
阅读全文
摘要:题目描述There is a string A. The length of A is less than 1,000,000. I rewrite it again and again. Then I got a new string: AAAAAA...... N...
阅读全文
摘要:Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a mem...
阅读全文
摘要:Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 #includeint s1[1000005...
阅读全文
摘要:Problem Description人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且...
阅读全文