結果
| 問題 | No.1366 交換門松列・梅 | 
| コンテスト | |
| ユーザー |  mag | 
| 提出日時 | 2021-02-13 20:42:37 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 701 bytes | 
| コンパイル時間 | 1,499 ms | 
| コンパイル使用メモリ | 166,004 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-21 00:34:28 | 
| 合計ジャッジ時間 | 2,123 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 6 WA * 5 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep2(i, a, n) for(int i = (a); i < (n); i++)
#define rep(i, n) rep2(i,0,n)
#define debug 0
int main(){
  cin.tie(nullptr);ios_base::sync_with_stdio(false);
  int a[3];rep(i,3)cin>>a[i];
  int b[3];rep(i,3)cin>>b[i];
  rep(i,3){
    rep(j,3){
      swap(a[i],b[j]);
      if(debug){
        cout<<"a ";rep(k,3)cout<<a[k]; cout<<endl;
      }
      if(debug){
        cout<<"b ";rep(k,3)cout<<b[k]; cout<<endl;
      }
      if(((a[1]>a[0]&&a[1]>a[2])||(a[1]<a[0]&&a[1]<a[2]))&&((b[1]>b[0]&&b[1]>b[2])||(b[1]<b[0]&&b[1]<b[2]))){
        cout<<"Yes\n";
        return 0;
      }
      swap(a[i],b[j]);
    }
  }
  cout<<"No\n";
}
            
            
            
        