Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
菜鸟水平有限,代码供参考交流。#include<cstdio> #include<algorithm> using namespace std; int main(){ int t,n,m,dp[40010]; scanf("%d",&t); while(t--){ scanf("%d",&n); fill(dp,dp+n,40010); for(int i=0;i<n;i++){ scanf("%d",&m); *lower_bound(dp,dp+n,m)=m; } printf("%d\n",lower_bound(dp,dp+n,40010)-dp); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator