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>
#define ll long long
#define fi first
#define se second
const ll MOD=1e9+7;
using namespace std;
map <ll,bool> x;
map <ll,bool> y;
ll N;
vector <ll> vec1;
vector <ll> vec2;
int main(){
cin>>N;
for(int i=1;i<=N;i++){
ll a,b;
cin>>a>>b;
if(!x[a]){
x[a]=true;
vec1.push_back(a);
}
if(!y[b]){
y[b]=true;
vec2.push_back(b);
}
}
sort(vec1.begin(),vec1.end());
sort(vec2.begin(),vec2.end());
ll s1=vec1.size();
ll s2=vec2.size();
cout<<vec1[s1/2]<<' '<<vec2[s2/2]<<endl;
}
# | 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... |