結果

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

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>
// #include<atcoder/all>

using namespace std;
// using namespace atcoder;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
#define rep(i,n) for(ll i = 0;i < (ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define MOD 1000000007


int main(){
  
  int a[3],b[3];
  rep(i,3)cin >> a[i];
  rep(i,3)cin >> b[i];
  bool is = false;
  rep(i,3)rep(j,3){
    swap(a[i],b[j]);
    if(a[0] == a[0+1] || a[0+1] == a[0+2] || a[0] == a[0+2])continue;
    if(b[0] == b[0+1] || b[0+1] == b[0+2] || b[0] == b[0+2])continue;
    if((*min_element(a,a+3) == a[1] || *max_element(a,a+3) == a[1]) && (*min_element(b,b+3) == b[1] || *max_element(b,b+3) == b[1]))is = true;
    swap(a[i],b[j]);
  }
  cout << (is ? "Yes\n" : "No\n");
  

  return 0;
}
0