最长单调序列O(nlbn)

    http://blog.sina.com.cn/s/blog_4e4148700100cxjm.htmlhtml const int MAX=2000000; int a[MAX]; //求a【ll...rr】的最长严格单调递增序列长度O(nlbn) int bb[MAX]; int lcs(int *a,int ll,int rr) {     int i,k=1;     bb[1]=
相关文章
相关标签/搜索