Subsequences
Problem
Given a sequence, you want to find the length of the largest increasing
subsequences.
Input
The first line of the input file contains the number N - the length of the sequence
(1 <= N <= 1000). The second line contains the sequence itself
(separated by space). Sequence numbers are integers,
modulo not exceeding 10000.
Output
In the output file, you want to display the largest length of the increasing
subsequences.
Input |
Output |
6
3 29 5 5 28 6
|
3 |