結果
問題 | No.1366 交換門松列・梅 |
ユーザー |
![]() |
提出日時 | 2021-01-29 22:16:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 613 bytes |
コンパイル時間 | 1,456 ms |
コンパイル使用メモリ | 197,800 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-20 10:57:24 |
合計ジャッジ時間 | 1,987 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; bool iskado(int x,int y,int z){ if(y>x && y>z && x!=z) return true; if(y<x && y<z && x!=z) return true; return false; } int main(){ vector<int> A(3),B(3); rep(i,3) cin>>A[i]; rep(i,3) cin>>B[i]; bool b=false; rep(i,3){ rep(j,3){ vector<int> C=A; vector<int> D=B; swap(C[i],D[j]); if(iskado(C[0],C[1],C[2]) && iskado(D[0],D[1],D[2])) b=true; } } if(b) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }