题解 | 田忌赛马
田忌赛马
https://www.nowcoder.com/practice/49d799f65a0749588e9cd7e6135a4a9a
有趣的思维题,排序后遍历一遍田忌的马即可,贪心算法,始终让刚好能跑赢齐王的马上场:)
l1 = list(sorted(list(map(int,input().split()))))
l2 = list(sorted(list(map(int,input().split()))))
cnt = 0
for i in range(3):
if l2[i] > l1[cnt]:
cnt += 1
print("Yes" if cnt >= 2 else "No")

