文章
78
粉丝
0
获赞
263
访问
11.2k
#include <bits/stdc++.h>
using namespace std;
int main(){
string str;
int n ;
while(cin >> str >> n){
string s;
while(n--){
cin >> s;
int a = s[1]- '0';
int b = s[2]- '0';
if(s[0] == '0'){
reverse(str.begin() + a , str.begin() + a + b);
cout << str << endl;
}else{
str.replace(a,b,s.substr(3));
cout << str << endl;
}
...
登录后发布评论
暂无评论,来抢沙发