123456789101112131415161718192021 |
- //
- // Created by jal on 2019-05-02.
- //
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- int n;
- while(cin >> n){
- vector<int>v(n);
- for(auto&i:v){
- cin >> i;
- }
- sort(v.begin(), v.end());
- if(v.size()%2==0){
- cout << fixed << setprecision(2) << (v[n/2-1]+v[n/2])/2.0 << endl;
- }else{
- cout << fixed << setprecision(2) << v[n/2]/1.0 << endl;
- }
- }
- }
|