30482023-02-08 20:22:34xxxKártya (80 pont)cpp14Wrong answer 53/803ms4344 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    int a[n], b[n];
    int sum= 0;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    if (sum % n == 0)
        cout << "IGEN" << endl;
    else {cout << "NEM"<< endl << sum % n; return 0;}
    sum /= n;

    for (int i = 0; i < n;i++) {
        if ((a[i] - sum) > 0) {
            cout << a[i] - sum << " ";
        }
        else cout << 0 << " ";
    }

    return 0;

}
SubtaskSumTestVerdictTimeMemory
base53/80
1Accepted0/03ms1876 KiB
2Wrong answer0/03ms2120 KiB
3Accepted4/43ms2332 KiB
4Accepted5/53ms2520 KiB
5Accepted5/53ms2736 KiB
6Accepted5/53ms2948 KiB
7Accepted5/53ms3004 KiB
8Wrong answer0/43ms3240 KiB
9Accepted4/43ms3336 KiB
10Wrong answer0/53ms3584 KiB
11Accepted5/53ms3764 KiB
12Wrong answer0/53ms3848 KiB
13Accepted6/63ms3996 KiB
14Wrong answer0/63ms4048 KiB
15Accepted7/73ms4292 KiB
16Wrong answer0/73ms4340 KiB
17Accepted7/73ms4344 KiB