diff --git a/bjtu/1981/1981.cpp b/bjtu/1981/1981.cpp new file mode 100644 index 00000000..2e0d51e7 --- /dev/null +++ b/bjtu/1981/1981.cpp @@ -0,0 +1,30 @@ +#include +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(nullptr); + + int n; + + cin >> n; + + while (n--) { + std::pair p[2]; + + for (int i = 0; i < 2; i++) { + cin >> p[i].first >> p[i].second; + } + + std::sort(p, p + 2); + + cout << (p[1].first < p[0].second ? "YES" : "NO") << endl; + } + + return 0; +}