Ilya_konstantinov

Untitled

Sep 20th, 2025
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | Source Code | 0 0
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. /*
  5. Ваша функция будет вставлена здесь
  6. */
  7.  
  8. using std::cin;
  9. using std::cout;
  10.  
  11. int main() {
  12.     int n, m; cin >> n >> m;
  13.     std::vector<int> l(n), r(m), ans(n + m);
  14.     for (int &el : l) {
  15.         cin >> el;
  16.     }
  17.     for (int &el : r) {
  18.         cin >> el;
  19.     }
  20.     Merge(l, r, ans);
  21.     for (int &el : ans) {
  22.         cout << el << ' ';
  23.     }
  24.     cout << '\n';
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment