Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- int * a = new int[n], *b = new int[n], *c = new int[2 * n];
- for (int i = 0; i < n; ++i)
- cin >> a[i];
- for (int i = 0; i < n; ++i)
- cin >> b[i];
- for (int i = n - 1; i >= 0; --i) {
- c[i * 2] = a[i];
- c[i * 2 + 1] = b[i];
- }
- for (int i = 0; i < 2 * n; ++i)
- cout << c[i] << ' ';
- delete a, b, c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement