tijie
2024-01-18 21:29:18
发布于:广东
5阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1100;
struct sqare{
int xa, xb, ya, yb;
}s[maxn];
int main(){
int t;
scanf("%d\n", &t);
for(int i = 1; i <= t; i++){
scanf("%d %d %d %d", &s[i].xa, &s[i].xb, &s[i].ya, &s[i].yb);
if((s[i].xa < s[i].xb and s[i].ya < s[i].yb and s[i].xa < s[i].ya and s[i].xb < s[i].yb) or (s[i].xa > s[i].xb and s[i].ya > s[i].yb and s[i].xa > s[i].ya and s[i].xb > s[i].yb) or (s[i].xa > s[i].xb and s[i].ya > s[i].yb and s[i].xa < s[i].ya and s[i].xb < s[i].yb) or (s[i].xa < s[i].xb and s[i].ya < s[i].yb and s[i].xa > s[i].ya and s[i].xb > s[i].yb)){
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
}
这里空空如也
有帮助,赞一个