제출 #500591

#제출 시각아이디문제언어결과실행 시간메모리
500591rajatshenoiBest Place (NOI17_bestplace)C++14
100 / 100
86 ms3080 KiB
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int N; cin >> N; int x[N]; int y[N]; for (int i = 0; i < N; i++) { cin >> x[i]; cin >> y[i]; } sort(x, x + N); sort(y, y + N); int minx; int miny; if (N % 2 == 0) { minx = (x[N / 2 - 1] + x[(N + 1) / 2 - 1]) / 2; miny = (y[N / 2 - 1] + y[(N + 1) / 2 - 1]) / 2; } else { minx = x[N / 2]; miny = y[N / 2]; } cout << minx << " " << miny << "\n"; 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...