結果

問題 No.476 正しくない平均
ユーザー kaito_tateyama
提出日時 2017-08-13 17:00:46
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 950 ms
コンパイル使用メモリ 71,420 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-13 09:09:36
合計ジャッジ時間 1,551 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
//---------------------------
using namespace std;
//---------------------------
#define REP(i,n) for(int i = 0; i < (n); i++)
#define P(x) cout << (x) << "\n"
//---------------------------


int main(){
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);



  long long sum=0,n,a;cin >> n >> a;
  REP(i,n){
    long long b;cin >> b;
    sum += b;
  }
  cout << (sum / (float)n == a ? "YES" : "NO") << endl;


  return 0;
}
0