View Code
1 #include2 #include 3 #define Max 1000 4 int b[Max+10] ; 5 int maxlen[Max+10] ; 6 int main() 7 { 8 int m, n, i, j ; 9 scanf("%d", &n) ;10 for(i=1; i<=n; i++)11 scanf("%d", &b[i]) ;12 maxlen[1] = 1 ;13 for(i=2; i<=n; i++)14 {15 m = 0 ;16 for(j=1; j b[j])18 if(m