![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
孤枪
静
展开
-
2021-04-21
#include<stdio.h> #include<string.h>#include<stdlib.h>#define MAXLEN 255typedef struct sstring{ char ch[MAXLEN+1]; int length;};int index_BF(sstring s,sstring t)//tbing,sDNA{ int i,j; i=j=0; while(i<=s.length && j<=t.lengt原创 2021-04-21 09:58:12 · 85 阅读 · 0 评论 -
2021-04-19
#include #include #include #include using namespace std; void get_next(char *t,int *next) { int len=strlen(t+1); int i=1,j=0; next[i]=j; while(i<len) { if(j==0||t[i]t[j])//后缀的单个字符与前缀的单个字符 { ++i; ++j; next[i]=j; } else j=next[j]; } return; } int kmp_原创 2021-04-19 09:21:23 · 79 阅读 · 0 评论 -
2021-04-19
#include<stdio.h> #include<string.h> #include<stdlib.h> #include using namespace std; #define max 100000 struct book { char name[20]; char num[20]; float price; }; struct node { book data; int length; }; void print0(node p) { int i; for (原创 2021-04-19 09:15:54 · 55 阅读 · 0 评论