58492023-10-03 23:16:57mmatedKövek (100 pont)cpp11Wrong answer 22/10012ms6148 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/03ms1888 KiB
2Wrong answer0/012ms3288 KiB
3Accepted5/53ms2660 KiB
4Wrong answer0/53ms2896 KiB
5Wrong answer0/53ms3096 KiB
6Wrong answer0/53ms3324 KiB
7Accepted5/53ms3800 KiB
8Accepted5/53ms3784 KiB
9Accepted7/73ms3656 KiB
10Wrong answer0/73ms3904 KiB
11Wrong answer0/82ms3832 KiB
12Wrong answer0/83ms3728 KiB
13Wrong answer0/83ms3752 KiB
14Wrong answer0/84ms4120 KiB
15Wrong answer0/86ms4724 KiB
16Wrong answer0/810ms5376 KiB
17Wrong answer0/812ms6148 KiB