結果

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

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <queue>
#include <cmath>
#include <iomanip>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i=0;i < (int)(n);i++)

void sol(){
    int n;
    cin >> n;
    ll sum = 0;
    for (int i = 0; i < n;i++){
        ll x;
        cin >> x;
        sum += x;
    }
    if (sum%n == 0){
        cout << "Yes\n"; 
    }
    else cout << "No\n";
}

int main(){
    int test = 1;
    //cin >> test;
    while(test--){
        sol();
    }
}
0