CF1742B.Increasing

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Increasing

You are given an array aa of nn positive integers. Determine if, by rearranging the elements, you can make the array strictly increasing. In other words, determine if it is possible to rearrange the elements such that a1<a2<<ana_1 \lt a_2 \lt \dots \lt a_n holds.

Input

The first line contains a single integer tt (1t1001 \leq t \leq 100) — the number of test cases.

The first line of each test case contains a single integer nn (1n1001 \leq n \leq 100) — the length of the array.

The second line of each test case contains nn integers aia_i (1ai1091 \leq a_i \leq 10^9) — the elements of the array.

Output

For each test case, output "YES" (without quotes) if the array satisfies the condition, and "NO" (without quotes) otherwise.

You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer).

Note

In the first test case any rearrangement will keep the array [1,1,1,1][1,1,1,1], which is not strictly increasing.

In the second test case, you can make the array [1,3,4,7,8][1,3,4,7,8].

Samples

3
4
1 1 1 1
5
8 7 1 3 4
1
5
NO
YES
YES

在线编程 IDE

建议全屏模式获得最佳体验