#include
int l[10001],max,i,j,p,n,a,num[100001];
main()
{
while(scanf("%d",&n)!=EOF)
{
for (a=0;a
{
scanf("%d",&num[a]);
}
for(i=0;i
l[i]=1;
max=0;
for(i=1;i
{
for(j=p;j
{
if(num[i]>num[j]&&l[j]>=l[i])
l[i]=l[j]+1;
if(l[i]>max)
max=l[i];
}
}
printf("%d",max);
}
}
int l[10001],max,i,j,p,n,a,num[100001];
main()
{
while(scanf("%d",&n)!=EOF)
{
for (a=0;a
{
scanf("%d",&num[a]);
}
for(i=0;i
l[i]=1;
max=0;
for(i=1;i
{
for(j=p;j
{
if(num[i]>num[j]&&l[j]>=l[i])
l[i]=l[j]+1;
if(l[i]>max)
max=l[i];
}
}
printf("%d",max);
}
}
沒有留言:
張貼留言