-->
当前位置:首页 > 题库

PROGRAMMING:Judging parity of T series

Luz5年前 (2021-05-10)题库545
Hyz showed her math problems to the people who said she was stupid, but they didn't think that they were dismissive. They said: "this kind of problems dare to be shameful, and I want to prove that you are not stupid, unless you do my problem.". I was so angry that hyz said, "give it to me!". Hyz received a look at the topic and found that it was an upgraded version of her topic, which made her happy. The main idea is: find out the maximum and minimum value of the input data, and judge their parity. If the parity is the same, output yes; if not, output No.
###Input format:
There are multiple groups of input data, each group occupies a row. Enter an integer T, followed by T row. The first integer of each row is n, which represents the number of numerical values to be counted, and then n integers; If t = 0, it means the end of input and the line will not be processed.
###Output format:
For each group of input data, judge the parity of the maximum and minimum values. If they are the same, output yes; if they are different, output No.
###Input example:
Here is a set of inputs. For example:
```in
two
5 1 2 3 4 5
2 3 4
0
```
###Output example:
The corresponding output is given here. For example:
```out
Yes
No
```







answer:If there is no answer, please comment