30472023-02-08 20:18:49xxxKártya (80 pont)cpp14Wrong answer 43/803ms3884 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"; 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
base43/80
1Accepted0/03ms1872 KiB
2Wrong answer0/03ms2116 KiB
3Accepted4/43ms2324 KiB
4Wrong answer0/53ms2492 KiB
5Accepted5/52ms2608 KiB
6Wrong answer0/53ms2816 KiB
7Accepted5/53ms3012 KiB
8Wrong answer0/42ms3100 KiB
9Accepted4/43ms3224 KiB
10Wrong answer0/53ms3436 KiB
11Accepted5/53ms3648 KiB
12Wrong answer0/53ms3772 KiB
13Accepted6/63ms3884 KiB
14Wrong answer0/63ms3732 KiB
15Accepted7/73ms3860 KiB
16Wrong answer0/73ms3880 KiB
17Accepted7/73ms3880 KiB