結果

問題 No.2451 Redistribute Integers
ユーザー hiro71687khiro71687k
提出日時 2023-09-01 21:23:31
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 4,100 ms
コンパイル使用メモリ 259,968 KB
実行使用メモリ 7,068 KB
最終ジャッジ日時 2023-09-01 21:23:42
合計ジャッジ時間 7,244 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 213 ms
6,992 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 146 ms
6,976 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 WA -
testcase_13 AC 186 ms
6,912 KB
testcase_14 AC 204 ms
7,068 KB
testcase_15 AC 104 ms
5,212 KB
testcase_16 AC 89 ms
4,884 KB
testcase_17 WA -
testcase_18 AC 190 ms
7,064 KB
testcase_19 WA -
testcase_20 AC 154 ms
6,016 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using namespace std;
using ll=long long;
using ld=long double;
ld pie=3.141592653589793;
ll mod=1000000007;
ll inf=1009999999999999990;
int main(){
    ll n;
    cin >> n;
    vector<ll>a(n);
    ll sum=0;
    for (ll i = 0; i < n; i++)
    {
        cin >> a[i];
        sum+=a[i];
    }
    if (sum%n==0)
    {
        cout << "Yes" << endl;
    }else{
        cout << "No" <<endl;
    }
    
}
0