結果

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;

int main() {
    int n, x;
    cin >> n >> x;

    int b[2] = {};
    for (int i = 0; i < n; i++) {
        int c;
        cin >> c;

        if (c <= x) b[0] = 1;
        if (c >= x) b[1] = 1;
    }

    cout << ((b[0] && b[1]) ? "Yes" : "No") << endl;

    return 0;
}
0