lls nlogn
作者:互联网
fill(len,len + maxn,INF); len[0] = 0; int ans = 0; REP(i,n){ //cout<<A[i]<<' '; int L = 0,R = ans; while (L < R){ int mid = (L + R + 1) >> 1; if (len[mid] < A[i]) L = mid; else R = mid - 1; } f[i] = L + 1; len[f[i]] = min(len[f[i]],A[i]); ans = max(ans,f[i]); } cout<<ans<<endl;
标签:cout,min,lls,mid,len,ans,nlogn 来源: https://www.cnblogs.com/jrjxt/p/13686135.html