結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2021-08-21 19:56:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 333 bytes |
| コンパイル時間 | 1,557 ms |
| コンパイル使用メモリ | 166,416 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 10:34:07 |
| 合計ジャッジ時間 | 2,307 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N, X;
cin >> N >> X;
int e = 0;
int b = 0;
int s = 0;
for( int i = 0; i < N; i++ ) {
int C;
cin >> C;
if( C == X ) e = 1;
else if( C > X ) b = 1;
else if( C < X ) s = 1;
}
string ans = "No";
if( e || (b && s) ) ans = "Yes";
cout << ans << endl;
}
forest3