Dhinchak and increasing numbers.

0

0 votes
Hard
Problem

Dhinchak Pooja has a sequence a of consisting of n integers.

Your task is to find out the maximum length of strictly increasing subsegment she can make by changing atmost one integer in the sequence.

A subsegment of a sequence is defined as a[i], a[i + 1], a[i + 2] ... a[j], where (1 <= i <= j <= n). The length of this subsegment is j - i + 1.


Constraints

For 30 points

1 <= T <= 100

1 <= N <= 100

For 70 points

1 <= T <= 10

1 <= N <= 10000


Input

First line contains T - number of Test cases.

For each test case,

First line contains n - number of integers in sequence.

Next line contains x spaced integers.


Output

For each test case, output an integer denoting the maximum length of increasing subsegment that can be formed by changing atmost one integer.


Example

2

6

10 2 3 1 6 7

3

3 2 3

Output

5

3


Explanation

For 1st testcase -

If you change 1 to 4 or 5, you get 10 2 3 4 6 7 and the longest increasing subsegment is 2 3 4 6 7 of length 5.

For 2nd testcase -

If you change 1st 3 to 1 you get 1 2 3, which is the longest increasing subsegment of length 3.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?