37212023-03-02 13:53:14KevinKövek (100 pont)cpp17Wrong answer 20/10027ms4680 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int atlag=0;
    int osszeg=0;
    cin >> n;
    int megoldas=n;
    vector<int> vec(n);
    for (int i=0; i<n; i++){
        cin >> vec[i];
        atlag=atlag+vec[i];
    }
    atlag=atlag/n;
    for (int i=0; i<n; i++){
        osszeg=osszeg+vec[i];
        if(osszeg/(i+1)==atlag&&osszeg%n==0){
            megoldas--;
        }
    }
    cout << megoldas;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base20/100
1Wrong answer0/03ms1812 KiB
2Wrong answer0/027ms2764 KiB
3Accepted5/53ms2264 KiB
4Accepted5/53ms2428 KiB
5Accepted5/52ms2572 KiB
6Accepted5/52ms2648 KiB
7Wrong answer0/53ms2852 KiB
8Wrong answer0/53ms2952 KiB
9Wrong answer0/72ms3036 KiB
10Wrong answer0/72ms3152 KiB
11Wrong answer0/83ms3160 KiB
12Wrong answer0/83ms3532 KiB
13Wrong answer0/83ms3704 KiB
14Wrong answer0/84ms3980 KiB
15Wrong answer0/810ms4148 KiB
16Wrong answer0/824ms4280 KiB
17Wrong answer0/827ms4680 KiB