
字符串
GYD_01
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU-2203-亲和串-kmp算法
亲和串Problem Description人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环原创 2017-11-18 20:50:38 · 317 阅读 · 0 评论 -
HDU-4545-魔法串
魔法串Problem Description 小明和他的好朋友小西在玩一个新的游戏,由小西给出一个由小写字母构成的字符串,小明给出另一个比小西更长的字符串,也由小写字母组成,如果能通过魔法转换使小明的串和小西的变成同一个,那么他们两个人都会很开心。这里魔法指的是小明的串可以任意删掉某个字符,或者把某些字符对照字符变化表变化。如: 小西的串是 abba; 小明的串是 addba; ...原创 2018-03-13 21:07:01 · 169 阅读 · 0 评论 -
HDU-2549-壮志难酬(水)
壮志难酬Problem Description话说MCA山上各路豪杰均出山抗敌,去年曾在江湖威名显赫的,江湖人称<万军中取上将首级舍我其谁>的甘露也不甘示弱,“天将降大任于斯人也,必先劳其筋骨,饿其体肤,空乏其身”他说。可惜,由于去年取上将首级时不慎右手右关节第七次骨折,养伤达一年之久,空有一腔抱负却壮志难酬,如今天下危亡,习武之人又怎能袖手旁观,于是他决定出山协助威士忌共抗辽贼,这时...原创 2018-03-08 19:17:09 · 194 阅读 · 0 评论 -
HDU 1048 The Hardest Problem Ever(字符串处理)
TheHardest Problem EverProblem DescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive,原创 2018-01-26 15:01:41 · 215 阅读 · 0 评论 -
HDU-1020 Encoding (字符串)
EncodingProblem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k same characters should be encoded to "kX" w原创 2018-01-26 14:48:30 · 300 阅读 · 0 评论 -
HDU1711-Number Sequence
Number SequenceProblem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a num原创 2017-12-18 20:15:03 · 935 阅读 · 0 评论 -
剪花布条-简单字符串匹配
剪花布条Problem Description一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小原创 2017-11-25 17:08:05 · 505 阅读 · 0 评论 -
Immediate Decodability-字典树
Immediate DecodabilityProblem DescriptionAn 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 assum原创 2017-11-25 16:55:40 · 342 阅读 · 0 评论 -
Word Amalgamation—— 个人c++解
Problem 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, but in order to find the letters that appear i原创 2017-05-02 21:15:49 · 668 阅读 · 1 评论 -
Binary String Matching——个人c++解
描述 Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as a substring of B? For example, the text string B is ‘1001110110’ whil原创 2017-05-04 19:17:00 · 455 阅读 · 1 评论 -
魔咒词典——个人c++解
Problem Description哈利波特在魔法学校的必修课之一就是学习魔咒。据说魔法世界有100000种不同的魔咒,哈利很难全部记住,但是为了对抗强敌,他必须在危急时刻能够调用任何一个需要的魔咒,所以他需要你的帮助。给你一部魔咒词典。当哈利听到一个魔咒时,你的程序必须告诉他那个魔咒的功能;当哈利需要某个功能但不知道该用什么魔咒时,你的程序要替他找到相应的魔咒。如果他要的魔咒不在词原创 2017-05-06 17:40:50 · 1319 阅读 · 1 评论 -
河南省第十届acm省赛-谍报分析——个人c++解
题目描述“八一三”淞沪抗战爆发后,***几次准备去上海前线视察和指挥作战。但都因为宁沪之间的铁路和公路遭到了敌军的严密封锁,狂轰滥炸,一直未能成行。***特科组织,其主要任务是保卫***的安全,了解和掌握敌方的动向。经过一段时间的监听,谍报组获取了敌方若干份密报,经过分析,发现密文中频繁出现一些单词,情报人员试图从单词出现的次数中,推出敌军的行动计划。请你编程,快速统计出频原创 2017-05-24 19:56:39 · 473 阅读 · 1 评论 -
2017年上海金马五校程序设计竞赛:Find Palindrome
DescriptionGiven a string S, which consists of lowercase characters, you need to find the longest palindromic sub-string.A sub-string of a string S is another string S' that occurs "in" S. F原创 2017-06-05 22:03:22 · 469 阅读 · 1 评论 -
HDU-1591-Encoded Love-letter
Encoded Love-letterProblem DescriptionAfter Gardon had got Angel's letter, he found it was encoded...Oh my god, why did she encode a love-letter?? But don't worry, she wrote the algorithm for encoding...原创 2018-04-21 16:44:16 · 242 阅读 · 0 评论