题解:(
2023-08-10 20:12:48
发布于:浙江
39阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
struct sqare{
int xa ,xb ,ya ,yb;
}s[1001];
int main(){
int t;
cin >> t;
for (int i = 1 ; i <= t ; i++){
cin >> s[i].xa >> s[i].xb >> s[i].ya >> s[i].yb;
if ((s[i].xa < s[i].xb && s[i].ya < s[i].yb && s[i].xa < s[i].ya && s[i].xb < s[i].yb) || (s[i].xa > s[i].xb && s[i].ya > s[i].yb && s[i].xa > s[i].ya && s[i].xb > s[i].yb) || (s[i].xa > s[i].xb && s[i].ya > s[i].yb && s[i].xa < s[i].ya && s[i].xb < s[i].yb) || (s[i].xa < s[i].xb && s[i].ya < s[i].yb && s[i].xa > s[i].ya && s[i].xb > s[i].yb))
cout << "YES\n";
else
cout << "NO\n";
}
return 0;
}
这里空空如也
有帮助,赞一个