結果

問題 No.1366 交換門松列・梅
ユーザー Shawn stayCShawn stayC
提出日時 2021-03-07 10:50:44
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 538 bytes
コンパイル時間 1,971 ms
コンパイル使用メモリ 197,528 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-17 08:18:29
合計ジャッジ時間 2,650 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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