hdu 1025 Constructing Roads In JGShining's Kingdom 最长上升序列nlogn
#include
usingnamespacestd;
intd[500000+5],a[500000+5];
intBinary_search(ints,intt,inti)
{
intmid;
while(s>1;
if(i>=d[mid])s=mid+1;
elset=mid;
}
returns;
}
intmain()
{
inti,n,b,p,r,k,cas=0;
while(~s