結果
問題 | No.476 正しくない平均 |
ユーザー |
![]() |
提出日時 | 2018-05-01 13:03:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 276 bytes |
コンパイル時間 | 1,546 ms |
コンパイル使用メモリ | 168,008 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 00:07:20 |
合計ジャッジ時間 | 2,419 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; //INSERT ABOVE HERE signed main(){ Int n,a; cin>>n>>a; vector<Int> x(n); for(Int i=0;i<n;i++) cin>>x[i]; Int s=accumulate(x.begin(),x.end(),(Int)0); cout<<(s==a*n?"YES":"NO")<<endl; return 0; }