結果

問題 No.2451 Redistribute Integers
ユーザー otoshigootoshigo
提出日時 2023-09-01 21:22:12
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 589 bytes
コンパイル時間 572 ms
コンパイル使用メモリ 73,520 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-01 21:22:14
合計ジャッジ時間 2,468 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 64 ms
4,380 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 49 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
testcase_13 AC 59 ms
4,376 KB
testcase_14 AC 63 ms
4,380 KB
testcase_15 AC 33 ms
4,380 KB
testcase_16 AC 29 ms
4,376 KB
testcase_17 WA -
testcase_18 AC 58 ms
4,380 KB
testcase_19 WA -
testcase_20 AC 51 ms
4,376 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
using ll=long long;
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
template<class T> bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;}
template<class T> bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N;
    cin>>N;
    ll s=0;
    for(int i=0;i<N;i++){
        ll a;
        cin>>a;
        s+=a;
    }
    if(s%N!=0)cout<<"No"<<"\n";
    else cout<<"Yes"<<"\n";
}
0