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;
typedef long long ll;
typedef vector<long long> vi;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll n;
cin >> n;
vi posx = {};
vi posy = {};
for (int i = 0; i < n; i++) {
ll temp1, temp2;
cin >> temp1 >> temp2;
posx.push_back(temp1);
posy.push_back(temp2);
}
sort(posx.begin(), posx.end());
sort(posy.begin(), posy.end());
if (n%2==0) cout << posx[n/2] << " " << posy[n/2] << "\n";
else cout << posx[(n-1)/2] << " " << posy[(n-1)/2] << "\n";
}
# | 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... |