1465 剪花布条
貌似这个题用hash也能过
不过,既然学了KMP,就需要用KMP来做
不过我真的想吃烤馍片了
好了进入正题
作为KMP的例1,如果ybt再这么毒瘤就真的太不仁慈了,纯粹的一个模板题,不过每次匹配成功,模式串回头,重新开始
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
string s,p;
int ans=0;
void get_next()