#c22506. 最长上升子序列II
最长上升子序列II
Longest Increasing Subsequence II
Problem Description
Given an array of length , find the length of its longest increasing subsequence. That is, we want the largest and array such that and .
Input Format
The first line contains an integer .
The next line contains integers .
Output Format
One number: the answer.
Sample Input
6
3 7 4 2 6 8
Sample Output
4
Constraints
All data guarantee .