結果

問題 No.1395 Less Sweet Alchemy
ユーザー Cyclone28
提出日時 2021-02-14 22:32:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 1,435 ms
コンパイル使用メモリ 168,808 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-22 10:21:23
合計ジャッジ時間 1,970 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n, x; cin >> n >> x;
    vector<int> a(n);
    for(int i = 0; i < n ; i++){
        cin >> a[i];
    }
    int m = *max_element(a.begin(), a.end()), l = *min_element(a.begin(), a.end());
    if(x <= m && x >= l) cout << "Yes" << endl;
    else cout << "No" << endl;
}
0