fork(2) download
  1. #include <algorithm>
  2.  
  3. struct A
  4. {
  5. int x, y;
  6. };
  7.  
  8. int main()
  9. {
  10. A array[1000];
  11. //...
  12. std::sort(array, array+1000, [](A a, A b){ return a.x < b.x; });
  13. std::sort(array, array+1000, [](A a, A b){ return a.y < b.y; });
  14. }
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout

Standard output is empty