Auto commit

This commit is contained in:
smallkun 2025-03-25 09:38:23 +08:00
parent 57e8628eec
commit 537578994c

View File

@ -17,6 +17,39 @@
输出样例4 5 1 2 3
```
```c
#include <stdio.h>
int main(){
int a[100] = {0}, b[100] = {0};
int len1, len2, index;
int i;
scanf("%d", &len1);
for(i=0;i<len1;i++){
scanf("%d", a+i);
}
scanf("%d", &len2);
for(i=0;i<len2;i++){
scanf("%d", b+i);
}
scanf("%d", &index);
for(i=len1-1;i>=index;i--){
a[i+len2] = a[i];
}
for(i=0;i<len2;i++){
a[index+i]=b[i];
}
len1+=len2;
for(i=0;i<len1;i++){
printf("%d ", a[i]);
}
return 0;
}
```