# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
516353 | Jomnoi | Best Place (NOI17_bestplace) | C++17 | 42 ms | 3268 KiB |
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 DEBUG 0
using namespace std;
int main() {
int n;
scanf(" %d", &n);
vector <int> X, Y;
for(int i = 1; i <= n; i++) {
int x, y;
scanf(" %d %d", &x, &y);
X.push_back(x);
Y.push_back(y);
}
sort(X.begin(), X.end());
sort(Y.begin(), Y.end());
if(n % 2 == 0) {
X[n / 2] = (X[n / 2 - 1] + X[n / 2]) / 2;
Y[n / 2] = (Y[n / 2 - 1] + Y[n / 2]) / 2;
}
printf("%d %d", X[n / 2], Y[n / 2]);
return 0;
}
Compilation message (stderr)
# | 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... |