87002024-01-25 18:19:11AzukitsuKövek (100 pont)cpp17Wrong answer 27/10028ms4956 KiB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    int N, sum = 0;
    cin >> N;
    vector<int> kovek(N, 0);
    for (int i = 0; i < N; i++) {
            cin >> kovek[i];
            sum += kovek[i];
    }
    int mean = sum / N;
    vector<int> kulonbsegek(N, 0);
    int count = 1;
    int negativok = 0;
    int pozitivok = 0;
    for (int i = 0; i < N; i++) {
            kulonbsegek[i] = kovek[i] - mean;
            if (kulonbsegek[i] > 0) pozitivok += 1;
            else if (kulonbsegek[i] < 0) negativok += 1;
    }
    cout << max(negativok, pozitivok) << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base27/100
1Accepted0/03ms1680 KiB
2Wrong answer0/028ms3204 KiB
3Accepted5/53ms2064 KiB
4Accepted5/52ms2180 KiB
5Wrong answer0/53ms2280 KiB
6Wrong answer0/53ms2524 KiB
7Accepted5/53ms2736 KiB
8Accepted5/52ms2816 KiB
9Accepted7/73ms3060 KiB
10Wrong answer0/73ms3432 KiB
11Wrong answer0/83ms3252 KiB
12Wrong answer0/83ms3200 KiB
13Wrong answer0/83ms3456 KiB
14Wrong answer0/84ms3864 KiB
15Wrong answer0/812ms4036 KiB
16Wrong answer0/826ms4884 KiB
17Wrong answer0/828ms4956 KiB