36952023-03-02 11:12:03MatematikaKártya (80 pont)cpp17Wrong answer 53/803ms3956 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    string s;
    int atlag=0;
    cin >> n;
    vector<int> vec(n);
    for(int i=0; i<n;i++)
    {
        cin >> vec[i];
        atlag=atlag+vec[i];
    }
    if(atlag%n==0)
    {
        s="IGEN";
    atlag=atlag/n;
    }
    else{s="NEM";}
    for(int i=0; i<n; i++)
    {
        vec[i]=vec[i]-atlag;
        if(vec[i]<0)
        {
            vec[i]=0;
        }
    }
    cout << s << endl;
    if(s=="IGEN")
    {
        for(int i=0; i<n; i++)
    {
        cout << vec[i] << " ";
    }
    }
    else{cout << atlag%n;}
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base53/80
1Accepted0/03ms1812 KiB
2Wrong answer0/03ms2060 KiB
3Accepted4/43ms2244 KiB
4Accepted5/52ms2492 KiB
5Accepted5/52ms2544 KiB
6Accepted5/53ms2668 KiB
7Accepted5/53ms2860 KiB
8Wrong answer0/42ms2940 KiB
9Accepted4/43ms3340 KiB
10Wrong answer0/53ms3304 KiB
11Accepted5/53ms3372 KiB
12Wrong answer0/53ms3260 KiB
13Accepted6/63ms3392 KiB
14Wrong answer0/63ms3604 KiB
15Accepted7/73ms3688 KiB
16Wrong answer0/72ms3684 KiB
17Accepted7/73ms3956 KiB