#include <iostream>
using namespace std;
int n, t = 0, k;
int main()
{
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i - t];
if (i + 1 == k)
t = 1;
}
for (int i = 0; i + 1 < n; i++)
cout << a[i] << " ";
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int n, t = 0, k;
int main()
{
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++)
{
cin >> a[i - t];
if (i + 1 == k)
t = 1;
}
for (int i = 0; i + 1 < n; i++)
cout << a[i] << " ";
}