This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
vector<int> vec_x;
vec_x.reserve(N);
vector<int> vec_y;
vec_y.reserve(N);
int x, y;
for(int i{0}; i<N; i++)
{
cin>>x>>y;
vec_x.push_back(x);
vec_y.push_back(y);
}
sort(vec_x.begin(), vec_x.end());
sort(vec_y.begin(), vec_y.end());
int a = vec_x[(N/2) - 1];
int b = vec_y[(N/2)-1];
cout<<a<<" "<<b;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |