diff --git "a/2224020152/\347\254\254\345\233\233\345\215\225\345\205\203/\345\210\251\347\224\250KMP\347\256\227\346\263\225\346\261\202\345\255\220\344\270\262\345\234\250\344\270\273\344\270\262\344\270\255\344\270\215\351\207\215\345\217\240\345\207\272\347\216\260\347\232\204\346\254\241\346\225\260.cpp" "b/2224020152/\347\254\254\345\233\233\345\215\225\345\205\203/\345\210\251\347\224\250KMP\347\256\227\346\263\225\346\261\202\345\255\220\344\270\262\345\234\250\344\270\273\344\270\262\344\270\255\344\270\215\351\207\215\345\217\240\345\207\272\347\216\260\347\232\204\346\254\241\346\225\260.cpp" new file mode 100644 index 0000000000000000000000000000000000000000..d28da16539d59f34a494b0780c127bdd338f7063 --- /dev/null +++ "b/2224020152/\347\254\254\345\233\233\345\215\225\345\205\203/\345\210\251\347\224\250KMP\347\256\227\346\263\225\346\261\202\345\255\220\344\270\262\345\234\250\344\270\273\344\270\262\344\270\255\344\270\215\351\207\215\345\217\240\345\207\272\347\216\260\347\232\204\346\254\241\346\225\260.cpp" @@ -0,0 +1,80 @@ +#include +using namespace std; +const int N =1e6; +int lps[N]; +int nt[N]; +void get_lps(string t,int *lps) +{ + int m=t.size(); + int i=1,j=0; + lps[0]=0; + while(i>s>>t; + cout<