Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- #include<string>
- #include<vector>
- #include<algorithm>
- using namespace std;
- int a[101];
- int main(){
- int n, cnt = 0;
- cin >> n;
- for (int i = 0; i < n; i++) {
- cin >> a[i];
- }
- sort(a, a + n);
- for (int i = 0; i < n / 2 + 1; i++) {
- cnt += a[i] / 2 + 1;
- }
- cout << cnt;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment