#K57107. Longest Increasing Temperature Subsequence
Longest Increasing Temperature Subsequence
Longest Increasing Temperature Subsequence
Problem Description:
You are given a sequence of temperature readings. Your task is to determine the length of the longest strictly increasing subsequence within the readings. A subsequence is a sequence that can be derived from the original sequence by deleting some or no elements without changing the order of the remaining elements. In this problem, you need to find the maximum length (L) such that there exists indices (i_1, i_2, \dots, i_L) with (T_{i_1} < T_{i_2} < \cdots < T_{i_L}).
inputFormat
Input Format:
The first line contains an integer (T) representing the number of test cases.
For each test case, the first line contains an integer (N) denoting the number of temperature readings. The following line contains (N) space-separated integers representing the readings.
outputFormat
Output Format:
For each test case, output a single line containing one integer — the length of the longest strictly increasing subsequence.## sample
2
7
10 22 9 33 21 50 41
10
3 10 2 1 20 5 40 10 7 80
4
5
</p>