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 <iostream>
#include <algorithm>
int main(){
int n;std::cin >> n;
int arrx[n];int arry[n];
for (int i = 0;i < n;i++){std::cin >> arrx[i];std::cin >> arry[i];}
std::sort(arrx,arrx+n);std::sort(arry,arry+n);
if (n % 2==0){
std::cout << (arrx[n/2-1]+arrx[n/2])/2 << " " << (arry[n/2-1]+arry[n/2])/2;
}else{
std::cout << arrx[(n-1)/2] << " " << arry[(n-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... |