fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int N;
  4. struct NODE{
  5. int X,Y;
  6. }node[200001];
  7. bool comp(NODE lhs,NODE rhs){
  8. return lhs.X<rhs.X;
  9. }
  10. int main() {
  11. cin>>N;
  12. for(int q=0;q<N;q=q+1){
  13. cin>>node[q].X>>node[q].Y;
  14. }
  15. sort(node,node+N,comp);
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5304KB
stdin
3
10 20
20 30
40 50
stdout
Standard output is empty