135142025-01-08 09:17:26PKBEgykorúak (75 pont)cpp17Wrong answer 0/753ms508 KiB
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int N;

    cin >> N;

    vector<int> A(N);

    int sum = 0;
    int temp;

    for (int i = 0; i< N; i++) {
        cin >> temp;
        A[i] = temp;
        sum += temp;
    }

    if (sum % N != 0) {
        cout <<"NEM\n";
        cout << sum % N;
        return 0;
    }

    cout << "IGEN\n";

    int atlag = sum / N;

    for (int i = 0; i < N; i++) {
        if (A[i] > atlag) {
            cout << A[i] - atlag << " ";
        } else {
            cout << 0 << " ";
        }
    }






}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/01ms508 KiB
2Wrong answer0/03ms316 KiB
3Wrong answer0/51ms316 KiB
4Wrong answer0/51ms316 KiB
5Wrong answer0/51ms348 KiB
6Wrong answer0/51ms316 KiB
7Wrong answer0/51ms500 KiB
8Wrong answer0/51ms344 KiB
9Wrong answer0/52ms316 KiB
10Wrong answer0/51ms416 KiB
11Wrong answer0/51ms316 KiB
12Wrong answer0/52ms428 KiB
13Wrong answer0/52ms316 KiB
14Wrong answer0/52ms316 KiB
15Wrong answer0/52ms508 KiB
16Wrong answer0/53ms316 KiB
17Wrong answer0/53ms316 KiB