結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
monnu
|
| 提出日時 | 2021-02-14 21:24:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 552 bytes |
| コンパイル時間 | 1,457 ms |
| コンパイル使用メモリ | 172,480 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 08:38:50 |
| 合計ジャッジ時間 | 2,011 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 6 WA * 6 |
ソースコード
#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