#include <bits/stdc++.h>
#define st first
#define nd second
#define db double
#define re register
#define pb push_back
#define mk make_pair
#define int long long
#define ldb long double
#define pii pair<int, int>
#define ull unsigned long long
#define mst(a, b) memset(a, b, sizeof(a))
using namespace std;
inline int read()
{
int s = 0, w = 1;
char ch = getchar();
while(ch < '0' || ch > '9') { if(ch == '-') w *= -1; ch = getchar(); }
while(ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
return s * w;
}
int n, k;
queue<int> q;
signed main()
{
n = read(), k = read();
for(re int i = 1, x; i <= n; i++) x = read(), q.push(x);
while(k--) q.pop(), q.push(0);
for(re int i = 1; i <= n; i++)
printf("%lld ", q.front()), q.pop();
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:27:14: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
27 | for(re int i = 1, x; i <= n; i++) x = read(), q.push(x);
| ^
./Main.cpp:27:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
27 | for(re int i = 1, x; i <= n; i++) x = read(), q.push(x);
| ^
./Main.cpp:27:57: warning: address requested for ‘x’, which is declared ‘register’ [-Wextra]
27 | for(re int i = 1, x; i <= n; i++) x = read(), q.push(x);
| ^
./Main.cpp:29:14: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
29 | for(re int i = 1; i <= n; i++)
| ^