37682023-03-02 21:17:57BttrngKártya (80 pont)cpp17Accepted 80/803ms3824 KiB
#include<bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin>>n;
  int os=0;
  vector<int>cucc(n);
  for(int i=0; i<n; i++){
    cin>>cucc[i];
    os+=cucc[i];
  }
  if(os%n!=0){
        cout<<"NEM"<<endl;
    cout<<((os/n+1)*n)-os<<endl;
    return 0;
  }
  else{
      cout<<"IGEN"<<endl;
    for(int x : cucc){
        if(os/n<x) cout<<x-os/n<<" ";
        else cout<<0<<" ";
    }
  }
}
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/03ms1812 KiB
2Accepted0/03ms2312 KiB
3Accepted4/42ms2404 KiB
4Accepted5/52ms2292 KiB
5Accepted5/52ms2492 KiB
6Accepted5/52ms2704 KiB
7Accepted5/53ms2912 KiB
8Accepted4/43ms3112 KiB
9Accepted4/43ms3464 KiB
10Accepted5/53ms3340 KiB
11Accepted5/52ms3348 KiB
12Accepted5/53ms3348 KiB
13Accepted6/63ms3460 KiB
14Accepted6/63ms3524 KiB
15Accepted7/73ms3736 KiB
16Accepted7/73ms3696 KiB
17Accepted7/73ms3824 KiB