#include #include using namespace std; const int N=2050; char str[550][N]; int next[N]; int kmp(char*s,char*p) { int ls=strlen(s),lp=strlen(p); next[0]=-1; for (int i = 0, j = -1; i