摘要:
/*参考《算法导论》My Code:*/#include <iostream>#include <cstdio>#include <string>using namespace std;const int N = 1000;string T, P;int pi[N];void COMPUTER_PREFIX_FUNCTION(string P){ int m = P.length(), i, k; for(k = pi[0] = -1, i = 1; i < m; i++){ while(k > -1 && P[k+1] != P 阅读全文
posted @ 2011-10-08 17:55
AC_Von
阅读(785)
评论(0)
推荐(0)

浙公网安备 33010602011771号