結果

問題 No.1395 Less Sweet Alchemy
ユーザー soldray
提出日時 2021-02-17 21:30:00
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 443 bytes
コンパイル時間 4,687 ms
コンパイル使用メモリ 127,736 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-14 06:47:37
合計ジャッジ時間 3,347 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

// Less Sweet Alchemy

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main() {
  int N, X;

  cin >> N >> X;

  vector<int> A;

  for (int i = 0; i < N; i++) {
    int in;

    cin >> in;

    A.push_back(in - X);
  }

  sort(A.begin(), A.end());

  if ((A[0] < 0 && N > 1) || (N == 1 && A[0] == 0)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  return 0;
}
0