int f(int a[], int n)
{
int sm = 0;
for(int i = 0; i < n; ++i)
sm += a[i];
double ave = sm / n;
cout<<ave<<endl;
double cha = 0;
double last = 0;
double t;
for(int i = 0; i < n; ++i){
t = a[i]-ave;
if(t>last){
t = i;
last = a[i];
}
}
return last;
}//修改