#include<cstdio>
#include<malloc.h>
#include<algorithm>
int arr[101];
void Priarr(int a,int b){
if(a<=b)
for(int i=a;i<=b;i++){
if(i!=a)printf(" ");
printf("%d",arr[i]);
}
}
int main(){
int N,M;
scanf("%d%d",&N,&M);
for(int i=1;i<=N;i++){//从1开始存储
scanf("%d",&arr[i]);
}
M%=N;
Priarr(N-M+1,N);
if(N-M+1<N)printf(" ");
Priarr(1,N-M);
return 0;
}
原文地址:https://www.cnblogs.com/hebust/p/9498136.html
时间: 2024-10-25 02:23:43