36852023-03-02 10:48:47KevinKártya (80 pont)cpp17Wrong answer 43/803ms3956 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    int osszeg=0;
    cin >> n;
    vector<int> vec(n);
    for (int i=0; i<n; i++){
        cin >> vec[i];
        osszeg=osszeg+vec[i];
    }
    if (osszeg%n==0){
        cout << "IGEN" << endl;
        for (int i=0; i<n; i++){
            if (vec[i]-osszeg/n>-1)
                cout << vec[i]-osszeg/n << " ";
            else
                cout << 0 << " ";
        }
    }
    else
        cout << "NEM" << n-osszeg%n;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base43/80
1Accepted0/03ms1812 KiB
2Wrong answer0/03ms2008 KiB
3Accepted4/43ms2216 KiB
4Wrong answer0/53ms2428 KiB
5Accepted5/53ms2640 KiB
6Wrong answer0/53ms2848 KiB
7Accepted5/53ms3080 KiB
8Wrong answer0/42ms3076 KiB
9Accepted4/43ms3040 KiB
10Wrong answer0/53ms3160 KiB
11Accepted5/53ms3380 KiB
12Wrong answer0/53ms3464 KiB
13Accepted6/63ms3472 KiB
14Wrong answer0/63ms3700 KiB
15Accepted7/73ms3788 KiB
16Wrong answer0/72ms3672 KiB
17Accepted7/73ms3956 KiB