제출 #742272

#제출 시각아이디문제언어결과실행 시간메모리
742272FnzxBest Place (NOI17_bestplace)C++17
3 / 100
39 ms1316 KiB
#include<bits/stdc++.h>

using namespace std;

using pii = pair<int,int> ;

const int N = 1e5+5;
const int MOD = 1e9+7 ;

int n , ans;

vector<int> X , Y ;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

    cin >> n ;
    for(int i=1;i<=n;i++){
        int y , x ; cin >> x >> y ;
        Y.push_back(y) , X.push_back(x) ;
    }
    sort(X.begin() , X.end()) ;
    sort(Y.begin() , Y.end()) ;

    if(n % 2){
        cout << X[(n+1)/2] << " " << Y[(n+1)/2] ;
    }
    else {
        cout << X[n / 2] << " " << Y[n / 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...