308535: CF1535A. Fair Playoff
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Fair Playoff
题意翻译
给定 $4$ 个人的能力值,第一个人与第二个人比赛,第三个人与第四个人比赛,两场比赛中能力值高的两人将获胜。若获胜的两个人是 $4$ 人中能力值最高的,则该比赛公平,输出 `YES`,否则输出 `NO`。 **本题有多组测试数据。**题目描述
Four players participate in the playoff tournament. The tournament is held according to the following scheme: the first player will play with the second, and the third player with the fourth, then the winners of the pairs will play in the finals of the tournament. It is known that in a match between two players, the one whose skill is greater will win. The skill of the $ i $ -th player is equal to $ s_i $ and all skill levels are pairwise different (i. e. there are no two identical values in the array $ s $ ). The tournament is called fair if the two players with the highest skills meet in the finals. Determine whether the given tournament is fair.输入输出格式
输入格式
The first line contains a single integer $ t $ ( $ 1 \le t \le 10^4 $ ) — the number of test cases. A single line of test case contains four integers $ s_1, s_2, s_3, s_4 $ ( $ 1 \le s_i \le 100 $ ) — skill of the players. It is guaranteed that all the numbers in the array are different.
输出格式
For each testcase, output YES if the tournament is fair, or NO otherwise.
输入输出样例
输入样例 #1
4
3 7 9 5
4 5 6 9
5 3 8 1
6 5 3 2
输出样例 #1
YES
NO
YES
NO