Advertisement
Ilya_konstantinov

9.5C

Nov 30th, 2023
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | Source Code | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include "func_c.h"
  4.  
  5. using std::cin;
  6. using std::cout;
  7. using std::vector;
  8.  
  9. int main() {
  10.     int n,m;
  11.     cin >> n;
  12.     vector<int> v1(n);
  13.     for(int &el : v1) cin >> el;
  14.     cin >> m;
  15.     vector<int> v2(m);
  16.     for(int &el : v2) cin >> el;
  17.     swap(v1, v2);
  18.     for(int &el : v1) cout << el << ' ';
  19.     cout << std::endl;
  20.     for(int &el : v2) cout << el << ' ';
  21.     cout << std::endl;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement