15862022-11-28 16:08:53sarminKövek (100 pont)cpp17Wrong answer 22/10027ms4652 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {

	double N;
	cin >> N;
	vector<int> K(N);
	double sum = 0;
	for (int i = 0; i < N; i++) {
		cin >> K[i];
		sum += K[i];
	}

	double valami = sum / N, valami2 = 0, valami3 = 0;
	for (int i = 0; i < N; i++) {
		if (K[i] > valami) {
			valami2++;
		} else if (K[i] < valami) {
			valami3++;
		}
	}

	cout << ceil((valami2+valami3)/2);

	return 0;
}
SubtaskSumTestVerdictTimeMemory
base22/100
1Accepted0/03ms1744 KiB
2Wrong answer0/027ms2556 KiB
3Accepted5/52ms2112 KiB
4Wrong answer0/52ms2300 KiB
5Wrong answer0/52ms2376 KiB
6Wrong answer0/52ms2492 KiB
7Accepted5/52ms2616 KiB
8Accepted5/52ms2824 KiB
9Accepted7/72ms2912 KiB
10Wrong answer0/72ms3156 KiB
11Wrong answer0/82ms3192 KiB
12Wrong answer0/82ms3316 KiB
13Wrong answer0/83ms3540 KiB
14Wrong answer0/84ms3768 KiB
15Wrong answer0/810ms3936 KiB
16Wrong answer0/824ms4316 KiB
17Wrong answer0/827ms4652 KiB