#include <cstdio>
#include <cstring>
const int N = 1000;
int p[N + 10];
int main() {
memset(p, 0, sizeof(p));
int n, i;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%d", &p[i]);
}
printf("%d ", (p[1] + p[2]) / 2);
for (i = 2; i <= n - 1; i++) {
printf("%d ", (p[i - 1] + p[i] + p[i + 1]) / 3);
}
printf("%d\n", (p[n - 1] + p[n]) / 2);
return 0;
}
201809-1 卖菜
最新推荐文章于 2024-08-12 08:44:22 发布