CCF 2019 03_1大中小问题 请教大神们为啥我这个结果老是0分
#include <stdio.h>int main()
{
int a[100000],n,high,low,m2,m;
float mid;
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
if(n==1)
{
printf("%d %d %d",a[1],a[1],a[1]);
return 0;
}
if(a[1]<a[n])
{
high=a[n];
low=a[1];
}
else
{
high=a[1];
low=a[n];
}
if(n%2==1)
{
m=n/2+1;
m2=a[m];
}
else
{
m=n/2;
if(a[m]%2==a[m+1]%2)
{
m2=(a[m]+a[m+1])/2;
}
else
{
mid=(float)(a[m]+a[m+1])/2;
printf("%d %.1f %d",high,mid,low);
return 0;
}
}
printf("%d %d %d",high,m2,low);
return 0;
}