結果

問題 No.2451 Redistribute Integers
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-03-12 08:58:04
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 965 bytes
コンパイル時間 7,739 ms
コンパイル使用メモリ 349,540 KB
実行使用メモリ 7,224 KB
最終ジャッジ日時 2024-03-12 08:58:17
合計ジャッジ時間 12,568 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 62 ms
7,224 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 47 ms
7,224 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 3 ms
6,676 KB
testcase_12 WA -
testcase_13 AC 90 ms
7,224 KB
testcase_14 AC 61 ms
7,224 KB
testcase_15 AC 46 ms
6,676 KB
testcase_16 AC 29 ms
6,676 KB
testcase_17 WA -
testcase_18 AC 58 ms
7,224 KB
testcase_19 WA -
testcase_20 AC 51 ms
6,676 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <atcoder/all>


using namespace std;
using namespace atcoder;
#define rep(i,m,n,k) for (int i = (int)(m); i < (int)(n); i += (int)(k))
#define rrep(i,m,n,k) for (int i = (int)(m); i > (int)(n); i += (int)(k))
#define all(x) x.begin(),x.end()
#define ll long long
#define list(T,A,N) vector<T> A(N);for(int i=0;i<(int)(N);i++){cin >> A[i];}
template<typename T> bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;}
template<typename T> bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;}
// #define int long long


int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    ll N;
    cin >> N ;
    list(ll,A,N);
    ll sum = 0;
    rep(i,0,N,1){
        sum += A[i];
    }
    if(sum%N==0){
        cout << "Yes" << "\n";
    }
    else{
        cout << "No" << "\n";
    }
    return 0;
}


0