18112022-12-03 21:32:03kdbKövek (100 pont)cpp11Wrong answer 25/10012ms4836 KiB
#include <iostream>
#include <vector>
#include <map>
#include <queue>
using namespace std;
#define ll long long

ostream& operator<<(ostream& os, vector<int>& input)
{
    for (auto i : input)
    {
        os << i << " ";
    }
    return os;
}

int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int n, q = 0;
    cin >> n;
    vector<int>vec;
    for (size_t i = 0; i < n; i++)
    {
        int a;
        cin >> a;
        q += a;
        vec.push_back(q);
    }
    int m = 0, w = q / n;
    for (size_t i = 0; i < n; i++) if (vec[i] / (i + 1) != w) m++;
    cout << m << endl;
    return 0;
}
/*
5
7 3 8 10 2
*/
SubtaskSumTestVerdictTimeMemory
base25/100
1Accepted0/03ms1700 KiB
2Wrong answer0/012ms3068 KiB
3Accepted5/52ms2248 KiB
4Accepted5/52ms2612 KiB
5Wrong answer0/52ms2480 KiB
6Accepted5/52ms2616 KiB
7Accepted5/52ms2800 KiB
8Accepted5/52ms3020 KiB
9Wrong answer0/72ms3076 KiB
10Wrong answer0/72ms3156 KiB
11Wrong answer0/82ms3252 KiB
12Wrong answer0/82ms3448 KiB
13Wrong answer0/82ms3548 KiB
14Wrong answer0/83ms3808 KiB
15Wrong answer0/86ms4312 KiB
16Wrong answer0/810ms4832 KiB
17Wrong answer0/812ms4836 KiB