![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串
文章平均质量分 50
xu960218
这个作者很懒,什么都没留下…
展开
-
[KMP]匹配长度恰为x的位置数
描述 Description 给你两个串A,B,可以得到从A的任意位开始的子串和B匹配的长度。 给定K个询问,对于每个询问给定一个x,求出匹配长度恰为x的位置有多少个。 N,M,K 输入格式 InputFormat 第一行三个数 N,M,K,表示A的长度、B的长度和询问数。 第二行为串A。 第三行为串B。 接下来K行,每行1个数X。原创 2013-08-28 09:40:59 · 890 阅读 · 0 评论 -
[字符串]字符串中的替换
#include #include #include #include #include using namespace std; int n; string::size_type pos=0; string::size_type a; string::size_type b; string s[10]; string t[10]; string r; int main() { scanf("%原创 2013-10-10 19:00:41 · 753 阅读 · 0 评论 -
AC自动机模板
#include #include #include #include using namespace std; struct node { int fail; int next[26]; int c; void newnode(){memset(next,-1,sizeof(next));fail=-1,c=0;} }a[2000000]; int num; char s[100000原创 2013-08-11 00:09:52 · 545 阅读 · 0 评论 -
String与数字及大小写转换
数字转字符串 #include #Include string num2str(int i) { stringstream ss; ss<<i; return ss.str(); } 字符串转数字: int str2num(string s) { int num; stringstream ss原创 2013-08-11 00:14:34 · 1157 阅读 · 0 评论