結果

問題 No.476 正しくない平均
コンテスト
ユーザー kime-cheese
提出日時 2021-05-30 08:51:35
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 300µs
コード長 669 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 812 ms
コンパイル使用メモリ 183,216 KB
実行使用メモリ 9,924 KB
最終ジャッジ日時 2026-09-21 12:03:48
合計ジャッジ時間 2,379 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
//#include<boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace std;
using ll = int64_t;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0; i<(int)n; i++)
#define llrep(i,n) for(ll i=0; i<(ll)n; i++)
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてから使う
#define INF 2147483647
#define LLINF 9223372036854775807LL
#define fi first
#define se second
#define kiriage(x,y) (((x)+(y)-1)/(y))
typedef vector<int> vi;
typedef vector<ll> vll;

int main(){
	ll n,a; cin>>n>>a;
	ll sum = 0;
	rep(i,n){
		ll x; cin>>x;
		sum += x;
	}
	cout << (sum==a*n? "YES":"NO") << endl;
}
0