結果

問題 No.476 正しくない平均
ユーザー commycommy
提出日時 2017-10-10 00:08:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 382 bytes
コンパイル時間 591 ms
コンパイル使用メモリ 68,660 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-17 07:10:45
合計ジャッジ時間 1,364 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>

#define REP(i, a, b) for (int i = int(a); i < int(b); i++)

using namespace std;

typedef long long int lli;

int main() {
    lli N, A;
    cin >> N >> A;
    lli sum = 0;
    REP (i, 0, N) {
        int tmp;
        cin >> tmp;
        sum += tmp;
    }
    cout << (N * A == sum ? "YES" : "NO") << endl;
    return 0;
}
0