結果

問題 No.2451 Redistribute Integers
ユーザー PAKACHUPAKACHU
提出日時 2023-09-01 21:25:49
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 498 bytes
コンパイル時間 2,444 ms
コンパイル使用メモリ 133,460 KB
実行使用メモリ 5,008 KB
最終ジャッジ日時 2023-09-01 21:25:55
合計ジャッジ時間 4,970 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 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,376 KB
testcase_04 AC 220 ms
4,980 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 152 ms
4,988 KB
testcase_09 AC 1 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 192 ms
4,964 KB
testcase_14 AC 212 ms
4,956 KB
testcase_15 AC 108 ms
4,376 KB
testcase_16 AC 90 ms
4,376 KB
testcase_17 WA -
testcase_18 AC 194 ms
4,992 KB
testcase_19 WA -
testcase_20 AC 153 ms
4,696 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<int> 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