結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
monnu
|
| 提出日時 | 2021-02-14 21:29:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 552 bytes |
| コンパイル時間 | 1,690 ms |
| コンパイル使用メモリ | 172,732 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 08:48:12 |
| 合計ジャッジ時間 | 2,347 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
using ll=long long;
using Graph=vector<vector<int>>;
#define MOD 1000000007
#define INF 1000000000
#define MAX 500000
int main(){
int N,X;
cin>>N>>X;
vector<int> C(N);
bool flag=false;
for(int i=0;i<N;i++){
cin>>C[i];
if(C[i]==X){
flag=true;
}
}
sort(C.begin(),C.end());
if(flag==true){
cout<<"Yes"<<endl;
}else{
if(C[0]<X&&X<C[N-1]){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
}
monnu