제출 #683619

#제출 시각아이디문제언어결과실행 시간메모리
683619Pranav1056Best Place (NOI17_bestplace)C++14
0 / 100
204 ms3984 KiB
#include <bits/stdc++.h> using namespace std; int main(){ 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); for(int t : y){ cout << t << endl;} if(n % 2 == 1){cout << x[int((n + 1)/2) - 1] << " " << y[int((n + 1)/2) -1];} else{ int x_avg = x[int(n/2) - 1] + x[int(n/2)]; int y_avg = y[int(n/2) - 1] + y[int(n/2)]; cout << int(x_avg/2) << " " << int(y_avg/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...