結果

問題 No.2451 Redistribute Integers
ユーザー tnakao0123tnakao0123
提出日時 2023-09-08 14:50:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 519 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 41,236 KB
実行使用メモリ 4,916 KB
最終ジャッジ日時 2023-09-08 14:50:20
合計ジャッジ時間 2,279 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 70 ms
4,860 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 56 ms
4,912 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 WA -
testcase_13 AC 67 ms
4,916 KB
testcase_14 AC 67 ms
4,864 KB
testcase_15 AC 35 ms
4,380 KB
testcase_16 AC 32 ms
4,380 KB
testcase_17 WA -
testcase_18 AC 66 ms
4,876 KB
testcase_19 WA -
testcase_20 AC 55 ms
4,396 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 2451.cc:  No.2451 Redistribute Integers - yukicoder
 */

#include<cstdio>
#include<algorithm>
 
using namespace std;

/* constant */

const int MAX_N = 500000;

/* typedef */

typedef long long ll;

/* global variables */

int as[MAX_N];

/* subroutines */

/* main */

int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", as + i);

  ll sum = 0;
  for (int i = 0; i < n; i++) sum += as[i];

  if (sum % n == 0) puts("Yes");
  else puts("No");
  return 0;
}
0