結果

問題 No.2451 Redistribute Integers
ユーザー srjywrdnprktsrjywrdnprkt
提出日時 2023-06-20 23:38:01
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 2,444 ms
コンパイル使用メモリ 199,924 KB
実行使用メモリ 10,992 KB
最終ジャッジ日時 2023-09-01 20:50:08
合計ジャッジ時間 7,146 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 214 ms
10,992 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 146 ms
10,716 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 WA -
testcase_13 AC 184 ms
10,832 KB
testcase_14 AC 203 ms
10,856 KB
testcase_15 AC 102 ms
7,088 KB
testcase_16 AC 88 ms
6,472 KB
testcase_17 WA -
testcase_18 AC 187 ms
10,852 KB
testcase_19 WA -
testcase_20 AC 150 ms
8,984 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main(){

    ll N, S=0;
    cin >> N;
    assert(2 <= N && N <= 5e5);
    
    vector<ll> A(N), B(N);
    for (int i=0; i<N; i++){
        cin >> A[i];
        assert(abs(A[i]) <= 1e9);
        S += A[i];
    }
    
    cout << (S % N == 0 ? "Yes" : "No") << endl;

    return 0;
}
0