結果
| 問題 |
No.1366 交換門松列・梅
|
| コンテスト | |
| ユーザー |
Flkanjin
|
| 提出日時 | 2022-01-06 16:25:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,095 bytes |
| コンパイル時間 | 1,393 ms |
| コンパイル使用メモリ | 140,536 KB |
| 最終ジャッジ日時 | 2025-01-27 08:54:35 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 5 |
ソースコード
#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
const int MOD = 1'000'000'007;
const int MOD2 = 998'244'353;
const int INF = 1'000'000'000; //1e9
const int NIL = -1;
const long long LINF = 1'000'000'000'000'000'000; // 1e18
const long double EPS = 1E-10L;
template<class T, class S> inline bool chmax(T &a, const S &b){
if(a < b){a = b; return true;}
return false;
}
template<class T, class S> inline bool chmin(T &a, const S &b){
if(b < a){a = b; return true;}
return false;
}
template<class T, class Container> inline bool exist(Container &s, const T &e){
return (s.find(e) != std::end(s));
}
template<class T> inline bool inside(T x, T lx, T rx){
return (std::clamp(x, lx, rx) == x);
}
template<class T> inline bool inside(T x, T y, T lx, T rx, T ly, T ry){
return inside(x, lx, rx) && inside(y, ly, ry);
}
inline bool kadomatsu(std::vector<int> &a){
return ((a[1] == *std::max_element(std::begin(a), std::end(a))) || (a[1] == *std::min_element(std::begin(a), std::end(a)))) && (a[0] != a[1]) && (a[1] != a[2]) || (a[2] != a[0]);
}
int main(){
std::vector<int> a(3), b(3);
bool okay{false};
for(auto &e: a) std::cin >> e;
for(auto &e: b) std::cin >> e;
for(int i{0}; i < 3; ++i){
for(int j{0}; j < 3; ++j){
std::swap(a[i], b[j]);
okay |= kadomatsu(a) && kadomatsu(b);
std::swap(a[i], b[j]);
}
}
std::cout << (okay ? "Yes" : "No") << std::endl;
return 0;
}
Flkanjin