From d4e5d47133e896cfb67db13ff6a2cab05b50c2ae Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Mon, 12 Sep 2022 21:35:18 +0800 Subject: [PATCH] =?UTF-8?q?1981=20-=20=E9=93=81=E6=86=A8=E6=86=A8=E9=AA=91?= =?UTF-8?q?=E5=A3=AB=E5=9B=A2=E7=9A=84=E7=BC=8E=E5=B8=A6=E5=88=86=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 77470 --- bjtu/1981/1981.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 bjtu/1981/1981.cpp 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; +}