#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
vector<long int>a;
int n, m;
long int x;
int main()
{
cin >> n;
while (n--)cin >> x, a.push_back(x);
cin >> m;
while (m--)cin >> x, a.push_back(x);
nth_element(a.begin(), a.begin() + ((a.size() - 1) / 2), a.end());
cout << a[(a.size() - 1) / 2];
return 0;
}
1029. Median (25)
最新推荐文章于 2019-02-07 23:51:33 发布