結果

問題 No.1366 交換門松列・梅
ユーザー shu8Creamshu8Cream
提出日時 2021-01-29 21:35:38
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,010 bytes
コンパイル時間 1,871 ms
コンパイル使用メモリ 202,444 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-09 14:52:17
合計ジャッジ時間 2,548 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

/**
*    author:  shu8Cream
*    created: 29.01.2021 20:56:09
**/

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(n); i++)
#define all(x) (x).begin(), (x).end()
using ll = long long;
using P = pair<int,int>;
using vi = vector<int>;
using vvi = vector<vi>;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    vi a(3), b(3);
    rep(i,3) cin >> a[i];
    rep(i,3) cin >> b[i];
    vi aa(3), bb(3);
    aa=a; bb=b;
    rep(i,3)rep(j,3){
        a==aa; b=bb;
        swap(a[i],b[j]);
        if(a[0]==a[1] || a[1]==a[2] || a[2]==a[0]) continue;
        if(b[0]==b[1] || b[1]==b[2] || b[2]==b[0]) continue;
        int amx=max({a[0],a[1],a[2]});
        int amn=min({a[0],a[1],a[2]});
        int bmx=max({b[0],b[1],b[2]});
        int bmn=min({b[0],b[1],b[2]});
        if(a[1]==amx || a[1]==amn){
            if(b[1]==bmx || b[1]==bmn){
                cout << "Yes" << endl;
                return 0;
            }
        }
    }
    cout << "No" << endl;
}
0