Submit solution
Points:
12 (partial)
Time limit:
0.6s
Memory limit:
32M
Author:
Problem type
Allowed languages
C, C++, Java, Pascal
Given an array
NOTE:
Input Specification
The first line consists of one integer
The second line consists of
Output Specification
One integer, the longest length of the subsequence
Sample Input 1
Copy
4
1 2 3 4
Sample Output 1
Copy
2
Sample Input 2
Copy
8
1 2 1 2 1 2 1 4
Sample Output 2
Copy
4
Comments