字符串
galesaur_wcy
我们一起加油啊~~~~
展开
-
Cyclic Nacklace (kmp算法循环节)
Cyclic Nacklace CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 9...原创 2018-02-10 12:36:23 · 192 阅读 · 0 评论 -
UVA10815(set运用)
Description Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of thinking ...原创 2018-07-18 09:35:01 · 143 阅读 · 0 评论 -
Hat’s Words HDU - 1247
C - Hat’s Words HDU - 1247 A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to fin...转载 2018-04-29 11:24:32 · 212 阅读 · 0 评论 -
单词数 HDU - 2072 (字典树)
F - 单词数 HDU - 2072 lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。 Input 有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写...原创 2018-04-29 11:21:02 · 170 阅读 · 0 评论 -
Immediate Decodability HDU - 1305(字符串)
Immediate Decodability HDU - 1305 An 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 pro...原创 2018-04-29 11:19:35 · 111 阅读 · 0 评论 -
D - Phone List HDU - 1671(字典树先排序)
D - Phone List HDU - 1671 Given 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 catalogue listed these numbers: 1. E...原创 2018-04-29 11:18:21 · 118 阅读 · 0 评论 -
统计难题 HDU - 1251(字典树)
Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,每行一...原创 2018-04-27 10:21:52 · 107 阅读 · 0 评论 -
B - 吉哥系列故事——完美队形II HDU - 4513 (马拉车)
吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变,且必须都是在原队形中连续的; 2、左右对称,假设有m个人形成新的队形,则第1个人和第m个人身高相同,第2个人和第m-1个人身...原创 2018-04-30 21:03:00 · 186 阅读 · 0 评论 -
Palindrome(马拉车模板)
A - Palindrome POJ - 3974Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Can you propose an efficient algorithm to ...原创 2018-04-30 20:43:51 · 249 阅读 · 0 评论 -
HDU 4825 (01字典树)
Zeus 和 Prometheus 做了一个游戏,Prometheus 给 Zeus 一个集合,集合中包含了N个正整数,随后 Prometheus 将向 Zeus 发起M次询问,每次询问中包含一个正整数 S ,之后 Zeus 需要在集合当中找出一个正整数 K ,使得 K 与 S 的异或结果最大。Prometheus 为了让 Zeus 看到人类的伟大,随即同意 Zeus 可以向人类求助。你能证明...转载 2018-04-05 16:26:32 · 90 阅读 · 0 评论 -
Count the string(kmp)
Count the string It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For ...原创 2018-02-15 20:42:50 · 180 阅读 · 0 评论 -
Seek the Name, Seek the Fame(kmp)
Seek the Name, Seek the Fame The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They se...原创 2018-02-15 18:07:31 · 111 阅读 · 0 评论 -
后缀数组模板详解
转载来自:http://blog.csdn.net/wxfwxf328/article/details/7599929 #include const int maxn=100010; int wa[maxn],wb[maxn],wv[maxn],ws[maxn]; int cmp(int *r,int a,int b,int l) {return r[a]==r[b]&&r[a+l]==r[b转载 2018-02-05 20:56:40 · 141 阅读 · 0 评论 -
后缀数组知识点
转载来自:http://blog.163.com/dut_chiyang/blog/static/19760920420119200560314/ OI笔记]后缀数组学习笔记--后缀数组解题方法总结 后缀数组是处理字符串的有力工具。后缀数组是后缀树的一个非常精巧的替代品,它比后缀树容易编程实现,能够实现后缀树的很多功能而时间复杂度也并不逊色,而且它比后缀树所占用的内存空间小很转载 2018-02-05 20:54:43 · 189 阅读 · 0 评论 -
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 (...原创 2018-02-10 13:28:17 · 313 阅读 · 0 评论 -
UVA10082
A common typing error is to place the hands on the keyboard one row to the right of the correct position. So “Q” is typed as “W” and “J” is typed as “K” and so on. You are to decode a message typed in...原创 2018-07-18 09:42:50 · 308 阅读 · 0 评论