36702023-03-02 10:28:57JMMirkoKártya (80 pont)cpp17Accepted 80/803ms3432 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	vector<int>v(n);
	int ossz=0;
	for(int i=0;i<n;i++){
		cin >> v[i];
		ossz+=v[i];
	}
	if(ossz%n==0){
		cout << "IGEN" << endl;
		for(int i=0;i<n;i++){
			if(v[i]-ossz/n>0)cout << v[i]-ossz/n << ' ';
			else cout << 0 << ' ';
		}
	}else cout << "NEM" << endl << n-ossz%n;

}
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/03ms2084 KiB
2Accepted0/03ms2220 KiB
3Accepted4/43ms2440 KiB
4Accepted5/52ms2568 KiB
5Accepted5/52ms2664 KiB
6Accepted5/52ms2776 KiB
7Accepted5/52ms2744 KiB
8Accepted4/42ms2880 KiB
9Accepted4/42ms2988 KiB
10Accepted5/52ms2964 KiB
11Accepted5/52ms2956 KiB
12Accepted5/53ms3096 KiB
13Accepted6/63ms3220 KiB
14Accepted6/63ms3216 KiB
15Accepted7/73ms3300 KiB
16Accepted7/72ms3420 KiB
17Accepted7/73ms3432 KiB