https://pintia.cn/problem-sets/994805260223102976/problems
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std ;
vector <int> v(110);
int main()
{
int m , n ;
cin >> n >> m ;
for(int i = 0 ; i < n ; i++)
cin >> v[i];
m %= n ; //易忘
// if(( v.begin() + n) == v.end() ) cout << "equal"; // 这两行是测试
// cout << "v.size() ]= " << v.size(); // 输出: v.size() =110 ,而不是读入数据大小n=6
reverse(v.begin() , v.begin() + n ); // 结论:v.end() 不等价于 v.begin() + n ;
reverse(v.begin() , v.begin() + m );
reverse(v.begin() + m , v.begin() + n );
for(int i = 0 ; i < n - 1 ; i++)
cout << v[i] << ' ';
cout << v[n - 1];
return 0;
}