Sequence
Time Limit : 1 Second
Memory Limit : 128 MB
Submission: 454
Solved: 155
- Description
Given a number sequence whose length is n, you can delete at most k numbers in the sequence.
After that you are asked to answer the maximum length of longest continuous subsequence that each number in it is larger than its previous number(if has any) by one.
- Input
There are multy testcases. For each case:
the first line are the integer n, k. 1 <= n <= 100, 0 <= k <= n.
the seconde line is n numbers.
- Output
For each case output one number representing the maximum length of the subsequence.
- sample input
-
6 3 2 4 6 5 2 1 4 4 6 3 5 2
- sample output
-
2 1
- hint
- source