#include <iostream>
#include<vector>
template<typename T>
std::ostream& operator<<(std::ostream &os, const std::vector<T> &vec)
{
for(auto it = vec.begin(); it!=vec.end(); ++it)
{
os<< (*it)<<" ";
}
return os;
}
template<typename T>
std::ostream& operator<<(std::ostream &os, const std::vector<std::vector<T>> &vec)
{
for(auto it = vec.begin(); it!=vec.end(); ++it)
{
os << *it;
}
return os;
}
int main()
{
std::vector<int> vec1{1,2,3};
std::cout<<vec1<<std::endl; //prints 1 2 3
std::vector<std::vector<int>> vec2 = {{1,2,3}, {4,5,6}, {7,8,9}}; //1 2 3 4 5 6 7 8 9
std::cout<<vec2<<std::endl;
std::vector<std::vector<std::vector<double>>> vec3{{{1,2,3}, {4,5,6}, {7,8,9}}, {{-1,-2,-3}, {-4,-5,-6}, {-10,-22,36}}, {{129,212,999}, {0,0,1}, {3,5,4}}};
std::cout<<vec3<<std::endl;
return 0;
}