Submission #1006021

#TimeUsernameProblemLanguageResultExecution timeMemory
1006021christinelynnBest Place (NOI17_bestplace)C++17
100 / 100
67 ms2208 KiB
#include<bits/stdc++.h> using namespace std; #define int long long signed main(){ int n; cin>>n; vector<int>x,y; for(int q=1;q<=n;q++){ int w,e; cin>>w>>e; x.push_back(w); y.push_back(e); } sort(x.begin(),x.end()); sort(y.begin(),y.end()); int ansx=1e18; if(n%2==1){ cout<<x[n/2]<<" "<<y[n/2]<<endl; } else{ cout<<x[n/2 -1]<<" "<<y[n/2-1]<<endl; } }

Compilation message (stderr)

bestplace.cpp: In function 'int main()':
bestplace.cpp:20:9: warning: unused variable 'ansx' [-Wunused-variable]
   20 |     int ansx=1e18;
      |         ^~~~
#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...