#include #include #include using namespace std; int main(){ int numlen; int num; vector num_v; cin >> numlen; for (int i = 0;i < numlen;i++) { /* code */ cin >> num; num_v.push_back(num); } sort(num_v.begin(), num_v.end()); if (num_v.size()%2){ //cout << num_v.size()%2<< endl; cout << num_v[num_v.size()/2]<< endl; }else{ //cout << num_v.size()/2<< endl; cout << (num_v[num_v.size()/2 - 1] + num_v[num_v.size()/2])/2.0 << endl; } }