結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
seiyu_kyopro
|
| 提出日時 | 2021-02-14 21:25:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 989 bytes |
| コンパイル時間 | 1,632 ms |
| コンパイル使用メモリ | 172,992 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 08:39:42 |
| 合計ジャッジ時間 | 2,206 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include<bits/stdc++.h>
#define rep(i,N) for(int i=0;i<(N);i++)
#define rrep(i, n) for (int i = (int)n-1; i >= 0; --i)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e12;
const int inf = 1e9;
const int mod = 1e9+7;
typedef long long ll;
typedef pair<ll,int> P;
typedef set<int> S;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
__attribute__ ((constructor))
void fastio() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(10);
}
int main(){
int n, x;
cin >> n >> x;
vector<int> a(n);
rep(i, n) cin >> a[i];
sort(a.begin(), a.end());
int min_ = a[0];
int max_ = a.back();
if(min_ <= x && x <= max_){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
return 0;
}
seiyu_kyopro