随笔分类 -  数据结构 ---- 字符串

hdu 1403 Longest Common Substring
摘要:Problem DescriptionGiven two strings, you have to tell the length of the Longest Common Substring of them.For example:str1 = bananastr2 = cianaicSo the Longest Common Substring is "ana", and the length is 3.InputThe input contains several test cases. Each test case contains two strings, ea 阅读全文

posted @ 2013-05-03 21:47 江财小子 阅读(220) 评论(0) 推荐(0)

UVALive 3026 Period KMP 失配函数处理周期的问题
摘要: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 each i (2 ≤ i ≤ N) we want to know the largest K > 1 (if there is one) such that the prefix of S with lengt 阅读全文

posted @ 2013-04-10 21:37 江财小子 阅读(229) 评论(0) 推荐(0)

UVA 11732 Trie树应用
摘要:strcmp() Anyone? Time Limit:2000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 11732Appoint description:DescriptionJ“strcmp()” Anyone?Input: Standard InputOutput: Standard Outputstrcmp() is a library function in C/C++ which compares two strings. It takes two strings as 阅读全文

posted @ 2013-04-10 12:16 江财小子 阅读(1545) 评论(0) 推荐(0)

la 3942 Trie数应用
摘要:Remember the Word Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit StatusAppoint description:DescriptionNeal is very curious about combinatorial problems, and now here comes a problem about words. Knowing that Ray has a photographic memory and this may not trouble him, Neal 阅读全文

posted @ 2013-04-10 00:05 江财小子 阅读(452) 评论(0) 推荐(0)

hdu 1075 What Are You Talking About Trie树
摘要:What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 8824Accepted Submission(s): 2768Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian 阅读全文

posted @ 2013-04-09 17:50 江财小子 阅读(178) 评论(0) 推荐(0)

hdu 1671 Phone List Trie 基础模板
摘要:Phone ListTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6134Accepted Submission(s): 2085Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone cata 阅读全文

posted @ 2013-04-09 10:41 江财小子 阅读(137) 评论(0) 推荐(0)

hdu 1113 Word Amalgamation
摘要:Word AmalgamationTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1583Accepted Submission(s): 729Problem DescriptionIn millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, 阅读全文

posted @ 2012-07-29 21:35 江财小子 阅读(697) 评论(0) 推荐(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): 3431Accepted Submission(s): 1303Problem 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-07-27 16:11 江财小子 阅读(129) 评论(0) 推荐(0)

蛋疼的英语(set)
摘要:蛋疼的英语Time Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 23Accepted Submission(s) : 12Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Descriptionjxust_acm 队的同学都知道Xianbin5的英语特别差,因而他每次比赛都要队友来给他翻译题目,然而现在队友回家了,他为了提高英语,决定看一篇很长的英文文章, 文章有N个单词(0# 阅读全文

posted @ 2012-07-24 10:09 江财小子 阅读(250) 评论(0) 推荐(0)

hdu 2203 亲和串
摘要:亲和串Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3732Accepted Submission(s): 1670Problem Description 人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。 亲和串的定义是这样... 阅读全文

posted @ 2012-07-23 08:46 江财小子 阅读(236) 评论(0) 推荐(0)