#C5056. Max Discount Days
Max Discount Days
Max Discount Days
You are given T test cases. For each test case, there is an integer N representing the number of days, followed by N space-separated integers that denote the price on each day. A day i
(with 1 < i < N) is considered a discount day if it satisfies the condition
$$prices_{i-1} > prices_i < prices_{i+1}.$$
Your task is to count the number of discount days for each test case and output the corresponding count on a new line.
Note: A discount day is only applicable when it is strictly between two days with higher prices.
inputFormat
The first line contains an integer T representing the number of test cases. Each test case consists of two lines: the first line contains an integer N (the number of days), and the second line contains N space-separated integers representing the prices for these days.
outputFormat
For each test case, output a single integer on a new line representing the number of discount days.
## sample3
5
1 3 2 4 5
4
4 3 2 1
7
12 11 10 9 10 11 12
1
0
1
</p>