結果
| 問題 |
No.1366 交換門松列・梅
|
| コンテスト | |
| ユーザー |
ManjushriMitra
|
| 提出日時 | 2025-03-16 16:30:11 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,217 bytes |
| コンパイル時間 | 3,141 ms |
| コンパイル使用メモリ | 276,996 KB |
| 実行使用メモリ | 7,328 KB |
| 最終ジャッジ日時 | 2025-03-16 16:30:15 |
| 合計ジャッジ時間 | 3,872 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 WA * 5 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,m,n) for(int i=m; i<int(n); ++i)
#define repll(i,m,n) for(ll i=m; i<ll(n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define leng(a) int(a.size())
#define fi first
#define se second
template<typename T> bool chmin(T& a, T b){ if(a > b){a = b; return true;} return false; }
template<typename T> bool chmax(T& a, T b){ if(a < b){a = b; return true;} return false; }
template<typename T> T gcd(T a, T b){ return a % b ? gcd(b, a % b) : b; }
template<typename T> T lcm(T a, T b){ return a / gcd(a, b) * b; }
bool is_kado(vector<int> v){
if(v[0] > v[1] && v[1] < v[2]) return true;
else if(v[0] < v[1] && v[1] > v[2]) return true;
else return false;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
vector<int> a(3), b(3);
rep(i, 0, 3) cin >> a[i];
rep(i, 0, 3) cin >> b[i];
rep(i, 0, 3) rep(j, 0, 3){
auto a2 = a, b2 = b;
swap(a2[i], b2[j]);
if(is_kado(a2) && is_kado(b2)){
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
}
ManjushriMitra