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;
#define ll long long int
int main()
{
ll N;
cin>>N;
ll x[N], y[N];
for(ll i=0; i<N; i++)
{
ll a, b;
cin>>a >>b;
x[i]=a;
y[i]=b;
}
sort(x, x+N);
sort(y, y+N);
if(N%2!=0)
{
cout<<x[N/2] <<" " <<y[N/2];
}
else
{
ll mid=N/2;
ll miid=(N/2)-1;
cout<<(x[mid]+x[miid])/2 <<" " <<(y[mid]+y[miid])/2;
}
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... |