114722024-10-04 09:32:54matyiKártya (80 pont)cpp11Accepted 80/803ms528 KiB
#include <iostream>
#include <fstream>

using namespace std;

const int U=1001;

int main()
{
   // ifstream fin("be.in");
    int n;
    int a[U];
    cin>>n;
    int ossz=0;
    for (int i=1;i<=n;i++)
    {
        cin>>a[i];
        ossz+=a[i];
    }

    if (ossz%n!=0)
    {
        cout<<"NEM"<<endl<<n-ossz%n;
    }
    else
    {
        cout<<"IGEN"<<endl;
        int atl=ossz/n;
        for (int i=1;i<=n;i++)
        {
            if (a[i]<atl)
            {
                cout<<"0"<<" ";
            }
            else
                cout<<a[i]-atl<< " ";
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/02ms364 KiB
2Accepted0/03ms528 KiB
3Accepted4/43ms296 KiB
4Accepted5/53ms268 KiB
5Accepted5/52ms504 KiB
6Accepted5/53ms504 KiB
7Accepted5/52ms232 KiB
8Accepted4/42ms360 KiB
9Accepted4/43ms364 KiB
10Accepted5/53ms488 KiB
11Accepted5/53ms292 KiB
12Accepted5/53ms360 KiB
13Accepted6/63ms384 KiB
14Accepted6/63ms488 KiB
15Accepted7/73ms400 KiB
16Accepted7/73ms504 KiB
17Accepted7/73ms360 KiB