Submission #531945

#TimeUsernameProblemLanguageResultExecution timeMemory
531945andecaandeciBest Place (NOI17_bestplace)C++17
100 / 100
41 ms4060 KiB
#include <bits/stdc++.h>
#define REP(v, i, j) for (ll v = i; v < j; v++)
#define FORI(v) for (auto i : v)
#define FORJ(v) for (auto j : v)

#define OUT(v, a)     FORI(v)           cout << i << a;
#define OUTS(v, a, b)          cout << v.size() << a;     OUT(v, b)
#define in(a, n)     REP(i, 0, n)     cin >> a[i];

#define SORT(v) sort(begin(v), end(v))
#define REV(v) reverse(begin(v), end(v))

#define pb push_back
#define fi first
#define se second

#define detachIO                          ios_base::sync_with_stdio(false);     cin.tie(0);                           cout.tie(0);

using namespace std;

typedef long long ll;

typedef pair<ll, ll> pii;
typedef pair<pii, ll> piii;
typedef pair<pii, pii> piiii;

vector<ll> x, y;

int main()
{
    detachIO;

    ll N;
    cin >> N;

    while (N--)
    {
        ll a, b;
        cin >> a >> b;
        x.pb(a), y.pb(b);
    }

    SORT(x), SORT(y);

    cout << x[x.size() / 2] << ' ';
    cout << y[y.size() / 2];
}
#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...