#include <iostream>
#include <algorithm>
#include <vector>
int main()
{
size_t i, n, x, y;
std::cout << "Marimea vectorului: ";
std::cin >> n;
std::vector<size_t> vec(n);
for (i = 0; i < n; ++i)
std::cin >> vec[i];
std::cout << "x: ";
std::cin >> x;
std::cout << "y: ";
std::cin >> y;
std::vector<size_t>::iterator it = std::find(vec.begin(), vec.end(), y);
vec.insert(it + (it != vec.end()), x);
for (i = 0; i < n + 1; ++i)
std::cout << vec[i] << ' ';
}