結果

問題 No.2451 Redistribute Integers
ユーザー PAKACHUPAKACHU
提出日時 2023-09-01 21:26:44
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 497 bytes
コンパイル時間 2,079 ms
コンパイル使用メモリ 135,136 KB
実行使用メモリ 7,056 KB
最終ジャッジ日時 2023-09-01 21:26:52
合計ジャッジ時間 5,522 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,356 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 229 ms
7,052 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 158 ms
7,056 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
testcase_13 AC 197 ms
7,012 KB
testcase_14 AC 219 ms
7,032 KB
testcase_15 AC 112 ms
5,012 KB
testcase_16 AC 95 ms
4,984 KB
testcase_17 WA -
testcase_18 AC 202 ms
7,012 KB
testcase_19 WA -
testcase_20 AC 164 ms
6,016 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;
typedef long double ld;
int dx[8] = { 1, 0, -1, 0, 1, 1, -1, -1 }, dy[8] = { 0, 1, 0, -1, 1, -1, 1, -1 };
const long long mod = 998244353;
const ll inf = 1LL << 60;
const int INF = 5e8;

int main()
{
    int n;
    cin >> n;
    vector<ll> a(n);
    for (int i = 0; i < n; i++)
        cin >> a[i];

    ll s = accumulate(a.begin(), a.end(), 0LL);
    cout << (s % n ? "No" : "Yes") << endl;
}
0