#include #include using namespace std; using namespace atcoder; #define INF 1LL<<60 #define MOD 998244353 #define MMOD 1000000007 using mint=modint998244353; using ll=long long; using ull=unsigned long long; using ld=long double; template using vc=vector; template using vv=vc>; using vl=vector; using vvl=vv; using vs=vc; using vvs=vv; using vb=vc; using vvb=vv; using lP=pair; using vlp=vc; template bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;} template bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;} #define YES cout<<"Yes"<>; vl dx={0,0,1,-1}; vl dy={1,-1,0,0}; int main() { ll n; cin>>n; vl a(n); ll ave=0; for(int i=0;i>a[i],ave+=a[i]; ave/=n; ll ans=0; for(ll i=0;i