36732023-03-02 10:33:52DalmaKártya (80 pont)cpp17Accepted 80/803ms3472 KiB
#include <iostream>

using namespace std;

int main()
{
    int N;
    cin >> N;
    int kartyak[N];
    int osszeskartya=0;
    for (int i=0; i<N; i++)
    {
        cin >> kartyak[i];
        osszeskartya=osszeskartya+kartyak[i];
    }
    if (osszeskartya%N==0)
    {
        cout << "IGEN" << endl;
        for (int i=0; i<N; i++)
        {
            if (kartyak[i]>osszeskartya/N)
            {
                cout << kartyak[i]-osszeskartya/N << " ";
            }
            else
            {
                cout << "0 ";
            }
        }
    }
    else
    {
        cout << "NEM" << endl;
        cout << N-(osszeskartya%N);
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/03ms1876 KiB
2Accepted0/03ms2116 KiB
3Accepted4/43ms2332 KiB
4Accepted5/53ms2544 KiB
5Accepted5/52ms2740 KiB
6Accepted5/53ms2920 KiB
7Accepted5/52ms3000 KiB
8Accepted4/42ms3120 KiB
9Accepted4/43ms3240 KiB
10Accepted5/53ms3320 KiB
11Accepted5/52ms3320 KiB
12Accepted5/53ms3336 KiB
13Accepted6/63ms3336 KiB
14Accepted6/63ms3228 KiB
15Accepted7/73ms3360 KiB
16Accepted7/72ms3472 KiB
17Accepted7/73ms3464 KiB