# Include <iostream> # define n 10005 using namespace STD; int A [n], n; int F (int x) {int I, T; If (x = 0) return 1; // The subscript of the first element is 0 (T=0,I = 0; I <X; I ++) // The subscript is not 0 if (a [x]> =A [I]) t = max (F(I) +1, T );//F(I) +1At this time, the length is + 1, and T.Return t;} Int main (INT argc, char * argv []) {int I, j; CIN> N; for (I = 0; I <n; I ++) cin> A [I]; cout <F (n-1) <Endl; return 0 ;}
#include <iostream>#define N 10005using namespace std;int a[N],n;int f( int x){int i,t;if (x==0) return 1;for (t=0,i=0;i<x; i++)if (a[x]>a[i]) t=max(f(i),t);return t+1; }int main(int argc, char *argv[]){int i,j;cin>>n;for (i=0;i<n; i++) cin>>a[i];cout<<f(n-1)<<endl;return 0;}
# Include <iostream>
# Define n 10005
Using namespace STD;
Int A [n], N;
Int F (int x)
{Int I, T;
If (x <= 0) return 1;
T = 1;
For (I = 0; I <X; I ++)
If (A [x]>A [I]) t = max(F (I) + 1, T );//F(I) +1At this time, the length is + 1, and T.
// Sometimes, sometimes
Return T;
}
Int main (INT argc, char * argv [])
{Int I, J;
Cin> N;
For (I = 0; I <n; I ++)
Cin> A [I];
Cout <F (n-1) <Endl;
Return 0;
}