結果
問題 |
No.476 正しくない平均
|
ユーザー |
|
提出日時 | 2019-08-31 06:48:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 517 bytes |
コンパイル時間 | 1,561 ms |
コンパイル使用メモリ | 167,576 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 22:45:17 |
合計ジャッジ時間 | 2,554 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
/** @file 476.cpp @title No.476 正しくない平均 - yukicoder @url https://yukicoder.me/problems/no/476 **/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define ALL(obj) (obj).begin(), (obj).end() #define REP(i, N) for (int i = 0; i < (N); ++i) int main() { LL n, a; cin >> n >> a; vector<LL> x(n, 0); LL sum = 0; REP(i, n) { cin >> x[i]; sum += x[i]; } if (a * n == sum) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }