結果
問題 | No.1395 Less Sweet Alchemy |
ユーザー |
|
提出日時 | 2021-02-14 21:45:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 393 bytes |
コンパイル時間 | 1,831 ms |
コンパイル使用メモリ | 191,304 KB |
最終ジャッジ日時 | 2025-01-18 20:51:52 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); int n, x; cin >> n >> x; bool hi = false, lo = false; for (int i = 0; i < n; i++) { int a; cin >> a; if (a >= x) { hi = true; } if (a <= x) { lo = true; } } cout << (hi && lo ? "Yes" : "No") << endl; return 0; }