Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1. #include <fstream>
  2. #include <vector>
  3. template <typename T,typename U>
  4. std::vector<U> blya(std::vector<T> vec,U v, int value) {
  5.   std::vector<T> temp=vec;
  6.  // std::vector<U> a= std::vector<vec>;
  7.  
  8.   for (size_t i = 0; i < value; ++i) {
  9.     temp.push_back(vec);
  10.   }
  11.   return vec;
  12. }
  13. template <typename U>
  14. std::vector<U> veec(std::initializer_list<int> ae, std::vector<U> main_vec,
  15.                     int value_now) {
  16.   std::vector<U> temp_v = main_vec;
  17.   std::vector<U> this_vec;
  18.   for (std::initializer_list<int>::iterator i = ae.end() - 2; i >= ae.begin();
  19.        ++i) {
  20.     (void)blya(temp_v, temp_v,static_cast<int>(*i));
  21.       // temp_v.push_back(main_vec);
  22.   }
  23.   return this_vec;
  24. }
  25.  
  26. template <typename U, typename... T>
  27. void init(U value, T... args) {
  28.   std::vector<std::vector<int>> b(2, std::vector<int>(3, -1));
  29.   std::vector<std::vector<std::vector<std::string>>> c(
  30.       3, std::vector<std::vector<std::string>>(
  31.              4, std::vector<std::string>(2, "aba")));
  32.   std::initializer_list<int> aye{args...};
  33.   std::ofstream out("a.txt");
  34.   std::initializer_list<int>::iterator a = std::end(aye) - 1;
  35.   out << *a;
  36.   std::vector<U> main_v(*a, value);
  37.   static_cast<void>(veec(aye, main_v, 1));
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement