看一下我的代码吧,90分,你看看有什么可以借鉴的
```cpp
#include<bits/stdc++.h>
using namespace std;
void f1(int n,int m,int p,string s) {
while(s.find('-')!=-1) {
string str1="";
int t=s.find('-');
for(int i=1; i<=s[t+1]-s[t-1]-1; i++) {
for(int j=1; j<=m; j++) {
if(n==3) str1+='*';
else if(n==1){
str1+=tolower(char(s[t-1]+i));
}
else {
str1+=toupper(char(s[t-1]+i));
}
}
}
if(p==2) reverse(str1.begin(),str1.end());
if(abs(s[t-1]-s[t+1])>25||s[t+1]<=s[t-1])s.replace(t,1,",");
else s.replace(t,1,str1);
}
while(s.find(',')!=-1) {
s.replace(s.find(','),1,"-");
}
cout<<s;
}
int main() {
int p1,p2,p3;
string str;
cin>>p1>>p2>>p3>>str;
f1(p1,p2,p3,str);
return 0;
}
```
by Cy_AlphaKai_CCF @ 2023-10-21 19:39:30