Submission #703617

#TimeUsernameProblemLanguageResultExecution timeMemory
703617chinmoy_101Best Place (NOI17_bestplace)C++14
100 / 100
94 ms3780 KiB
#include<bits/stdc++.h> using namespace std; #define ll long long int int main() { ll N; cin>>N; ll x[N], y[N]; for(ll i=0; i<N; i++) { ll a, b; cin>>a >>b; x[i]=a; y[i]=b; } sort(x, x+N); sort(y, y+N); if(N%2!=0) { cout<<x[N/2] <<" " <<y[N/2]; } else { ll mid=N/2; ll miid=(N/2)-1; cout<<(x[mid]+x[miid])/2 <<" " <<(y[mid]+y[miid])/2; } 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...