結果
| 問題 |
No.1366 交換門松列・梅
|
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2021-02-06 18:41:03 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 1,092 bytes |
| コンパイル時間 | 1,027 ms |
| コンパイル使用メモリ | 127,928 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-20 11:00:30 |
| 合計ジャッジ時間 | 1,683 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <stack>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
bool is_kadomatsu(vector<int> a){
if(a[0]>a[1] && a[1]<a[2] && a[0]!=a[2]) return true;
if(a[0]<a[1] && a[1]>a[2] && a[0]!=a[2]) return true;
return false;
}
int main()
{
vector<int> a(3), b(3);
for(int i=0; i<3; i++) cin>>a[i];
for(int i=0; i<3; i++) cin>>b[i];
for(int i=0; i<3; i++){
for(int j=0; j<3; j++){
swap(a[i], b[j]);
if(is_kadomatsu(a) && is_kadomatsu(b)){
cout<<"Yes"<<endl;
return 0;
}
swap(a[i], b[j]);
}
}
cout<<"No"<<endl;
return 0;
}
chocorusk