poj 3261
摘要:
后缀数组,height的二分。#include<iostream>#include<fstream>using namespace std;#define N 20011int sa[N],sa1[N],rank[N],rank1[N],c[N],h[N];int m[N];int n,pow,count;int cmp(const void *a,const void *b){ int x=*(int*)a; int y=*(int*)b; if(rank[x]!=rank[y]) return(1); else if(rank[x+pow]!=rank[y+pow] 阅读全文
posted @ 2011-03-13 15:12 宇宙吾心 阅读(571) 评论(0) 推荐(0)