摘要: 直接把求next数组跟标记平移放到一起 #include #include #include using namespace std; bool kmp( vector& str1, vector& str2 ) { vector next(str2.size()); int i = 1; int k = 0; while ( i str1(b,b+... 阅读全文