#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
const int N=1000;
int main()
{
int a[N],n,i;
cin>>n;
for(i=0;i<n;i++){
cin>>a[i];
}
cout<<(a[0]+a[1])/2<<" ";
for(i=1;i<n-1;i++){
cout<<(a[i-1]+a[i]+a[i+1])/3<<" ";
}
cout<<(a[i-1]+a[i])/2;
return 0;
}
CCF认证 201809-1:卖菜(C++)
最新推荐文章于 2023-11-09 08:00:00 发布