kmp
文章平均质量分 66
UMR小豪
这个作者很懒,什么都没留下…
展开
-
poj1961 Period
Period Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 16756 Accepted: 8063 Description For each prefix of a given string S with N characters (each chara原创 2016-10-13 20:35:14 · 239 阅读 · 0 评论 -
KMP
这个是KMP的模版啦~之前的代码找不到,费了我不小劲呐,因为怕自己现在凭记忆写的是不是对的,所以做了很多串匹配的问题检验。 #include #include using namespace std; const int MAXN=1000000+10; int next[MAXN]; char a[MAXN],b[MAXN]; int l1,l2; void get_next()//得到n原创 2016-10-12 22:05:22 · 195 阅读 · 0 评论 -
poj2406 Power Strings
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 44918 Accepted: 18762 Description Given two strings a and b we define a*b to be their conca原创 2016-10-13 21:10:16 · 193 阅读 · 0 评论 -
数据结构实验之串一:KMP简单应用
数据结构实验之串一:KMP简单应用 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 给定两个字符串string1和string2,判断string2是否为string1的子串。 Input 输入包含多组数据,每组测试数据包含两行,第一行代表string1原创 2016-10-25 21:54:04 · 220 阅读 · 0 评论 -
数据结构实验之串三:KMP应用
数据结构实验之串三:KMP应用 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 有n个小朋友,每个小朋友手里有一些糖块,现在这些小朋友排成一排,编号是由1到n。现在给出m个数,能不能唯一的确定一对值l和r(l Input 首先输入一个整数n,代表有n原创 2016-10-25 21:55:50 · 465 阅读 · 0 评论 -
数据结构实验之数组三:快速转置
数据结构实验之数组三:快速转置 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 转置运算是一种最简单的矩阵运算,对于一个m*n的矩阵M( 1 = 稀疏矩阵M 稀疏矩阵T In原创 2016-10-25 22:00:01 · 615 阅读 · 0 评论