Skip to content

Instantly share code, notes, and snippets.

@abap34
Created September 1, 2020 09:32
Show Gist options
  • Save abap34/babffbcd8fa02d7f3a17f5b90d30d2ac to your computer and use it in GitHub Desktop.
Save abap34/babffbcd8fa02d7f3a17f5b90d30d2ac to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
void output(std::vector<std::vector<int>> A)
{
for (auto vec_a : A)
{
for (auto a : vec_a)
{
std::cout << a << " ";
}
std::cout << "\n";
}
}
int main()
{
std::vector<std::vector<int>> A = {{1, 5, 2},
{6, 1, 4},
{5, 2, 3},
{2, 3, 1}};
//std::sort(A.begin(), A.end());
for (int i = 0; i < 4; i++){
sort(A[i].begin(), A[i].end());
}
output(A);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment