結果
問題 | No.476 正しくない平均 |
ユーザー |
![]() |
提出日時 | 2017-01-27 22:21:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 1,671 ms |
コンパイル使用メモリ | 167,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 09:33:49 |
合計ジャッジ時間 | 2,695 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main() {cin.tie(0);ios::sync_with_stdio(false);ll n, a;cin >> n >> a;ll sum = 0;for(int i = 0; i < n; i++) {ll x;cin >> x;sum += x;}if(sum == n * a) {cout << "YES" << endl;}else {cout << "NO" << endl;}}