結果

問題 No.2451 Redistribute Integers
ユーザー planesplanes
提出日時 2023-09-01 21:23:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 1,524 ms
コンパイル使用メモリ 166,352 KB
実行使用メモリ 6,992 KB
最終ジャッジ日時 2023-09-01 21:23:15
合計ジャッジ時間 3,534 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 67 ms
6,872 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 50 ms
6,808 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 WA -
testcase_13 AC 61 ms
6,932 KB
testcase_14 AC 64 ms
6,872 KB
testcase_15 AC 34 ms
5,212 KB
testcase_16 AC 31 ms
4,936 KB
testcase_17 WA -
testcase_18 AC 61 ms
6,992 KB
testcase_19 WA -
testcase_20 AC 52 ms
5,956 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

  #include <bits/stdc++.h> 
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 #define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)

ll INF=2e18;


int main() {
    ios::sync_with_stdio(false);
  cin.tie(0);
ll N;cin>>N;
vector<ll> A(N);
ll s=0;
for(ll i=0;i<N;i++) {
  cin>>A[i];
  s+=A[i];
}

if(s%N==0) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
0