#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int num[n];
int ans = 0;
for(int i = 0; i < n; i++){
cin >> num[i];
}
sort(num, num+n);
if(n%2 == 0){
ans = (num[n/2] + num[n/2 - 1]) / 2;
}
else{
ans = num[n/2];
}
//cout << num[n/2];
//cout << num[n/2 - 1];
cout << ans;
}
#include
using namespace std;int main(){
int n;
cin >> n;
int num[n];
int ans = 0;
for(int i = 0; i < n; i++){
cin >> num[i];
}
sort(num, num+n);
if(n%2 == 0){
ans = (num[n/2] + num[n/2 - 1]) / 2;
}
else{
ans = num[n/2];
}
//cout << num[n/2];
//cout << num[n/2 - 1];
cout << ans;
}
ty
#include
using namespace std;int main(){
int n;
cin >> n;
int num[n];
int ans = 0;
for(int i = 0; i < n; i++){
cin >> num[i];
}
sort(num, num+n);
if(n%2 == 0){
ans = (num[n/2] + num[n/2 - 1]) / 2;
}
else{
ans = num[n/2];
}
//cout << num[n/2];
//cout << num[n/2 - 1];
cout << ans;
}
ty
At a men's gas station in Taiwan, a school stewardess, nurse, and model. Internet celebrity Ke Xi TG is nini9595 Lai 5280366.