이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <cassert>
#include <cstring>
#include <vector>
#include <algorithm>
#include <deque>
#include <set>
#include <utility>
#include <array>
#include <complex>
using u32 = unsigned;
using i32 = int;
using i64 = long long;
using u64 = unsigned long long;
using f64 = double;
using f80 = long double;
using namespace std;
using pt = complex<f80>;
#define ALL(x) begin(x), end(x)
#define ShinLena cin.tie(nullptr)->sync_with_stdio(false);
#define N 200005
int n, x[N], y[N], b[N], zx, zy;;
int main()
{
ShinLena;
cin >> n;
for (int i = 1; i <= n; ++i) cin >> x[i] >> y[i], b[i] = i;
sort(b+1, b+1+n, [](int i, int j){ return x[i] < x[j]; });
if (n&1) zx = x[n/2+1];
else zx = (x[n/2] + x[n/2+1]) / 2;
sort(b+1, b+1+n, [](int i, int j){ return y[i] < y[j]; });
if (n&1) zy = y[n/2+1];
else zy = (y[n/2] + y[n/2+1]) / 2;
cout << zx << ' ' << zy;
return 0;
}
# | 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... |