114712024-10-04 09:31:28matyiKártya (80 pont)cpp11Wrong answer 53/803ms632 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<<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
base53/80
1Accepted0/03ms360 KiB
2Wrong answer0/03ms416 KiB
3Accepted4/43ms360 KiB
4Accepted5/53ms364 KiB
5Accepted5/53ms488 KiB
6Accepted5/53ms632 KiB
7Accepted5/53ms504 KiB
8Wrong answer0/43ms360 KiB
9Accepted4/43ms376 KiB
10Wrong answer0/53ms504 KiB
11Accepted5/53ms444 KiB
12Wrong answer0/53ms360 KiB
13Accepted6/63ms492 KiB
14Wrong answer0/63ms504 KiB
15Accepted7/73ms364 KiB
16Wrong answer0/73ms548 KiB
17Accepted7/73ms368 KiB