
字符串
西瓜君wtml
这个作者很懒,什么都没留下…
展开
-
hdu 1075 map+string
Problem Description Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves原创 2017-09-04 10:52:11 · 213 阅读 · 0 评论 -
hdu 1251 map
Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,每行一个提原创 2017-09-06 12:54:36 · 221 阅读 · 0 评论 -
hdu 1238 暴力枚举+STL
Problem Description You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the g原创 2017-09-07 15:54:48 · 242 阅读 · 0 评论 -
Y - Wow! Such Doge!
Chen, Adrian (November 7, 2013). “Doge Is An Ac- tually Good Internet Meme. Wow.”. Gawker. Retrieved November 22, 2013. Doge is an Internet meme that became popular in 2013. The meme typically con- sis原创 2017-09-15 19:23:34 · 499 阅读 · 0 评论 -
51nod 1347 旋转字符串
1347 旋转字符串S[0…n-1]是一个长度为n的字符串,定义旋转函数Left(S)=S[1…n-1]+S[0].比如S=”abcd”,Left(S)=”bcda”.一个串是对串当且仅当这个串长度为偶数,前半段和后半段一样。比如”abcabc”是对串,”aabbcc”则不是。 现在问题是给定一个字符串,判断他是否可以由一个对串旋转任意次得到。Input 第1行:给出一个字符串(字符串非空串,只原创 2017-08-14 10:02:02 · 235 阅读 · 0 评论 -
hdu 2203 亲和串
Problem Description 人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。 亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么我原创 2017-09-01 08:00:44 · 186 阅读 · 0 评论 -
hdu 1106
Problem Description 输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。Input 输入包含多组测试用例,每组输入数据只有一行数字(数字之间没有空格),这行数字原创 2017-09-02 07:52:50 · 179 阅读 · 0 评论 -
hdu 1039
Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-gen原创 2017-09-03 07:02:42 · 248 阅读 · 0 评论 -
P - How many 最小表示法+set
Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me How many kinds of necklaces total have.(if two necklaces can equal by rotating ,we say the two necklaces are原创 2017-09-14 21:31:38 · 268 阅读 · 0 评论