Advertisement
erfanul007

CF Good Bye 2018 B

Dec 30th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,x,y,i;
  6. cin>>n;
  7. vector<pair<int,int>> vc,vt;
  8. for(i=0;i<n;i++){
  9. cin>>x>>y;
  10. vc.push_back(make_pair(x,y));
  11. }
  12. for(i=0;i<n;i++){
  13. cin>>x>>y;
  14. vt.push_back(make_pair(x,y));
  15. }
  16. sort(vc.begin(),vc.end());
  17. sort(vt.rbegin(),vt.rend());
  18. x=vc[0].first + vt[0].first;
  19. y=vc[0].second + vt[0].second;
  20. cout<<x<<" "<<y<<endl;
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement