15462022-11-23 12:35:52zsebiKövek (100 pont)cpp11Wrong answer 0/1003ms3616 KiB
// kovek.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <queue>

#define ll long long
using namespace std;


ll n, i, a, ossz = 0;
int main()
{
    vector<ll>x(n+1,0);
    cin >> n;
    for (i = 1; i <= n; ++i)
    {
        cin >> a;
        x[i] += x[i - 1] + a;
    }
    a = x[n] / n;
    for (i = 1; i <=n; ++i)
        if (x[i] != a * (i + 1))ossz++;
    cout << ossz;
    return 0;
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
SubtaskSumTestVerdictTimeMemory
base0/100
1Wrong answer0/03ms1684 KiB
2Runtime error0/02ms2000 KiB
3Wrong answer0/52ms2048 KiB
4Wrong answer0/52ms2104 KiB
5Wrong answer0/52ms2236 KiB
6Wrong answer0/52ms2476 KiB
7Wrong answer0/52ms2560 KiB
8Wrong answer0/52ms2560 KiB
9Wrong answer0/72ms2556 KiB
10Wrong answer0/72ms2636 KiB
11Wrong answer0/82ms2632 KiB
12Wrong answer0/82ms2756 KiB
13Runtime error0/82ms2968 KiB
14Runtime error0/83ms3204 KiB
15Runtime error0/82ms3428 KiB
16Runtime error0/82ms3484 KiB
17Runtime error0/82ms3616 KiB