Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- #include <set>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- #ifdef _DEBUG
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
- printf("Enter the number of elements in first vector and number of elements in second\n");
- int n, m;
- scanf("%d%d", &n, &m);
- vector<int> a(n);
- vector<int> b(m);
- printf("Now enter the value of elements in first vector\n");
- for(int i = 0; i < n; i++) scanf("%d", &a[i]);
- printf("Now enter the value of elements in second vector\n");
- for(int i = 0; i < m; i++) scanf("%d", &b[i]);
- /*printf("\nNow enter the value of x(for multiplicity) and new element: ");
- int x, new_elem; scanf("%d%d", &x, &new_elem);
- for(auto it = a.begin(); it != a.end(); ++it)
- if(*it % x == 0 && *it % 2 == 0){
- a.insert(it, new_elem);
- ++it;
- }
- printf("\nAfter inserting new elements vector is: ");
- for(auto it = a.begin(); it != a.end(); ++it) printf("%d ", *it);
- */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement