제출 #867322

#제출 시각아이디문제언어결과실행 시간메모리
867322psm9352Best Place (NOI17_bestplace)C++17
100 / 100
79 ms3100 KiB
#include <iostream> #include <algorithm> int main(){ int n;std::cin >> n; int arrx[n];int arry[n]; for (int i = 0;i < n;i++){std::cin >> arrx[i];std::cin >> arry[i];} std::sort(arrx,arrx+n);std::sort(arry,arry+n); if (n % 2==0){ std::cout << (arrx[n/2-1]+arrx[n/2])/2 << " " << (arry[n/2-1]+arry[n/2])/2; }else{ std::cout << arrx[(n-1)/2] << " " << arry[(n-1)/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...