36722023-03-02 10:30:35DalmaKártya (80 pont)cpp17Wrong answer 43/803ms3800 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
base43/80
1Accepted0/03ms1872 KiB
2Wrong answer0/03ms2120 KiB
3Accepted4/43ms2336 KiB
4Wrong answer0/53ms2580 KiB
5Accepted5/53ms3100 KiB
6Wrong answer0/52ms3148 KiB
7Accepted5/52ms3300 KiB
8Wrong answer0/42ms3384 KiB
9Accepted4/42ms3508 KiB
10Wrong answer0/53ms3388 KiB
11Accepted5/53ms3548 KiB
12Wrong answer0/53ms3720 KiB
13Accepted6/63ms3700 KiB
14Wrong answer0/63ms3588 KiB
15Accepted7/73ms3588 KiB
16Wrong answer0/73ms3720 KiB
17Accepted7/73ms3800 KiB