#include <algorithm>
#include <iostream>
#include <vector>
int main() {
std::vector<std::vector<int>> arr2d = {
{ 5, 6, 1 },
{ 3, 8, 0 },
{ 9, 2, 7 }
};
std::vector<int> arr;
for (const auto& row : arr2d) {
arr.insert(arr.end(), row.begin(), row.end());
}
for (int n : arr) {
std::cout << n << "\t";
}
}
/*
run:
5 6 1 3 8 0 9 2 7
*/