結果
| 問題 | No.476 正しくない平均 |
| コンテスト | |
| ユーザー |
daradara_sanma
|
| 提出日時 | 2018-04-30 14:31:37 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 334 bytes |
| 記録 | |
| コンパイル時間 | 775 ms |
| コンパイル使用メモリ | 75,888 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-16 06:34:23 |
| 合計ジャッジ時間 | 1,711 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
int main() {
int n, a, xi;
double ans = 0;
scanf("%d %d", &n, &a);
for (int i = 0; i < n; i++)
{
scanf("%d", &xi);
ans += xi;
}
if (double(a) == ans / n) printf("YES\n");
else printf("NO\n");
return 0;
}
daradara_sanma