forked from avani112/HacktoberFest2021-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Merge_two_arrry.cpp
68 lines (66 loc) · 2.97 KB
/
Merge_two_arrry.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include <bits/stdc++.h>
// Uncomment them for optimisations
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define range(...) GET_MACRO(__VA_ARGS__, r4, r3, r2, r1)(__VA_ARGS__)
#define r4(var, start, stop, step) for (auto var = start; start<=stop? var<stop:var>stop ; var = var + step)
#define r3(var, start, stop) for(auto var = start; var != stop; var++)
#define r2(var, stop) for(ll var = 0; var != stop; var++)
#define r1(stop) for(ll start_from_0 = 0; start_from_0 != stop; start_from_0++)
using namespace std;
#define endl "\n"
#define FULL_INF numeric_limits<double>::infinity()
#define INF LONG_LONG_MAX
#define INT_INF INT_MAX
#define ll long long
#define ld long double
#define V vector
#define P pair
#define S string
#define MS multiset
#define UM unordered_map
#define US unordered_set
#define MM multimap
#define mp make_pair
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define FAST ios_base::sync_with_stdio(NULL), cin.tie(NULL), cout.tie(NULL);
#define all(a) a.begin(), a.end()
#define db(x) cout << #x << " = " << x << "\n"
#define new_string(str) string str; cin >> str;
#define new_int_1(t) ll t; cin >> t;
#define new_int_2(a, b) ll a, b; cin >> a >> b;
#define new_int_3(a, b, c) ll a, b, c; cin >> a >> b >> c;
#define new_int_4(a, b, c, d) ll a, b, c, d; cin >> a >> b >> c >> d;
#define new_int_5(a, b, c, d, e) ll a, b, c, d, e; cin >> a >> b >> c >> d >> e;
#define new_int_6(a, b, c, d, e, f) ll a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f;
const ll mod = 1000000007; const ll mod2 = 998244353; const ld pi = acos(-1);
typedef vector<string> vs; typedef pair<ll, ll> pii;typedef vector<ll> vi;typedef map<ll, ll> mii; typedef set<ll> si;
ll input(){ new_int_1(n); return n; }vi inputvec(ll n, ll start = 0){ vi vec(n); for (ll i = start; i < n; i++){ vec[i] = input(); } return vec; }
template<typename T>bool btn(T a, T b, T c){if((a <= b && b <= c) || (a >= b && b >= c)) return true; return false;}
template <typename T>ostream& operator<<(ostream& os, const V<T>& v){for (int i = 0; i < v.size();++i) {os << v[i];if (i != v.size() - 1) os << " ";} return os;}
template<typename... T> void print(T &&...args){ ((cout << args << " "), ...); cout << endl;}
template<typename... T> void printl(T &&...args){ ((cout << args << " "), ...);}
template <typename... T, typename Q>Q max(Q arg1, T &&...args){Q ans = arg1;((ans = (args > ans ? args : ans)), ...);return ans;}
template <typename... T, typename Q>Q min(Q arg1, T &&...args){Q ans = arg1;((ans = (args < ans ? args : ans)), ...);return ans;}
ld TLD(ll n) {return TLD(n);}
ll func()
{
// write your code here
return 0;
}
int main()
{
// Uncomment for faster I/O
// FAST;
new_int_2(n, m);
vi vec1 = inputvec(n);
vi vec2 = inputvec(m);
vi vec;
range(i, n) vec.push_back(vec1[i]);
range(i, m) vec.push_back(vec2[i]);
print(vec);
}