71472023-12-31 14:28:05xxxKártya (80 pont)cpp17Wrong answer 37/803ms3356 KiB
#include <bits/stdc++.h>
using namespace std;

void solve() {
    int n;
    cin >> n;
    vector<int> a(n);
    int sum = 0;
    for(int &i : a) {
        cin >> i;
        sum += i;
    }

    if ((sum / n) * n != sum) {
        cout << "NEM\n";
        cout << n - (sum % n) << '\n';
        return;
    }


    int OK = sum / n;
    for(int i : a) {
        cout << "IGEN\n";
        if (i > OK) {
            cout << i - OK << ' ';
        } else {
            cout << 0 << ' ';
        }
    }

}

int main() {
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	int tt=1;
	//cin >> tt;
	while(tt--) {
        solve();
	}


	return 0;
}
SubtaskSumTestVerdictTimeMemory
base37/80
1Wrong answer0/03ms1832 KiB
2Accepted0/03ms2024 KiB
3Wrong answer0/43ms2504 KiB
4Accepted5/53ms2364 KiB
5Wrong answer0/53ms2436 KiB
6Accepted5/53ms2568 KiB
7Wrong answer0/53ms2640 KiB
8Accepted4/43ms2632 KiB
9Wrong answer0/43ms2864 KiB
10Accepted5/53ms2912 KiB
11Wrong answer0/53ms2912 KiB
12Accepted5/53ms2908 KiB
13Wrong answer0/63ms3152 KiB
14Accepted6/63ms3144 KiB
15Wrong answer0/73ms3236 KiB
16Accepted7/73ms3216 KiB
17Wrong answer0/73ms3356 KiB