#K35767. Increasing Subsequence Checker

    ID: 25605 Type: Default 1000ms 256MiB

Increasing Subsequence Checker

Increasing Subsequence Checker

You are given an integer T representing the number of test cases. For each test case, you are provided with an integer N indicating the size of the sequence followed by N space-separated integers. Your task is to determine whether the given sequence is strictly increasing.

A sequence \(a_1, a_2, \ldots, a_N\) is strictly increasing if and only if \(a_i < a_{i+1}\) for all \(1 \le i < N\). Print YES if the sequence is strictly increasing, otherwise print NO.

inputFormat

The input is read from stdin and has the following format:

  • The first line contains an integer \(T\) representing the number of test cases.
  • Each test case begins with an integer \(N\) denoting the number of elements in the sequence, followed by \(N\) space-separated integers.

outputFormat

For each test case, output a single line to stdout containing either YES if the sequence forms a strictly increasing sequence or NO otherwise.

## sample
1
4
1 3 5 7
YES

</p>