結果

問題 No.1586 Equal Array
ユーザー zezero
提出日時 2021-07-08 22:46:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 44 ms / 1,000 ms
コード長 517 bytes
コンパイル時間 2,985 ms
コンパイル使用メモリ 152,708 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 12:59:30
合計ジャッジ時間 4,448 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <cstring>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < int(n);i++)

int main(){
  int n;
  cin >> n;
  ll sum = 0;
  rep(i,n) {
    ll x;
    cin >> x;
    sum += x;
  }
  if (sum%n == 0){
    cout << "Yes" << endl;
  }
  else cout << "No" << endl;
  return 0;
}
0