本文共 346 字,大约阅读时间需要 1 分钟。
给出n个数,然后输出这n个数中的最长子序列长度。
#include#include #include #include #include using namespace std;const int maxn=100005; int b[maxn];int search(int val,int count){ int l=1,r=count; while(l<=r) { int mid=(l+r)/2; if(b[mid] count) count++; b[num]=val; } printf("%d\n",count);}
转载地址:http://wszci.baihongyu.com/