#T190. 最长上升子序列
最长上升子序列
Description
A sequence of numbers is called increasing when . For a given sequence , we can obtain some increasing subsequences , where . Your task is to find the length of the longest increasing subsequence for the given sequence.
Input Format
The first line of input is the length of the sequence, ().
The second line contains integers of the sequence, where each integer ranges from to .
Output Format
The length of the longest increasing subsequence.
7
1 7 3 5 9 4 8
4