結果
| 問題 |
No.1395 Less Sweet Alchemy
|
| コンテスト | |
| ユーザー |
Narumisakakios
|
| 提出日時 | 2021-02-14 21:50:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 1,434 ms |
| コンパイル使用メモリ | 166,656 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-22 09:21:27 |
| 合計ジャッジ時間 | 2,286 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ll N,X;cin>>N>>X;
ll ct = 0;
ll ct2 = 100;
for(ll i=0;i<N;i++){
ll C;cin>>C;
ct = max(ct,C);
ct2 = min(ct2,C);
}
if(X>=ct2&&X<=ct){
cout<<"Yes"<<endl;
return 0;
}else if(X==ct||X==ct2){
cout<<"Yes"<<endl;
return 0;
}else{
cout<<"No"<<endl;
}
}
Narumisakakios