题解
2024-05-15 16:27:32
发布于:广东
4阅读
0回复
0点赞
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
int t, a, b, c, d;
scanf("%d", &t);
while(t--){
scanf("%d%d%d%d", &a, &b, &c, &d);
bool flag = 0;
for(int i = 1; i <= 4; i++){
int a1 = a, b1 = b, c1 = c, d1 = d;
if((a < b && c < d && a < c && b < d)){
flag = 1;
cout << "YES\n";
break;
}a = c1, b = a1, c = d1, d = b1;
}if(!flag) cout << "NO\n";
}
return 0;
}
这里空空如也
有帮助,赞一个