28792023-02-01 14:24:08KristófKártya (80 pont)cpp11Wrong answer 43/803ms3268 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >>n;
    int sum=0;
    int atlag;
    int k[n];
    for(int i=0;i<n;i++){
        cin>>k[i];
        sum=sum+k[i];
    }
    atlag=sum/n;
    if(sum%n==0){
        cout<<"IGEN"<<endl;
    }
    else
        cout<<"NEM"<<endl<<sum%n;
    for(int i=0;i<n;i++){
        if(k[i]-atlag>0){
            cout<<k[i]-atlag<<" ";
        }
        else
            cout<<0<<" ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base43/80
1Accepted0/03ms1748 KiB
2Wrong answer0/03ms1920 KiB
3Accepted4/43ms2128 KiB
4Wrong answer0/53ms2348 KiB
5Accepted5/52ms2428 KiB
6Wrong answer0/53ms2560 KiB
7Accepted5/52ms2636 KiB
8Wrong answer0/43ms2780 KiB
9Accepted4/43ms2964 KiB
10Wrong answer0/53ms3052 KiB
11Accepted5/53ms3056 KiB
12Wrong answer0/53ms3176 KiB
13Accepted6/63ms3260 KiB
14Wrong answer0/63ms3264 KiB
15Accepted7/73ms3264 KiB
16Wrong answer0/73ms3264 KiB
17Accepted7/73ms3268 KiB