Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n,x,y,i;
- cin>>n;
- vector<pair<int,int>> vc,vt;
- for(i=0;i<n;i++){
- cin>>x>>y;
- vc.push_back(make_pair(x,y));
- }
- for(i=0;i<n;i++){
- cin>>x>>y;
- vt.push_back(make_pair(x,y));
- }
- sort(vc.begin(),vc.end());
- sort(vt.rbegin(),vt.rend());
- x=vc[0].first + vt[0].first;
- y=vc[0].second + vt[0].second;
- cout<<x<<" "<<y<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement