제출 #688198

#제출 시각아이디문제언어결과실행 시간메모리
688198UnforgettableplBest Place (NOI17_bestplace)C++17
100 / 100
38 ms3112 KiB
/* ID: samikgo1 TASK: friday LANG: C++14 */ /*pragma handle-exceptions*/ #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); // freopen("friday.in","r",stdin); // freopen("friday.out","w",stdout); int n; cin >> n; int arr_x[n+1]; int arr_y[n+1]; for (int i = 1; i <= n; i++) { cin >> arr_x[i] >> arr_y[i]; } sort(arr_x+1,arr_x+n+1); sort(arr_y+1,arr_y+n+1); if(n%2){ cout << arr_x[(n+1)/2] << ' ' << arr_y[(n+1)/2]; } else { cout << (int)(arr_x[n/2]+arr_x[(n/2)+1])/2 << ' ' << (int)(arr_y[n/2]+arr_y[(n/2)+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...