LHGHH @ 2022-02-16 15:00:29
#include <iostream>
using namespace std;
int main()
{
int n,a[i];
int max,min,sum=0,sum1=0;
cin>>n;
for(int i=0;i<=n;i++)
{
cin>>a[i];
sum+=i
}
for(i=0;i<=n;i++)
{
if(max>a[i])
{a[i]=max;}
if(a[i]<min)
{min=a[i];}
sum1+=i-max-min;
}
cout<<sum/n<<" "<<(sum1/(n-2))-sum/n<<endl;
return 0;
}
by liangbowen @ 2022-02-16 16:46:27
@LHGHH
您是怎么了,编译错误都检查不出来?
by liangbowen @ 2022-02-16 16:47:22
语言没学好,建议重学语法。