fork(21) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. vector<vector<int> > vec={{7,8,9},{7,8,1},{11,9,12},{1,2,3},{1,2,3,1}};
  7. sort(vec.begin(),vec.end());
  8. for(int i=0;i<vec.size();i++){
  9. for(int j=0;j<vec[i].size();j++){
  10. printf("%d ",vec[i][j]);
  11. }
  12. puts("");
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
1 2 3 
1 2 3 1 
7 8 1 
7 8 9 
11 9 12