#K2826. Stage Visibility
Stage Visibility
Stage Visibility
You are given an array of heights representing people standing in a line. The first person is at the front. A person can see the stage if they are strictly taller than everyone in front of them. Formally, for the i-th person with height \(h_i\), they can see the stage if \(h_i > \max\{h_1, h_2, \dots, h_{i-1}\}\).
Your task is to compute the number of people in each line (test case) that can see the stage.
inputFormat
The input is given via standard input (stdin) and has the following format:
The first line contains an integer \(T\), the number of test cases. Each test case consists of two lines. The first line contains an integer \(N\) representing the number of people. The second line contains \(N\) space-separated integers denoting the heights of the people.
outputFormat
For each test case, output a single integer on a new line — the number of people who can see the stage.
## sample3
5
1 2 3 4 5
4
4 3 2 1
6
2 2 2 2 2 2
5
1
1
</p>