結果

問題 No.2451 Redistribute Integers
ユーザー SotaSota
提出日時 2024-03-05 12:25:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 939 bytes
コンパイル時間 1,100 ms
コンパイル使用メモリ 102,520 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-05 12:25:38
合計ジャッジ時間 6,790 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 229 ms
6,676 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 157 ms
6,676 KB
testcase_09 AC 1 ms
6,676 KB
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 2 ms
6,676 KB
testcase_12 WA -
testcase_13 AC 219 ms
6,676 KB
testcase_14 AC 217 ms
6,676 KB
testcase_15 AC 110 ms
6,676 KB
testcase_16 AC 95 ms
6,676 KB
testcase_17 WA -
testcase_18 AC 202 ms
6,676 KB
testcase_19 WA -
testcase_20 AC 163 ms
6,676 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES

#include <iostream>		//cin, cout
#include <vector>		//vector
#include <algorithm>	//sort,min,max,count
#include <string>		//string,getline, to_string
#include <cstdlib>		//abs(int)
#include <utility>		//swap, pair
#include <tuple>        //tuple
#include <deque>		//deque
#include <climits>		//INT_MAX
#include <bitset>		//bitset
#include <cmath>		//sqrt, ceil. M_PI, pow, sin
#include <ios>			//fixed
#include <iomanip>		//setprecision
#include <sstream>		//stringstream
#include <numeric>		//gcd, assumlate
#include <random>		//randam_device
#include <limits>		//numeric_limits
#include <functional>

using namespace std;
constexpr long long int D_MOD = 1000000007;

int main() {

	int N;
	cin >> N;

	vector<int> A(N);

	int64_t sum = 0;

	for (int i = 0; i < N; i++) {
		cin >> A.at(i);
		sum += A.at(i);
	}

	if (sum % N != 0) {
		cout << "No" << endl;
		return 0;
	}

	cout << "Yes" << endl;

	return 0;

}
0