2012年4月26日

后缀数组模板

摘要: #include <string.h>#include <stdio.h>#include <stdlib.h>#define maxn 1005int r[maxn];int wa[maxn], wb[maxn], wv[maxn], ws[maxn];int sa[maxn], rank[maxn], height[maxn];int cmp(int *r, int a, int b, int l){ return r[a]==r[b] && r[a+l]==r[b+l];}void sortSuffix(int *r,int *sa,i 阅读全文

posted @ 2012-04-26 14:28 Moon_1st 阅读(580) 评论(0) 推荐(0) 编辑

导航