#include
#include
#include
using namespace std;
mt19937 gen(time(0));
uniform_int_distribution<> uid(0, 19);
void replace(int *a, int n, int k)
{
int last = a[n];
for (int i = n - 1; i >= k; i--) {
a[i + 1] = a[i];
}
a[k] = last;
}
int main()
{
int n = 0, k = 0;
cin >> n;
int *a = new int[n];
if (n <= 100) {<br> for (int i = 0; i <= n; i++) {<br> a[i] = uid(gen); cout << a[i] << " ";<br> }
cout << endl; cin >> k;
if (k <= n) {<br> replace(a, n, k - 1);
for (int i = 0; i <= n; i++) {<br> cout << a[i] << " "; }<br> } else {
cout << "Error" << endl;<br> }
}else {
cout << "Error!" << endl;<br>}
delete[] a;
return 0;
}