結果
| 問題 | 
                            No.1586 Equal Array
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-07-08 22:29:30 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 14 ms / 1,000 ms | 
| コード長 | 388 bytes | 
| コンパイル時間 | 2,325 ms | 
| コンパイル使用メモリ | 191,548 KB | 
| 最終ジャッジ日時 | 2025-01-22 18:37:46 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve() {
	int n; cin >> n;
	ll s = 0;
	for (int i = 0; i <n;++i) {
		ll x; cin >> x;
		s += x;
	}
	ll k = s / n;
	if (n * k == s) {
		cout << "Yes\n";
	} else {
		cout << "No\n";
	}
	return;
}
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	ll t = 1;
	//cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}