結果
| 問題 | 
                            No.1366 交換門松列・梅
                             | 
                    
| コンテスト | |
| ユーザー | 
                             a01sa01to
                         | 
                    
| 提出日時 | 2023-09-08 00:17:03 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 740 bytes | 
| コンパイル時間 | 1,725 ms | 
| コンパイル使用メモリ | 198,048 KB | 
| 実行使用メモリ | 7,844 KB | 
| 最終ジャッジ日時 | 2025-06-20 11:14:30 | 
| 合計ジャッジ時間 | 2,413 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 13 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
  #include "settings/debug.cpp"
  #define _GLIBCXX_DEBUG
#else
  #define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
bool chk(vector<int> a) {
  if (a[0] != a[1] && a[1] != a[2] && a[2] != a[0]) {
    if (max({ a[0], a[1], a[2] }) == a[1] || min({ a[0], a[1], a[2] }) == a[1]) {
      return true;
    }
  }
  return false;
}
int main() {
  vector<int> a(3), b(3);
  rep(i, 3) cin >> a[i];
  rep(i, 3) cin >> b[i];
  bool ok = false;
  rep(i, 3) rep(j, 3) {
    swap(a[i], b[j]);
    if (chk(a) && chk(b)) ok = true;
    swap(a[i], b[j]);
  }
  cout << (ok ? "Yes" : "No") << endl;
  return 0;
}
            
            
            
        
            
a01sa01to