This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*
ID: samikgo1
TASK: friday
LANG: C++14
*/
/*pragma handle-exceptions*/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
// freopen("friday.in","r",stdin);
// freopen("friday.out","w",stdout);
int n;
cin >> n;
int arr_x[n+1];
int arr_y[n+1];
for (int i = 1; i <= n; i++) {
cin >> arr_x[i] >> arr_y[i];
}
sort(arr_x+1,arr_x+n+1);
sort(arr_y+1,arr_y+n+1);
if(n%2){
cout << arr_x[(n+1)/2] << ' ' << arr_y[(n+1)/2];
} else {
cout << (int)(arr_x[n/2]+arr_x[(n/2)+1])/2 << ' ' << (int)(arr_y[n/2]+arr_y[(n/2)+1])/2;
}
}
# | 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... |