-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1535A.cpp
58 lines (50 loc) · 1.08 KB
/
1535A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <functional>
#include <set>
#include <queue>
#include <sstream>
using namespace std;
using p = pair<int, int>;
using ll = long long;
const int MAX = 10e+6;
const int INF = 0x66554433;
vector<string> split(string input, char delimiter) {
vector<string> answer;
stringstream ss(input);
string temp;
while (getline(ss, temp, delimiter)) {
answer.push_back(temp);
}
return answer;
}
inline void Quick_IO(){
ios_base :: sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
}
int main(){
Quick_IO();
int t;
cin>>t;
while(t--){
vector<int> S;
for (int i = 0; i < 4; ++i) {
int a;
cin>>a;
S.push_back(a);
}
int res1 = max(S[0], S[1]);
int res2 = max(S[2], S[3]);
sort(S.begin(), S.end());
if((S[3]==res1&&S[2]==res2)||(S[3]==res2&&S[2]==res1)){
cout<<"YES\n";
}else{
cout<<"NO\n";
}
}
return 0;
}