This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |