#K13131. Longest Increasing Temperature Sequence

    ID: 23845 Type: Default 1000ms 256MiB

Longest Increasing Temperature Sequence

Longest Increasing Temperature Sequence

Given the temperature readings for d days, each day consisting of a sequence of temperature measurements, your task is to compute the length of the longest contiguous subsequence of strictly increasing temperatures for each day.

For a day with n temperature readings \(t_1, t_2, \dots, t_n\), find the maximum positive integer \(L\) such that there exists a contiguous segment \(t_i, t_{i+1}, \dots, t_{i+L-1}\) satisfying \(t_j < t_{j+1}\) for all \(i \le j < i+L-1\). If a day has no readings (i.e., \(n=0\)), output 0 for that day.

inputFormat

The input is provided via standard input (STDIN). The first line contains an integer d representing the number of days. Each of the following d lines describes one day as follows: the line starts with an integer n (the number of temperature readings for that day) followed by n integers representing the temperature values.

outputFormat

Output a single line containing d integers separated by a space. Each integer denotes the length of the longest contiguous subsequence of strictly increasing temperatures for the corresponding day.

## sample
3
5 1 2 3 2 4
6 -3 -2 -1 0 1 2
4 5 4 3 2
3 6 1