Submission #532326

#TimeUsernameProblemLanguageResultExecution timeMemory
532326makanhuliaBest Place (NOI17_bestplace)C++17
3 / 100
227 ms16312 KiB
#include <bits/stdc++.h> #define ll long long #define fi first #define se second const ll MOD=1e9+7; using namespace std; map <ll,bool> x; map <ll,bool> y; ll N; vector <ll> vec1; vector <ll> vec2; int main(){ cin>>N; for(int i=1;i<=N;i++){ ll a,b; cin>>a>>b; if(!x[a]){ x[a]=true; vec1.push_back(a); } if(!y[b]){ y[b]=true; vec2.push_back(b); } } sort(vec1.begin(),vec1.end()); sort(vec2.begin(),vec2.end()); ll s1=vec1.size(); ll s2=vec2.size(); cout<<vec1[s1/2]<<' '<<vec2[s2/2]<<endl; }
#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...