結果
問題 |
No.2812 Plus Minus Blackboard
|
ユーザー |
|
提出日時 | 2024-08-16 09:37:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 722 bytes |
コンパイル時間 | 979 ms |
コンパイル使用メモリ | 113,084 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-04-08 23:45:32 |
合計ジャッジ時間 | 2,849 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 2 |
ソースコード
#include<iostream> #include<string> #include<queue> #include<vector> #include<cassert> #include<random> #include<set> #include<map> #include<cassert> #include<unordered_map> #include<bitset> #include<numeric> #include<algorithm> using namespace std; typedef long long ll; const int inf=1<<30; const ll INF=1LL<<62; typedef pair<int,ll> P; typedef pair<int,P> PP; const ll MOD=998244353; int main(){ int N; cin>>N; vector<ll> A(N); ll sumA=0; ll minA=INF,maxA=-INF; for(int i=0;i<N;i++){ cin>>A[i]; minA=min(minA,A[i]); maxA=max(maxA,A[i]); sumA+=A[i]; } if(minA<sumA && sumA<maxA){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } }