简单题
View Code
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
#define maxn 105
int f[maxn];
int main()
{
//freopen("t.txt", "r", stdin);
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &f[i]);
sort(f, f + n);
int ans = 0;
for (int i = 0; i < n / 2 + 1; i++)
ans += f[i] / 2 + 1;
printf("%d\n", ans);
return 0;
}