Submission #1347078

#TimeUsernameProblemLanguageResultExecution timeMemory
1347078killerzaluuBest Place (NOI17_bestplace)C++20
100 / 100
21 ms2000 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n; 
    cin >> n;

    long long *x = new long long[n];
    long long *y = new long long[n];

    for (int i = 0; i < n; i++) {
        cin >> x[i] >> y[i];
    }

    sort(x, x + n);
    sort(y, y + n);

    long long X = x[n / 2];
    long long Y = y[n / 2];

    cout << X << ' ' << Y << '\n';

    delete[] x;
    delete[] y;
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...