题解
2023-08-10 20:01:24
发布于:浙江
15阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("beautiful.in","r",stdin);
freopen("beautiful.out","w",stdout);
int a1,a2,a3,a4;
int a;
cin>>a;
for(int i=1;i<=a;i++){
cin>>a1>>a2>>a3>>a4;
int c=0;
if(a1>a2&&a1>a3&&a4<a2&&a4<a3||a2>a1&&a2>a4&&a3<a1&&a3<a4||a1<a2&&a1<a3&&a4>a2&&a4>a3||a2<a1&&a2<a4&&a3>a1&&a3>a4){
c=1;
}
if(c==1)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
fclose(stdin);
fclose(stdout);
return 0;
}
这里空空如也
有帮助,赞一个