87012024-01-25 18:24:20AzukitsuKövek (100 pont)cpp17Wrong answer 27/10028ms4424 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++) {
            int kulonbseg = kovek[i] - mean;
            kulonbsegek[i] = kulonbseg;
            if (kulonbseg > 0) pozitivok += 1;
            if (kulonbseg < 0) negativok += 1;
    }
    cout << max(negativok, pozitivok) << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base27/100
1Accepted0/03ms1812 KiB
2Wrong answer0/028ms3484 KiB
3Accepted5/53ms2220 KiB
4Accepted5/52ms2300 KiB
5Wrong answer0/52ms2300 KiB
6Wrong answer0/53ms2428 KiB
7Accepted5/52ms2508 KiB
8Accepted5/53ms2636 KiB
9Accepted7/73ms2664 KiB
10Wrong answer0/73ms2720 KiB
11Wrong answer0/83ms2936 KiB
12Wrong answer0/83ms3020 KiB
13Wrong answer0/83ms3036 KiB
14Wrong answer0/84ms3092 KiB
15Wrong answer0/812ms3392 KiB
16Wrong answer0/826ms4244 KiB
17Wrong answer0/828ms4424 KiB