409871: GYM103821 C Perfect Seating
Description
Ammar teaches programming for kindergarteners. The classroom consists of $$$N$$$ desks such that they are put in front of each other, desks are indexed with numbers from $$$1$$$ to $$$N$$$, the desk with index $$$1$$$ is the first one, then desk $$$2$$$ comes behind it and so on..
There are $$$N$$$ children attending Ammar's programming lectures with distinct heights, child $$$i$$$ will sit in desk $$$i$$$, each child has a specific height. A child can see the board clearly if he sits in the first desk, or if he sits in a desk such that all children in front of him have heights strictly smaller than his height.
A seating is perfect if all children can see the board clearly. You will be given the heights of children from $$$1$$$ to $$$N$$$, can you check if their seating is perfect?
InputThe input consists of multiple test cases. The first line contains a single integer $$$T$$$ $$$(1 \le T \le 1000)$$$ — number of test cases.
The first line of each test case contains a single integer $$$N$$$ $$$(1 \le N \le 100)$$$ — Number of children.
The second line of each test case contains $$$N$$$ integers $$$H_1, H_2,..., H_N$$$ ($$$1 \le H_i \le 200$$$) — the heights of children.
OutputFor each test case, print 'Yes' (without quotes) if the seating is perfect, otherwise print 'No' (without the quotes).
ExampleInput2 3 1 6 7 4 8 4 6 12Output
Yes No