#include<iostream>
using namespace std;
int num[
10002];
int maxlen[
100002];
int n;
int main(){
int i,j;
int ans=
1;
cin>>n;
for(i=
1;i<=n;i++)
cin>>num[i];
for(i=
1;i<=n;i++)
maxlen[i]=
1;
for(i=
2;i<=n;i++){
for(j=
1;j<i;j++)
if(num[i]>num[j])
maxlen[i]=max(maxlen[j]+
1,maxlen[i]);
ans=max(ans,maxlen[i]);
}
cout<<ans<<endl;
}
转载请注明原文地址: https://ju.6miu.com/read-672.html