結果
| 問題 |
No.1586 Equal Array
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-20 00:01:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 1,000 ms |
| コード長 | 347 bytes |
| コンパイル時間 | 1,453 ms |
| コンパイル使用メモリ | 167,168 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-17 13:37:32 |
| 合計ジャッジ時間 | 2,956 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e+9;
const ll LINF = (ll)pow(10,18);
int main(){
int n;
cin >> n;
int a;
ll sum = 0;
for(int i=0; i<n; i++){
cin >> a;
sum += a;
}
if((double)sum/n == sum/n) cout << "Yes" << endl;
else cout << "No" << endl;
}