文章
2
粉丝
131
获赞
0
访问
10.8k
#include<bits/stdc++.h>
using namespace std;
int main(){
string str,order;
int n;
while(getline(cin,str)){
cin >> n;
while(n--){
cin >> order;
if(order[0] == '0'){//翻转
int i = order[1] - '0';
int len = order[2] - '0';
int j = i + len - 1;
while(i < j){
char t = str[i];
str[i] = str[j];
str[j] = t;
&nbs...
登录后发布评论
暂无评论,来抢沙发