
字符串
文章平均质量分 80
life4711
这个作者很懒,什么都没留下…
展开
-
hdu 3973 字符串hash+线段树
http://acm.hdu.edu.cn/showproblem.php?pid=3973Problem DescriptionYou are given some words {Wi}. Then our stupid AC will give you a very long string S. AC is stupid and always wants to know w原创 2014-12-29 19:34:32 · 1256 阅读 · 0 评论 -
hdu2222 AC自动机-给定串中出现了几个模式串
http://acm.hdu.edu.cn/showproblem.php?pid=2222Problem DescriptionIn the modern time, Search engine came into the life of everybody like Google, Baidu, etc.Wiskey also wants to bring th原创 2015-04-27 10:53:07 · 796 阅读 · 0 评论 -
hdu2896 AC自动机-标记哪些模式串在目标串中出现过
http://acm.hdu.edu.cn/showproblem.php?pid=2896Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播原创 2015-04-27 11:43:20 · 632 阅读 · 0 评论 -
poj 2778 AC自动机与矩阵连乘
http://poj.org/problem?id=2778DescriptionIt's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA Sequence,For example, if原创 2015-04-29 20:28:11 · 835 阅读 · 0 评论 -
KMP算法
http://blog.youkuaiyun.com/v_july_v/article/details/7041827///未经优化的kmp数组void GetNext(char* p,int next[]) { int pLen = strlen(p); next[0] = -1; int k = -1; int j = 0; while原创 2015-04-08 16:58:41 · 617 阅读 · 0 评论 -
hdu 4821 ||2013年长春站J题 字符串哈希+map的应用
http://acm.hdu.edu.cn/showproblem.php?pid=4821Problem DescriptionGiven a string S and two integers L and M, we consider a substring of S as “recoverable” if and only if (i) It is of l原创 2014-08-26 17:34:31 · 1206 阅读 · 0 评论 -
poj1200 哈希
http://poj.org/problem?id=1200DescriptionMany people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text.原创 2014-12-29 10:01:26 · 2827 阅读 · 0 评论 -
LA 4513 hash表示字符串后缀
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2514&mosmsg=Submission+received+with+ID+1623942Dr. Ellie Arroway has established cont原创 2014-12-27 11:06:51 · 1322 阅读 · 0 评论 -
uva 11584 字符串 dp
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2631原创 2014-08-18 10:17:47 · 754 阅读 · 0 评论 -
2014多校训练第5场1005题 ||hdu 4915 模拟
http://acm.hdu.edu.cn/showproblem.php?pid=4915Problem Descriptionbobo found an ancient string. The string contains only three charaters -- "(", ")" and "?".bobo would like to replace原创 2014-08-07 20:25:16 · 913 阅读 · 0 评论 -
ural 1297 最长回文子串 后缀数组
http://acm.timus.ru/problem.aspx?space=1&num=12971297. PalindromeTime limit: 1.0 secondMemory limit: 64 MBThe “U.S. Robots” HQ has just received a rather alarming anonymo原创 2014-08-05 09:31:29 · 892 阅读 · 0 评论 -
SPOJ 694 求一个字符串有多少子串 后缀数组
http://www.spoj.com/problems/DISUBSTR/Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. TEach test case consists of one st原创 2014-08-04 20:10:10 · 740 阅读 · 0 评论 -
POJ 1625 AC自动机+DP
http://poj.org/problem?id=1625DescriptionThe alphabet of Freeland consists of exactly N letters. Each sentence of Freeland language (also known as Freish) consists of exactly M letters without原创 2015-05-02 20:59:26 · 631 阅读 · 0 评论 -
hdu2243 ac自动机+矩阵连乘
http://acm.hdu.edu.cn/showproblem.php?pid=2243Problem Description背单词,始终是复习英语的重要环节。在荒废了3年大学生涯后,Lele也终于要开始背单词了。一天,Lele在某本单词书上看到了一个根据词根来背单词的方法。比如"ab",放在单词前一般表示"相反,变坏,离去"等。于是Lele想,如果背了N个词根原创 2015-04-30 16:32:34 · 906 阅读 · 0 评论 -
AC dreamoj 1011 树状数组+hash维护字符串的前缀和
http://acdream.info/problem?pid=1019Problem DescriptionNow we have a long long string, and we will have two kinds of operation on it.C i y : change the ith letter to y.Q i j : check whet原创 2014-12-26 16:12:13 · 968 阅读 · 0 评论 -
hdu 5340 最长回文子串变形
http://acm.hdu.edu.cn/showproblem.php?pid=5340Problem DescriptionCan we divided a given string S into three nonempty palindromes? InputFirst line contains a single integer T≤原创 2015-08-02 14:28:12 · 1306 阅读 · 0 评论 -
hdu5371 最长回文子串变形(Manacher算法)
http://acm.hdu.edu.cn/showproblem.php?pid=5371Problem DescriptionHotaru Ichijou recently is addicated to math problems. Now she is playing with N-sequence.Let's define N-sequence, which is原创 2015-08-13 11:48:31 · 1434 阅读 · 0 评论 -
hdu 4057 AC自动机+状态压缩dp
http://acm.hdu.edu.cn/showproblem.php?pid=4057Problem 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 som原创 2015-07-08 11:51:52 · 1061 阅读 · 0 评论 -
CF552E 字符串 表达式求值
http://codeforces.com/contest/552/problem/EE. Vanya and Bracketstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard out原创 2015-06-27 16:38:33 · 1443 阅读 · 0 评论 -
hdu2296 AC自动机+DP
http://acm.hdu.edu.cn/showproblem.php?pid=2296Problem DescriptionFor the hope of a forever love, Steven is planning to send a ring to Jane with a romantic string engraved on. The string's le原创 2015-05-04 14:40:58 · 791 阅读 · 0 评论 -
hdu2457AC自动机+DP
http://acm.hdu.edu.cn/showproblem.php?pid=2457Problem DescriptionBiologists finally invent techniques of repairing DNA that contains segments causing kinds of inherited diseases. For the原创 2015-05-04 19:59:41 · 764 阅读 · 0 评论 -
hdu4758AC自动机+状态压缩DP
http://acm.hdu.edu.cn/showproblem.php?pid=4758Problem Description On the beaming day of 60th anniversary of NJUST, as a military college which was Second Artillery Academy of Harbin Mil原创 2015-05-04 08:45:12 · 837 阅读 · 0 评论 -
ZOJ 3430 AC自动机
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4114Nobita did use an outstanding anti-virus software, however, for some strange reason, this software did not check email attachment原创 2015-04-28 20:50:47 · 1069 阅读 · 2 评论 -
hdu2825 AC自动机+状态压缩DP
http://acm.hdu.edu.cn/showproblem.php?pid=2825Problem DescriptionLiyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liyuan did not原创 2015-05-03 21:14:08 · 607 阅读 · 0 评论 -
hdu3065 AC自动机-每个标准串在模式串中出现的次数
http://acm.hdu.edu.cn/showproblem.php?pid=3065Problem Description小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然原创 2015-04-28 11:41:50 · 774 阅读 · 0 评论 -
2014杭电多校联合第三场 1005
http://acm.hdu.edu.cn/showproblem.php?pid=4891Problem DescriptionAs a programming contest addict, Waybl is always happy to take part in various competitive programming contests. One day, he原创 2014-07-29 20:44:53 · 777 阅读 · 0 评论 -
后缀数组模板
#include #include #include #include using namespace std;const int maxn=211111;/******************************************************************** 后缀数组 Suffix Array** INIT:solver.call_fun(c原创 2014-08-04 20:13:35 · 791 阅读 · 0 评论 -
hdu 3746 kmp 算法未优化的next数组意义用法
http://acm.hdu.edu.cn/showproblem.php?pid=3746Problem DescriptionCC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, th原创 2014-03-25 15:21:19 · 1115 阅读 · 0 评论 -
hdu 1686 kmp典型应用
http://acm.hdu.edu.cn/showproblem.php?pid=1686Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the原创 2014-03-25 14:17:57 · 725 阅读 · 0 评论 -
HDU 3336 KMP算法中对next数组的理解
http://acm.hdu.edu.cn/showproblem.php?pid=3336Problem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can w原创 2014-03-25 15:01:50 · 2074 阅读 · 4 评论 -
poj 1961 kmp算法之next数组的意义应用
http://poj.org/problem?id=1961DescriptionFor 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 pre原创 2014-03-25 21:16:46 · 669 阅读 · 0 评论 -
poj 2406 kmp算法巩固之next数组的再理解
http://poj.org/problem?id=2406DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concaten原创 2014-03-25 20:21:17 · 745 阅读 · 0 评论 -
hdu 2087
http://acm.hdu.edu.cn/showproblem.php?pid=2087Problem Description一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用原创 2014-03-23 20:24:14 · 711 阅读 · 0 评论 -
NEFU 640 猜数
http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=640原创 2014-05-01 21:06:36 · 669 阅读 · 0 评论 -
codeforces problem/408/B
B. Garlandtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce little Vasya read an article in a magazine o原创 2014-04-16 17:41:10 · 693 阅读 · 0 评论 -
codeforces219/A
http://codeforces.com/problemset/problem/219/AA. k-Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard原创 2014-03-18 13:10:37 · 763 阅读 · 0 评论 -
UVA 490 字符串旋转
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=431 Rotating Sentences In ``Rotating Sentences,'' you are asked to rotate原创 2014-03-15 13:08:22 · 985 阅读 · 0 评论 -
Uva OJ 401 Palindromes 镜像串与回文串
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from lef原创 2014-02-05 21:17:45 · 1134 阅读 · 0 评论 -
POJ 2185 二维kmp算法
http://poj.org/problem?id=2185DescriptionEvery morning when they are milked, the Farmer John's cows form a rectangular grid that is R (1 <= R <= 10,000) rows by C (1 <= C <= 75) columns. As we原创 2014-03-26 16:50:37 · 1305 阅读 · 0 评论 -
codeforces 160/B 字符串水题
http://codeforces.com/problemset/problem/160/BEach of you probably has your personal experience of riding public transportation and buying tickets. After a person buys a ticket (which traditio原创 2014-04-11 18:51:39 · 784 阅读 · 0 评论