//这里填你的代码^^
//注意代码要放在两组三个点之间,才可以正确显示代码高亮哦~
#include <iostream>
using namespace std;
void copy(int a[], int b[], int size)
{
for(int i = 0; i < size; i++)
b[i] = a[i];
}
int main()
{
int n, m, size;
cin >> n >> m >> size;
int a[n], b[m];
for(int i = 0; i < n; i++) cin >> a[i];
for(int j = 0; j < m; j++) cin >> b[j];
copy(a, b, size);
for(auto x : b) cout << x << ' ';
}
#########################################################
#include <iostream>
#include <cstring>
using namespace std;
void copy(int a[], int b[], int size)
{
memcpy(b, a, size * 4);//将a数组的前几个值赋值给b数组,要加size * Byte
/*memset是将数组的值整体赋值为0 或者 -1;
int array[n];
memset(array, 0 / -1, n * int(Byte))*/
}
int main()
{
int m, n, size;
cin >> m >> n >> size;
int a[m], b[n];
for(int i = 0; i < m; i++) cin >> a[i];
for(int i = 0; i < n; i++) cin >> b[i];
copy(a, b, size);
for(auto x : b) cout << x << ' ';
return 0;
}