eolymp
bolt
Try our new interface for solving problems
Problems

Subsequence

Subsequence

Given a sequence, find the length of the largest strictly increasing subsequence. \InputFile First line contains the length $n~(1 \le n \le 1000)$ of the sequence. The second line contains the sequence itself. All numbers are integers not exceeding $10^4$ by absolute value. \OutputFile Print the maximum length of strictly increasing subsequence.
Time limit 1 second
Memory limit 128 MiB
Input example #1
6
3 29 5 5 28 6
Output example #1
3