题解 | 田忌赛马
田忌赛马
https://www.nowcoder.com/practice/49d799f65a0749588e9cd7e6135a4a9a
# 读取输入 q = list(map(int, input().split())) t = list(map(int, input().split())) # 对两者的马匹速度进行排序 q.sort() t.sort() if t[0]<q[0]: if t[1]>q[0] and t[2]>q[1]: print('Yes') else: print('No') elif t[0]>q[0]: if t[2]>q[1]: print('Yes') else: print('No') else: if t[1]>q[0] and t[2]>q[1]: print('Yes') else: print('No')