随笔分类 -  字符串

摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5414题意:给定字符串s和t,可以在s里面选一个字符c,然后任选一个字符d(d!=c)将d插入到c的后面,问能不能将s变为t。分析:只要前面t串连续的字符==s字符串,而且保证s是t的子串。本来想不通s:aabaa... 阅读全文
posted @ 2015-08-22 11:08 疯狂的癫子 阅读(299) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1225一道超级简单的题,就因为我忘记写return,就wa好久,拜托我自己细心一点。学习的地方:不过怎么查找字符串并返回下标Football ScoreTime Limit: 2000/1000 MS (Java/... 阅读全文
posted @ 2014-08-13 11:39 疯狂的癫子 阅读(584) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=1782Run Length EncodingTime Limit:1000MSMemory Limit:30000KTotal Submissions:3907Accepted:1282DescriptionYour task is to write a program that performs a simple form of run-length encoding, as described by the rules below.Any sequence of between 2 to 9 identical characters i 阅读全文
posted @ 2013-12-02 20:27 疯狂的癫子 阅读(342) 评论(0) 推荐(0)
摘要:SubstringsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6238Accepted Submission(s): 2767 Problem DescriptionYou are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse. 阅读全文
posted @ 2013-08-17 11:41 疯狂的癫子 阅读(827) 评论(0) 推荐(0)