結果
| 問題 | No.1586 Equal Array |
| コンテスト | |
| ユーザー |
merom686
|
| 提出日時 | 2021-07-08 22:23:07 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 1,000 ms |
| コード長 | 381 bytes |
| 記録 | |
| コンパイル時間 | 1,177 ms |
| コンパイル使用メモリ | 210,568 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-21 11:49:24 |
| 合計ジャッジ時間 | 2,471 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
ll s = 0;
for (int i = 0; i < n; i++) {
s += a[i];
}
cout << (s % n == 0 ? "Yes" : "No") << endl;
return 0;
}
merom686