結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
|
| 提出日時 | 2019-07-27 23:21:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 289 bytes |
| コンパイル時間 | 1,703 ms |
| コンパイル使用メモリ | 192,200 KB |
| 最終ジャッジ日時 | 2025-01-07 09:41:21 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, a;
cin >> n >> a;
ll sum = 0;
int x;
for (int i = 0; i < n; i++) {
cin >> x;
sum += x - a;
}
if (sum == 0) puts("YES");
else puts("NO");
return 0;
}