flat_map
#include <vector>
#include <iostream>
#include <algorithm>
int main() {
std::vector<std::vector<int>> v = {{1, 2}, {3, 4}, {5, 6}};
std::vector<int> flattened = std::vector<int>(v.size() * v[0].size());
std::transform(v.begin(), v.end(), flattened.begin(),
[](const std::vector<int>& inner) { return inner.begin(); });
for (int num : flattened) {
std::cout << num << " ";
}
return 0;
}