P14031 [HackerEarth] The battle of Thermopylae is between the Persians and Greeks during the Persian invasion. The Greek force is very small but determined to make a stand against the huge Persian army.
普及-
题目描述

The battle of Thermopylae is between the Persians and Greeks during the Persian invasion. The Greek force is very small but determined to make a stand against the huge Persian army.

All of Greece is in fear, knowing that the army of the Persian king Xerxes has begun its invasion of Greece. Already the Thessalians had gone over to the Persian side, but some Greek cities has come together and forgotten their usual rivalries, determining to stop the Persian invasion. These cities agreed that Sparta would lead the Greek army, as its reputation in war was unmatched by any other Greek state.

The Spartans has chosen to defend a narrow pass,between the mountains of central Greece and the sea, called Thermopylae. Greek force now waiting, made up of only 300 Spartans under their king, Leonidas.

King Xerxes has huge Persian army of 'N' soldiers.They are standing in straight line and each i^th soldiers has power Pi . King Xerxes knows that collaboration between adjacent soldiers is more,So Xerxes want to send longest continuous chain of his soldiers among 'N' soldiers such that their power is strictly increasing.

As King Xerxes knows black magic,He can increase or decrease the power of i^th soldier.You are the advisor of King Xerxes,He asked you to tell the length of longest continuous increasing chain of soldiers of current army.

At any time, King Xerxes will do two operations :

1 x y : Increase the power of x^th soldier by 'y' - (if negative, it means decrease.)

0 x y : Ask you the length of longest continuous increasing chain of soldiers in range [x , y] inclusive

Input :

First Line contains an integer indicating number of test cases 't'
For each case,there are two integers separated by a space in a line 'N' , 'Q' indicating number of soldiers in Persian army and number of queries.
Next Line contains 'N' space separated integers Pi indicating power of i^th soldier.
Next 'Q' lines contains three integers 'T' , 'x' and 'y' where T can be 0 or 1 indicating type of query.

Output :

For Each query of type 0,Print the answer as asked in the problem.

Constraints :

1 ≤ t ≤ 10
1 ≤ N,Q ≤ 10^5
1 ≤ Pi ≤ 10^9
For type 1 query: 1 ≤ x ≤ N , |y| ≤ 10^9
For type 0 query: 1 ≤ x ≤ y ≤ N

SAMPLE INPUT
1
5 6
5 1 2 3 2
0 1 5
1 5 4
0 1 5
0 3 5
1 3 10
0 3 5

SAMPLE OUTPUT
3
4
3
2

Explanation

Initial Power of soldiers : 5 1 2 3 2
1) 0 1 5 : length of longest increasing chain in range [1,5] = 3 i.e {1,2,3}
2) 1 5 4 : update power of 5th solder by 4 : 5 1 2 3 6
3) 0 1 5 : length of longest increasing chain in range [1,5] = 4 i.e {1,2,3,6}
4) 0 3 5 : length of longest increasing chain in range [3,5] = 3 i.e {2,3,6}
5) 1 3 10 : update power of 3rd solder by 10 : 5 1 12 3 6
6) 0 3 5 : length of longest increasing chain in range [3,5] = 2 i.e {3,6}

输入格式

见题面

输出格式

见题面

样例输入
2 100 10 21 72 1 83 38 17 32 27 37 79 63 53 4 7 83 49 9 40 49 94 74 35 76 47 28 24 17 21 63 6 43 83 30 95 66 67 11 49 46 47 80 60 51 83 66 33 83 26 24 31 71 97 65 46 95 45 70 63 65 32 21 59 14 50 53 31 68 63 80 13 61 59 72 12 93 89 96 75 15 20 5 85 68 21 31 15 17 52 77 81 83 49 91 48 98 43 79 66 57 58 1 18 68 0 74 90 1 34 -56 1 41 67 0 17 89 1 9 59 1 2 -55 1 33 -24 1 54 -22 0 57 72 100 10 100 29 53 56 76 42 48 42 52 22 22 30 95 30 40 2 39 41 8 46 85 41 69 89 82 74 10 91 32 11 10 32 39 63 87 66 4 86 59 7 7 32 36 53 14 76 6 52 16 13 97 52 53 18 40 87 91 1 77 23 63 38 6 54 100 92 19 56 29 78 62 87 9 98 91 22 25 96 26 92 60 74 96 13 91 87 51 34 88 27 8 50 16 13 3 68 56 74 23 36 0 92 94 0 49 73 0 55 84 1 1 -18 1 82 78 1 63 73 1 23 26 0 6 53 1 15 76 1 49 -15
样例输出
5 5 3 6 5 2 5 5 4 6 5 5 6 6 4 4 4 4 4 4 4 4 5 5 5 5 5 4 5