
字符串
文章平均质量分 88
我的指针和我一样已找到对象
退役的ACMer。现在:智能媒体计算、大数据
展开
-
AC自动机 hdu2896 hdu3065 病毒侵袭
hdu2896题意:在文本串中找出所包含的模式串,并计数有多少文本串,具体可看 hdu2896 http://acm.hdu.edu.cn/showproblem.php?pid=2896知道AC自动机就很好做了推荐的学习链接:http://acm.uestc.edu.cn/bbs/read.php?tid=4294http://blog.csdn.ne原创 2015-08-13 18:04:43 · 448 阅读 · 0 评论 -
hdu 2087 剪花布条 strstr使用 或者 KMP
strstr语法:#include char *strstr( const char *str1, const char *str2 );功能:函数返回一个指针,它指向字符串str2 首次出现于字符串str1中的位置,如果没有找到,返回NULL。#include #include int main(){ char text[1005转载 2015-06-01 23:32:12 · 304 阅读 · 0 评论 -
hdu 1711 Number Sequence KMP模板题
#include#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int maxn = 1000005;const int maxm = 10005;int n,m,text[maxn],pat[maxm];int kmp(){原创 2015-06-01 23:25:48 · 369 阅读 · 0 评论 -
AC自动机模板 LA4670 Dominating Patterns 出现次数最多的字串 BNUOJ11552 UVA1449
题目链接:http://www.bnuoj.com/v3/problem_show.php?pid=11552The archaeologists are going to decipher a very mysterious ``language". Now, they know many language patterns; each pattern can be trea原创 2015-05-27 22:35:04 · 449 阅读 · 0 评论 -
hihocoder Trie树 hiho题库 #1014 : Trie树
hihocoder Trie树 hiho题库 #1014 : Trie树http://hihocoder.com/problemset/problem/1014#1014 : Trie树时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho是一对好朋友,出生在信息化社会原创 2015-05-27 09:50:54 · 673 阅读 · 0 评论 -
LA3026 POJ1961 period 字符串周期(KMP) POJ2406 Power Strings
POJ 1961 http://poj.org/problem?id=1961 PeriodDescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to原创 2015-05-27 09:38:33 · 2697 阅读 · 0 评论