—字符串
文章平均质量分 83
MissZhou要努力
不晓日月,不辩兰艾,终日碌碌,安与燕雀相随乎
展开
-
ZOJ 3430 Detect the Virus ac自动机 超级精简的转化
DescriptionOne day, Nobita found that his computer is extremely slow. After several hours' work, he finally found that it was a virus that made his poor computer slow and the virus was activated b原创 2015-08-29 16:32:30 · 726 阅读 · 0 评论 -
poj3693Maximum repetition substring【后缀数组+RMQ求重复最多连续子串】
DescriptionThe repetition number of a string is defined as the maximum number R such that the string can be partitioned intoR same consecutive substrings. For example, the repetition number of原创 2016-02-21 23:38:34 · 593 阅读 · 0 评论 -
hdu4552怪盗基德的挑战书&hdu3336Count the string【后缀数组求各前缀重复次数和】
Problem DescriptionIt 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. F原创 2016-02-22 11:31:49 · 626 阅读 · 0 评论 -
poj1743Musical Theme【后缀数组求最长不重叠重复子串】楼教主男人八题
DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this repr原创 2016-02-22 17:07:41 · 551 阅读 · 0 评论 -
POJ 2513 Colored Sticks 欧拉回路+trie树
题目DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of原创 2015-08-20 17:13:48 · 438 阅读 · 0 评论 -
ural1297Palindrome【后缀数组+RMQ最长回文子串】
DescriptionThe “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Unlimited» has infiltrated into “U.S. Robotics”. «U.S. R原创 2016-02-22 10:01:03 · 445 阅读 · 0 评论 -
hdu4758Walk Through Squares【AC自动机+dp】
On the beaming day of 60th anniversary of NJUST, as a military college which was Second Artillery Academy of Harbin Military Engineering Institute before, queue phalanx is a special landscape.原创 2016-03-18 16:47:37 · 507 阅读 · 0 评论 -
poj3261Milk Patterns【可重叠最长重复子串次数大于k】
Time Limit: 5000MS Memory Limit: 65536KTotal Submissions: 12892 Accepted: 5740Case Time Limit: 2000MSDescriptionFarmer John has noticed that the quality of milk given原创 2016-02-22 17:12:08 · 725 阅读 · 0 评论 -
hdu4057 Rescue the Rabbit【AC自动机+dp滚动数组】
DescriptionDr. X is a biologist, who likes rabbits very much and can do everything for them. 2012 is coming, and Dr. X wants to take some rabbits to Noah's Ark, or there are no rabbits any more.原创 2016-03-16 21:46:22 · 704 阅读 · 0 评论 -
hdu2825Wireless Password【ac自动机+dp状态压缩】
Total Submission(s): 5502 Accepted Submission(s): 1737Problem DescriptionLiyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liy原创 2016-03-15 17:15:16 · 1499 阅读 · 0 评论 -
hdu2415Bribing FIPA【树型dp】
今天唯一A的题……还是昨天的遗留问题T^T后天晚上就校赛了,一个小破题卡了这么久可怎么好题目大意:一个人要竞选,需要贿赂别人投选票(真贴近实际),贿赂的人有从属关系,问至少多少钱能买至少m张票搜这个题的时候看到了01背包的字样,然并卵,虎超超的在草纸上写了一个三维数组真是大错特错,其实分类中【二重dp】的字样是意味着”背包“而已。自己又纠结在有从属关系的表示上orz ,解决方法是:由于df原创 2015-12-28 21:47:13 · 713 阅读 · 0 评论 -
spojDistinct Substrings【后缀数组 不重复子串】
DescriptionGiven a string, we need to find the total number of its distinct substrings.InputT- number of test cases. TEach test case consists of one string, whose length is OutputFor each原创 2016-02-22 08:14:46 · 517 阅读 · 0 评论 -
poj2774Long Long Message【后缀数组求最长公共字串】
DescriptionThe little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being worried about spending so much on railway原创 2016-02-20 16:27:14 · 729 阅读 · 0 评论 -
2015多校联合第八场hdu5384Danganronpa AC自动机
Problem DescriptionDanganronpa is a video game franchise created and developed by Spike Chunsoft, the series' name is compounded from the Japanese words for "bullet" (dangan) and "refutation" (ron原创 2015-09-08 19:24:17 · 516 阅读 · 0 评论 -
hdu1247 hat's words
Hat’s WordsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1247DescriptionA hat’s word is a word in the dictionary that is原创 2015-08-13 17:28:55 · 361 阅读 · 0 评论 -
HDU 1671 Phone List trie树
题目在这里哟就是找有木有一个串是另一个字符串前缀的 讲讲我都错哪了#include #include#include#includeusing namespace std;bool flag;typedef struct Trie_node{ int count; struct Trie_node* next[10]; bool exist;}Tri原创 2015-08-13 17:18:58 · 365 阅读 · 0 评论 -
hdu2222Keywords Search AC自动机模板题
DescriptionIn the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feature to his image retrieval system. Every image have a long原创 2015-09-11 20:26:45 · 409 阅读 · 0 评论 -
HDU2896病毒侵袭 AC自动机
Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋――我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~ 但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此生气,他决定要把世界上所有带病毒的网站都找出来。当然,谁都知道这是不可能的。小t原创 2015-09-11 20:30:27 · 427 阅读 · 0 评论 -
HDU3065病毒侵袭持续中AC自动机
Description小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然小t好想好想为民除害,但是小t从来不打没有准备的战争。知己知彼,百战不殆,小t首先要做的是知道这个病毒网站特征:包含多少不同的病原创 2015-09-11 20:32:35 · 473 阅读 · 0 评论 -
HDU 1251 统计难题 trie树
简单的p->count++统计难题Time Limit:2000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1251DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成原创 2015-08-13 17:25:16 · 422 阅读 · 0 评论 -
HDU 1075 What Are You Talking About trie树
What Are You Talking AboutTime Limit:5000MS Memory Limit:204800KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1075DescriptionIgnatius is so lucky that he met原创 2015-08-13 17:22:57 · 322 阅读 · 0 评论 -
hdu1800fly to Mars字典树
其实可以用贪心,要不是数据太大==可是字典树更费空间==另:结构体可以有构造函数In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to原创 2015-05-29 16:25:56 · 387 阅读 · 0 评论 -
hdu1226超级密码【数字广搜+大数取模】
第一眼看到这个题就想到了poj3126Prime Path (题解地址 果然还是自己做出来的题印象深) 但是很不幸的是 ,这个题一个大数取模就把我整蒙了orz 其他的真没啥区别,还多了一个第一位不能是0, 没了……变变样就不会了/***********hud12262015.12.1655MS 10424K 2050 B C++***********/#include #inc原创 2015-12-01 11:37:22 · 527 阅读 · 0 评论 -
leetcode 5 Longest Palindromic Substring【manacher算法】
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.Example 2:...原创 2018-07-06 10:33:24 · 181 阅读 · 0 评论