9802022-02-09 19:57:44HobimmKártya (80 pont)cpp11Accepted 80/802ms2024 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long

ll N, be1, szum=0;
vector<ll> t;


int main() 
{
    cin >> N;
    for(int i = 0; i < N; i++)
    {
        cin >> be1;
        t.push_back(be1);
        szum+=be1;//OSSZEG
    }

    //Ket eset
    if(szum%N==0)
    {
        cout << "IGEN\n";
        for(ll aktE:t)
        {
            if(aktE>szum/N)
            {
                cout << aktE-szum/N << " ";
            }
            else
                cout << "0 ";
        }
    }
    else
    {
        cout << "NEM\n";
        cout << N-szum%N << "\n";      
    }
    return 0;
}

SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/02ms1828 KiB
2Accepted0/02ms1904 KiB
3Accepted4/41ms1952 KiB
4Accepted5/51ms1964 KiB
5Accepted5/51ms1964 KiB
6Accepted5/51ms1972 KiB
7Accepted5/51ms1968 KiB
8Accepted4/41ms1972 KiB
9Accepted4/41ms1984 KiB
10Accepted5/51ms2000 KiB
11Accepted5/51ms1996 KiB
12Accepted5/51ms2004 KiB
13Accepted6/61ms2008 KiB
14Accepted6/61ms2008 KiB
15Accepted7/71ms2016 KiB
16Accepted7/72ms2008 KiB
17Accepted7/71ms2024 KiB