結果

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

ソースコード

diff #

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

int main()
{
    int n,x,c,low = 0,high = 0,just = 0;
    cin >> n >> x;
    for(int i = 0;i < n;i++){
        cin >> c;
        if(c == x)just++;
        else if(c < x)low++;
        else high++;
    }
    if(just > 0 || low > 0 && high >> 0)cout << "Yes" << endl;
    else cout << "No" << endl;
}
0