結果

問題 No.1395 Less Sweet Alchemy
ユーザー だれ
提出日時 2021-02-14 21:26:13
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 792 bytes
コンパイル時間 4,033 ms
コンパイル使用メモリ 251,948 KB
最終ジャッジ日時 2025-01-18 20:36:50
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define _rep(i, n) _rep2(i, 0, n)
#define _rep2(i, a, b) for(int i = (int)(a); i < (int)(b); i++)
#define rep(...) GET_MACRO(__VA_ARGS__, _rep2, _rep)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define i64 long long
template<class T>
bool chmin(T& a, const T& b) { return (b < a) ? (a = b, true) : false; }
template<class T>
bool chmax(T& a, const T& b) { return (b > a) ? (a = b, true) : false; }


int main()
{
    int n, x;
    cin >> n >> x;
    vector<int> c(n);
    rep(i, n) cin >> c[i];
    sort(all(c));
    if(c[0] <= x && c.back() >= x) cout <<  "Yes" << endl;
    else cout << "No" << endl;
}
0