結果

問題 No.1366 交換門松列・梅
ユーザー Shawn stayC
提出日時 2021-03-07 10:50:44
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 538 bytes
コンパイル時間 1,942 ms
コンパイル使用メモリ 196,020 KB
最終ジャッジ日時 2025-01-19 12:32:35
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
typedef long long ll;

bool kado(int a, int b, int c, int d, int e, int f){
	if(b<a&&b<c&&e<d&&e<f) return true;
	else if(b>a&&b>c&&e>d&&e>f) return true;
	else return false;
}

int main(){
	vector<int> v(6);
	for(int i=0; i<6; i++) cin>>v[i];
	
	for(int i=0; i<3; i++){
		for(int j=3; j<6; j++){
			vector<int> a=v;
			swap(a[i],a[j]);
			if(kado(a[0],a[1],a[2],a[3],a[4],a[5])){
				cout<<"Yes"<<endl;
				return 0;
			}
		}
	}
	cout<<"No"<<endl;
}
0