fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. set<pair<int,int> > coda;
  7. pair<int,int> temp;
  8. int a,b;
  9. for(int i=1;i<=3;++i)
  10. {
  11. cin>>a>>b;
  12. temp=make_pair(a,b);
  13. coda.insert(temp);
  14. }
  15. for(auto i:coda)
  16. cout<<i.first<<" "<<i.second<<endl;
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 3436KB
stdin
1 3
3 2
2 4
stdout
1 3
2 4
3 2