C++ Code :
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll ;
int main(){
ll n ;
cin>>n;vector <ll> b ;
ll r ;
cin>>r;
ll i = 0 ;
while(i<=n-1){
ll yy;
cin>>yy;
b.push_back(yy);
i++;
}
i = 0 ;
while(i<=r-1){
ll yy;
cin>>yy;
b.push_back(yy);
i++;
}
sort(b.begin(),b.end());
cout << fixed << setprecision(2) ;
ll g = n + r ;
if(g%2==0){
long double vv = 2 ;
long double kk = double(b[g/2] + b[g/2 - 1])/vv;
cout<<kk;
}
else{
long double kk = b[g/2];
cout<<kk ;
}
}