結果
問題 | No.1395 Less Sweet Alchemy |
ユーザー |
![]() |
提出日時 | 2021-02-14 21:32:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 477 bytes |
コンパイル時間 | 1,597 ms |
コンパイル使用メモリ | 168,964 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 08:51:52 |
合計ジャッジ時間 | 2,235 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 WA * 1 |
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int i=(0);i<(n);i++)using namespace std;typedef long long ll;int main(){cin.tie(0);ios::sync_with_stdio(false);int N, X;cin >> N >> X;vector<int> C(N);rep(i, N) cin >> C[i];if(N == 1){if(X == C[0]){cout << "Yes" << endl;}else{cout << "No" << endl;}}else{if(any_of(C.begin(), C.end(), [&](int x){ return x <= X;})){cout << "Yes" << endl;}else{cout << "No" << endl;}}}