結果

問題 No.1366 交換門松列・梅
ユーザー Fu_LFu_L
提出日時 2021-02-21 20:34:50
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 814 bytes
コンパイル時間 4,708 ms
コンパイル使用メモリ 262,580 KB
実行使用メモリ 4,368 KB
最終ジャッジ日時 2023-10-19 22:01:05
合計ジャッジ時間 5,798 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef pair<ll,ll> P;
typedef modint1000000007 mint;
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define rrep(i,a,b) for(ll i=a;i>=b;i--)
int a[3],b[3];
bool ans=false;
int main(void){
    cin.tie(0);
    ios::sync_with_stdio(0);
    rep(i,0,3){
        cin>>a[i];
    }
    rep(i,0,3){
        cin>>b[i];
    }
    rep(i,0,3){
        rep(j,0,3){
            swap(a[i],b[j]);
            if((a[1]>a[0]&&a[1]>a[2])||(a[1]<a[0]&&a[1]<a[2])){
                if((b[1]>b[0]&&b[1]>b[2])||(b[1]<b[0]&&b[1]<b[2])){
                    ans=true;
                }
            }
            swap(a[i],b[j]);
        }
    }
    if(ans){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }

}
0