看不懂啥意思的建议转专业
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
m = m%n;
int a[n],b[n];
for(int i=0;i<n;i++){
cin>>a[i];
b[i] = (i+n-m)%(n);
}
for(int i=0;i<n;i++){
cout<<a[b[i]];
if(i==n-1){
cout<<endl;
}else{
cout<<" ";
}
}
return 0;
}