最長單調序列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]=
相關文章
相關標籤/搜索