제출 #497728

#제출 시각아이디문제언어결과실행 시간메모리
497728akshtsinghaniaBest Place (NOI17_bestplace)C++14
0 / 100
101 ms8644 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" void solve(){ int n; cin>>n; vector<pair<int,int>> p(n); vector<pair<int,int>> pr(n); for(int i=0;i<n;i++){ cin>>p[i].first>>p[i].second; pr[i].first=p[i].second; pr[i].second=p[i].first; } sort(p.begin(),p.end()); sort(pr.begin(),pr.end()); int max_a = p[p.size()-1].first; int max_b = pr[pr.size()-1].first; cout<< p[round(max_a/2)].first<< " " << pr[round(max_b/2)].first<< endl; } signed main(){ int t =1; // cin>>t; while(t--)solve(); 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...