fork download
  1. #include <iostream>
  2. #include "bits/stdc++.h";
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. vector<vector<int>> arr = {{1,3},{1,2},{7,8},{8,10}};
  8. sort(arr.begin(), arr.end());
  9.  
  10. for(auto i : arr){
  11. cout<<i[0]<<" "<<i[1]<<endl;
  12. }
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5548KB
stdin
Standard input is empty
stdout
1 2
1 3
7 8
8 10