随笔分类 -  ACM — KMP

摘要:http://poj.org/problem?id=2406Power StringsTime Limit:3000MSMemory Limit:65536KTotal Submissions:27003Accepted:11311DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of 阅读全文
posted @ 2013-07-23 16:39 crazy_apple 阅读(257) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=1961PeriodTime Limit:3000MSMemory Limit:30000KTotal Submissions:10855Accepted:4995DescriptionFor 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 阅读全文
posted @ 2013-05-30 22:18 crazy_apple 阅读(226) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2594Problem DescriptionHomer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for example. I want to find out if I have a talent in politics, OK? Marge: OK. Homer: So I take som 阅读全文
posted @ 2013-01-01 19:53 crazy_apple 阅读(202) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1686Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fa 阅读全文
posted @ 2012-12-31 13:22 crazy_apple 阅读(105) 评论(0) 推荐(0)