結果
| 問題 | No.476 正しくない平均 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-30 15:32:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 434 bytes |
| 記録 | |
| コンパイル時間 | 1,275 ms |
| コンパイル使用メモリ | 158,768 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-06 14:31:40 |
| 合計ジャッジ時間 | 2,177 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define FORR(i,l,n) for(int (i)=l;(i)<(int)(n);++(i))
long long x[11];
void solve() {
int n;
long long a;
std::cin >> n >> a;
long long sum= 0;
FOR(i, n) {
std::cin >> x[i];
sum += x[i];
}
if (sum == n * a) cout << "YES" << endl;
else cout << "NO" << endl;
}
int main() {
ios::sync_with_stdio(false);
solve();
return 0;
}