58512023-10-03 23:28:37mmatedKövek (100 pont)cpp17Wrong answer 22/10012ms5176 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n;
    cin>>n;
    int a[n];
    int s=0;
    f(i,0,n)
    {
        cin>>a[i];
        s+=a[i];
    }
    int avg=s/n;
    int c=0;
    f(i,0,n)    if(a[i]==avg)   c++;
    cout<<(n-c+1)/2;

}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base22/100
1Accepted0/03ms1896 KiB
2Wrong answer0/010ms2896 KiB
3Accepted5/52ms2296 KiB
4Wrong answer0/53ms2524 KiB
5Wrong answer0/53ms2732 KiB
6Wrong answer0/52ms2952 KiB
7Accepted5/52ms3028 KiB
8Accepted5/52ms3044 KiB
9Accepted7/72ms3240 KiB
10Wrong answer0/73ms3452 KiB
11Wrong answer0/83ms3936 KiB
12Wrong answer0/82ms3824 KiB
13Wrong answer0/83ms3964 KiB
14Wrong answer0/83ms4072 KiB
15Wrong answer0/86ms4580 KiB
16Wrong answer0/810ms4916 KiB
17Wrong answer0/812ms5176 KiB