58502023-10-03 23:20:20mmatedKövek (100 pont)cpp11Wrong answer 22/10012ms4736 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/012ms2888 KiB
3Accepted5/53ms2324 KiB
4Wrong answer0/53ms2532 KiB
5Wrong answer0/52ms2748 KiB
6Wrong answer0/53ms2960 KiB
7Accepted5/52ms3056 KiB
8Accepted5/52ms3060 KiB
9Accepted7/72ms3188 KiB
10Wrong answer0/72ms3248 KiB
11Wrong answer0/82ms3268 KiB
12Wrong answer0/82ms3344 KiB
13Wrong answer0/83ms3580 KiB
14Wrong answer0/83ms3844 KiB
15Wrong answer0/86ms4020 KiB
16Wrong answer0/89ms4608 KiB
17Wrong answer0/812ms4736 KiB