結果
問題 |
No.1395 Less Sweet Alchemy
|
ユーザー |
![]() |
提出日時 | 2021-02-23 10:24:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 470 bytes |
コンパイル時間 | 590 ms |
コンパイル使用メモリ | 66,148 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 06:26:17 |
合計ジャッジ時間 | 1,354 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int n,x; cin>>n>>x; bool low=false,high=false; for(int i=0;i<n;i++){ int ci; cin>>ci; if(ci==x){ cout<<"Yes"<<endl; return 0; }else if(ci<x){ low=true; }else{ high=true; } } if(low && high){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } return 0; }