結果

問題 No.1366 交換門松列・梅
ユーザー ガジュマルガジュマル
提出日時 2021-02-26 20:56:32
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,198 bytes
コンパイル時間 1,628 ms
コンパイル使用メモリ 165,280 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 11:23:03
合計ジャッジ時間 2,470 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
using LLI = long long;
#define INF 999999999
#define MOD 1000000007
#define FOR(i, s, e) for(LLI i = s, i##_lim = (e); i < i##_lim; i++)
#define FORR(i, s, e) for(LLI i = s-1, i##_lim = (e); i##_lim<=i; i--)
#define REP(i, n) FOR(i,0,n)
#define REPR(i, n) FORR(i,n,0)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define bit(a, shift) ((a>>shift)&1))
#define pm(a) ((a)?1:-1)
#define SORT(v) sort(v.begin(),v.end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define Mat2(type,name,h,w,def) vector<vector<type>> name(h,vector<type>(w, def))
#define Mat3(type,name,h,w,d,def) vector<vector<vector<type>>> name(h,vector<vector<type>>(w, vector<int>(d,def)))
// int 2.14E±9    LLIi 9.2E±18    double 1.7E±380


int main()
{
	cout << fixed << setprecision(10);

	vector<int> v(6);
	REP(i, 6)cin >> v[i];

	REP(i, 3)
	{
		REP(j, 3)
		{
			vector<int> v2 = v;
			swap(v2[i], v2[j + 3]);

			if (v2[0] != v2[1] && v2[1] != v2[2] && v2[3] != v2[4] && v2[4] != v2[5] && max(max(v2[0], v2[1]), v2[2]) == v2[1] && max(max(v2[3], v2[4]), v2[5]) == v2[4])
			{
				cout << "Yes";
				return 0;
			}
		}
	}
	cout << "No";

	return 0;
}
0