
KMP
文章平均质量分 66
空白君有着一把空白键blanKey
即使世界如此残酷,我们仍是努力挣扎着
/*算了,退役了,不挣扎了QWQ*/
展开
-
hdu 2087 剪花布条(KMP)
题目点我点我点我裸KMP,没啥好讲的。#include <iostream>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <algorithm>#include <malloc.h>#include <queue>#include <stack>using name原创 2015-11-14 17:31:02 · 351 阅读 · 0 评论 -
HDU3336 Count the string(KMP)
看了这篇博文题解感觉非常好,就顺手转了。转载原文题意:求字串中【前缀+跟前缀相同的子串】的个数? Sample Input 1 4 abab Sample Output 6 abab:包括2个a,2个ab,1个aba,1个abab 这里要用到next值的意义: next[i]表示前i个字符所组成的字符串的最大前后缀匹配转载 2016-02-08 20:53:16 · 467 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) D. Messenger
D. Messengertime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputEach employee of the "Blake Techologies" compa原创 2016-05-09 18:04:56 · 825 阅读 · 0 评论 -
HDU5918 Sequence I (KMP变形)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5918题目大意:给定序列a、序列b和整数p,求有多少个q使得b1、b2、b3……bm恰好是aq、aq+p、aq+2p、……aq+(m-1)p解题思路:直接KMP,拿模版随手一套改改东西就好了……#include #include #include #原创 2016-10-04 19:18:47 · 593 阅读 · 0 评论