結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-14 21:54:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 513 ms |
| コンパイル使用メモリ | 62,848 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 09:26:27 |
| 合計ジャッジ時間 | 1,140 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include <iostream>
using namespace std;
int main() {
int n, x;
cin >> n >> x;
int c_max = 1, c_min = 99;
for (int i = 0; i < n; ++i) {
int c;
cin >> c;
if (c > c_max) c_max = c;
if (c < c_min) c_min = c;
}
if (x >= c_min && x <= c_max) {
puts("Yes");
} else {
puts("No");
}
return 0;
}