-
-
Save pagodepaiva/4c9ac891065774d19c994c50c58ab5cd to your computer and use it in GitHub Desktop.
caravana.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
int32_t main(){ | |
ios::sync_with_stdio(false); cin.tie(0); | |
int n; | |
cin >> n; | |
int sum = 0; | |
int v[n+5]; | |
for(int i = 1;i <= n;i++){ | |
cin >> v[i]; | |
sum += v[i]; | |
} sum /= n; | |
for(int i = 1;i <= n;i++){ | |
cout << a[i] - sum << "\n"; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment