-->
当前位置:首页 > 题库

PROGRAMMING:Monotone increasing longest subsequence

Luz5年前 (2021-05-10)题库396
An O (n $$2 $) time algorithm is designed to find the longest monotone increasing subsequence of the sequence composed of N numbers.
###Input format:
There are two lines of input:
The first line: n, represents the number of the sequence to be input
The second line: n numbers, with empty space between the numbers
###Output format:
The length of the longest monotone increasing subsequence
###Input example:
Here is a set of inputs. For example:
```in
five
1 3 5 2 9
```
###Output example:
The corresponding output is given here. For example:
```out
four
```







answer:If there is no answer, please comment