86992024-01-25 18:05:13AzukitsuKövek (100 pont)cpp17Wrong answer 0/10027ms6788 KiB
#include <iostream>
#include <vector>
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;
    sum = 0;
    for (int i = 0; i < N; i++) {
            kulonbsegek[i] = kovek[i] - mean;
            sum += kulonbsegek[i];
            if (!(kulonbsegek[i] == mean) && sum == 0) {
                count += 1;
            }
    }
    cout << count << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/100
1Accepted0/03ms1936 KiB
2Wrong answer0/027ms4052 KiB
3Wrong answer0/52ms2556 KiB
4Wrong answer0/53ms2684 KiB
5Wrong answer0/53ms2924 KiB
6Wrong answer0/53ms3148 KiB
7Wrong answer0/53ms3368 KiB
8Wrong answer0/53ms3420 KiB
9Wrong answer0/73ms3560 KiB
10Wrong answer0/73ms3912 KiB
11Wrong answer0/82ms3688 KiB
12Wrong answer0/83ms3800 KiB
13Wrong answer0/83ms3940 KiB
14Wrong answer0/84ms4148 KiB
15Wrong answer0/810ms4572 KiB
16Wrong answer0/824ms6068 KiB
17Wrong answer0/827ms6788 KiB