void get() {int i=0,j=-1;net[0]=-1;while(i<pl){if(p[i]==p[j]||j==-1)net[++i]=++j;elsej=net[j];} } int kmp() {int i=0,j=0,ans=0;whi……