2012年8月6日

POJ 2406 Power Strings(KMP next[]函数)

摘要: Power StringsTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 23112Accepted: 9691DescriptionGiven 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 concatenation as multiplica 阅读全文

posted @ 2012-08-06 22:09 kuangbin 阅读(563) 评论(0) 推荐(0) 编辑

POJ 1961 Period(KMP求一个串的重复子串)

摘要: PeriodTime Limit: 3000MSMemory Limit: 30000KTotal Submissions: 9696Accepted: 4428DescriptionFor each prefix of a given string S with N characters (eac... 阅读全文

posted @ 2012-08-06 21:46 kuangbin 阅读(2480) 评论(1) 推荐(0) 编辑

HDU 1711 Number Sequence (KMP找子串第一次出现的位置)

摘要: Number SequenceTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5898Accepted Submission(s): 2652Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 100 阅读全文

posted @ 2012-08-06 21:17 kuangbin 阅读(752) 评论(0) 推荐(0) 编辑

POJ 3461 Oulipo(KMP统计子串出现次数)

摘要: OulipoTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12818Accepted: 5128DescriptionThe 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’a 阅读全文

posted @ 2012-08-06 21:15 kuangbin 阅读(2596) 评论(0) 推荐(0) 编辑

POJ 1056 IMMEDIATE DECODABILITY(字典树,判断有没有一个是另一个的前缀)

摘要: IMMEDIATE DECODABILITYTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8895Accepted: 4222DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all codes are in 阅读全文

posted @ 2012-08-06 12:41 kuangbin 阅读(1800) 评论(2) 推荐(0) 编辑

HDU 1247 Hat’s Words(字典树)

摘要: Hat’s WordsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3565Accepted Submission(s): 1355Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to find all the ha 阅读全文

posted @ 2012-08-06 10:50 kuangbin 阅读(1450) 评论(0) 推荐(0) 编辑

导航

JAVASCRIPT: