#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>B>>N; ll sum=B; FOR(i,N) cin>>C[i], sum+=C[i]; sort(C,C+N); for(i=N-1;i>=0;i--) C[i]-=C[0]; ll ma=sum/N; ll mi=1LL<<60; FOR(i,N) { ll ov=0,fl=0; FOR(j,N) if(C[j]>C[i]) ov += C[j]-C[i]; FOR(j,N) if(C[j]