# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
494310 | BeanZ | Best Place (NOI17_bestplace) | C++14 | 37 ms | 2480 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>
using namespace std;
#define ll long long
#define endl '\n'
const int N = 3e5 + 5;
long long mod = 1e9 + 7;
const int lim = 4e5 + 5;
const int lg = 21;
const int base = 37;
const long double eps = 1e-6;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
if (fopen("tests.inp", "r")){
freopen("tests.inp", "r", stdin);
freopen("tests.out", "w", stdout);
}
ll n;
cin >> n;
vector<ll> vx, vy;
for (int i = 1; i <= n; i++){
ll x, y;
cin >> x >> y;
vx.push_back(x);
vy.push_back(y);
}
sort(vx.begin(), vx.end());
sort(vy.begin(), vy.end());
cout << vx[vx.size() / 2] << " " << vy[vy.size() / 2];
}
/*
Ans:
Out:
*/
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... |