73052024-01-06 17:06:38DhaneHaneKártya (80 pont)cpp17Wrong answer 53/803ms3772 KiB
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n,o; cin>>n;
    o=0;
    vector <int> x; x.resize(n+1);
    for (int i=1;i<=n;++i)
    {
        cin>>x[i];
        o+=x[i];
    }
    if (o%n==0)
    {
        cout<<"IGEN"<<"\n";
        for (int i=1;i<=n;++i)
        {
            if (x[i]>o/n) cout<<x[i]-o/n<<" ";
            else cout<<"0 ";
        }
    }
    else cout<<"NEM"<<"\n"<<o%n;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base53/80
1Accepted0/03ms1816 KiB
2Wrong answer0/03ms2048 KiB
3Accepted4/43ms2304 KiB
4Accepted5/53ms2488 KiB
5Accepted5/53ms2700 KiB
6Accepted5/53ms2916 KiB
7Accepted5/53ms2956 KiB
8Wrong answer0/43ms2964 KiB
9Accepted4/43ms2968 KiB
10Wrong answer0/53ms2968 KiB
11Accepted5/53ms3104 KiB
12Wrong answer0/53ms3220 KiB
13Accepted6/63ms3272 KiB
14Wrong answer0/63ms3504 KiB
15Accepted7/73ms3772 KiB
16Wrong answer0/73ms3588 KiB
17Accepted7/73ms3600 KiB