C++
#include <algorithm>
#include <array>
#include <iostream>
using namespace std;
int main() {
array<int, 3> a;
array<int, 3> b;
cin >> a[0] >> a[1] >> a[2];
cin >> b[0] >> b[1] >> b[2];
// 田忌有两匹马的速度大于齐威王的即可
sort(a.begin(), a.end());
sort(b.begin(), b.end());
if (b[1]>a[0] && b[2]>a[1])
// 或者 通过循环判断,适合超过三局两胜的情况
// int a_cnt = 0;
// for (int i : b) {
// if (i>a[a_cnt]) a_cnt++; // 只有田忌胜,才更换齐威王的马
// }
// if (a_cnt > 1)
cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
// 64 位输出请用 printf("%lld")



京公网安备 11010502036488号