Submission #483240

#TimeUsernameProblemLanguageResultExecution timeMemory
483240vedants1905Best Place (NOI17_bestplace)C++17
0 / 100
89 ms2360 KiB
#include <bits/stdc++.h> using namespace std; #define inti long long int int main(){ /*#ifndef ONLINE_JUDGE freopen("triangles.in","r",stdin); freopen("triangles.out","w",stdout); #endif*/ int N,A,B; cin>>N; vector<int> X,Y; for(int i=0;i<N;i++){ cin>>A>>B; X.push_back(A); Y.push_back(B); } sort(X.begin(),X.end()); sort(Y.begin(),Y.end()); if(N%2==0){cout<<(X[N/2]+X[N/2+1])/2<<" "<<(Y[N/2]+Y[N/2+1])/2;} else{cout<<X[N/2+1]<<" "<<Y[N/2+1];} 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...